diff --git a/sdk/resources/azure-mgmt-resource/_meta.json b/sdk/resources/azure-mgmt-resource/_meta.json
index 52b673e96e02..8a494475ffbf 100644
--- a/sdk/resources/azure-mgmt-resource/_meta.json
+++ b/sdk/resources/azure-mgmt-resource/_meta.json
@@ -4,7 +4,7 @@
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
],
- "commit": "19707b7e63b29c7b89335f832a4eea104c64aebf",
+ "commit": "8a871d1720e0a00190fb38982b0648ddde683fa5",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/resources/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/resources/resource-manager/readme.md"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/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.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/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.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/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.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/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.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/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.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/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.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/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.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/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.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/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.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/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.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/operations/_providers_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/operations/_providers_operations.py
index 694e9dc9377e..f40003d62297 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/operations/_providers_operations.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/operations/_providers_operations.py
@@ -270,14 +270,11 @@ async def register(
def list(
self,
- top: Optional[int] = None,
expand: Optional[str] = None,
**kwargs: Any
) -> AsyncIterable["_models.ProviderListResult"]:
"""Gets all resource providers for a subscription.
- :param top: The number of results to return. If null is passed returns all deployments.
- :type top: int
:param expand: The properties to include in the results. For example, use &$expand=metadata in
the query string to retrieve resource provider metadata. To include property aliases in
response, use $expand=resourceTypes/aliases.
@@ -309,8 +306,6 @@ def prepare_request(next_link=None):
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')
if expand is not None:
query_parameters['$expand'] = self._serialize.query("expand", expand, 'str')
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
@@ -348,14 +343,11 @@ async def get_next(next_link=None):
def list_at_tenant_scope(
self,
- top: Optional[int] = None,
expand: Optional[str] = None,
**kwargs: Any
) -> AsyncIterable["_models.ProviderListResult"]:
"""Gets all resource providers for the tenant.
- :param top: The number of results to return. If null is passed returns all providers.
- :type top: int
:param expand: The properties to include in the results. For example, use &$expand=metadata in
the query string to retrieve resource provider metadata. To include property aliases in
response, use $expand=resourceTypes/aliases.
@@ -383,8 +375,6 @@ def prepare_request(next_link=None):
url = self.list_at_tenant_scope.metadata['url'] # type: ignore
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
- if top is not None:
- query_parameters['$top'] = self._serialize.query("top", top, 'int')
if expand is not None:
query_parameters['$expand'] = self._serialize.query("expand", expand, 'str')
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/operations/_resources_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/operations/_resources_operations.py
index 023da22c9f85..514f2cade8d9 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/operations/_resources_operations.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/operations/_resources_operations.py
@@ -388,20 +388,30 @@ def list(
) -> AsyncIterable["_models.ResourceListResult"]:
"""Get all the resources in a subscription.
- :param filter: The filter to apply on the operation.:code:`
`:code:`
`The properties you
- can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup,
- identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version,
- and plan/promotionCode.:code:`
`:code:`
`For example, to filter by a resource type, use:
- $filter=resourceType eq 'Microsoft.Network/virtualNetworks':code:`
`:code:`
`You can use
- substringof(value, property) in the filter. The properties you can use for substring are: name
- and resourceGroup.:code:`
`:code:`
`For example, to get all resources with 'demo'
- anywhere in the name, use: $filter=substringof('demo', name):code:`
`:code:`
`You can
- link more than one substringof together by adding and/or operators.:code:`
`:code:`
`You
- can filter by tag names and values. For example, to filter for a tag name and value, use
- $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When you filter by a tag name and value,
- the tags for each resource are not returned in the results.:code:`
`:code:`
`You can use
- some properties together when filtering. The combinations you can use are: substringof and/or
- resourceType, plan and plan/publisher and plan/name, identity and identity/principalId.
+ :param filter: The filter to apply on the operation.:code:`
`:code:`
`Filter comparison
+ operators include ``eq`` (equals) and ``ne`` (not equals) and may be used with the following
+ properties: ``location``\ , ``resourceType``\ , ``name``\ , ``resourceGroup``\ , ``identity``\
+ , ``identity/principalId``\ , ``plan``\ , ``plan/publisher``\ , ``plan/product``\ ,
+ ``plan/name``\ , ``plan/version``\ , and ``plan/promotionCode``.:code:`
`:code:`
`For
+ example, to filter by a resource type, use ``$filter=resourceType eq
+ 'Microsoft.Network/virtualNetworks'``\ :code:`
`:code:`
`:code:`
`\
+ ``substringof(value, property)`` can be used to filter for substrings of the following
+ currently-supported properties: ``name`` and ``resourceGroup``\ :code:`
`:code:`
`For
+ example, to get all resources with 'demo' anywhere in the resource name, use
+ ``$filter=substringof('demo', name)``\ :code:`
`:code:`
`Multiple substring operations
+ can also be combined using ``and``\ /\ ``or``
+ operators.:code:`
`:code:`
`:code:`
`Resources can be filtered by tag names and
+ values. For example, to filter for a tag name and value, use ``$filter=tagName eq 'tag1' and
+ tagValue eq 'Value1'``. Note that when resources are filtered by tag name and value,
+ :code:`the original tags for each resource will not be returned in the results.` Any
+ list of additional properties queried via ``$expand`` may also not be compatible when filtering
+ by tag names/values. :code:`
`:code:`
`For tag names only, resources can be filtered by
+ prefix using the following syntax: ``$filter=startswith(tagName, 'depart')``. This query will
+ return all resources with a tag name prefixed by the phrase ``depart`` (i.e.\ ``department``\ ,
+ ``departureDate``\ , ``departureTime``\ , etc.):code:`
`:code:`
`:code:`
`Note that
+ some properties can be combined when filtering resources, which include the following:
+ ``substringof() and/or resourceType``\ , ``plan and plan/publisher and plan/name``\ , and
+ ``identity and identity/principalId``.
:type filter: str
:param expand: Comma-separated list of additional properties to be included in the response.
Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example,
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_providers_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_providers_operations.py
index e2114a07cba5..1fe6971c0011 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_providers_operations.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_providers_operations.py
@@ -278,15 +278,12 @@ def register(
def list(
self,
- top=None, # type: Optional[int]
expand=None, # type: Optional[str]
**kwargs # type: Any
):
# type: (...) -> Iterable["_models.ProviderListResult"]
"""Gets all resource providers for a subscription.
- :param top: The number of results to return. If null is passed returns all deployments.
- :type top: int
:param expand: The properties to include in the results. For example, use &$expand=metadata in
the query string to retrieve resource provider metadata. To include property aliases in
response, use $expand=resourceTypes/aliases.
@@ -318,8 +315,6 @@ def prepare_request(next_link=None):
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')
if expand is not None:
query_parameters['$expand'] = self._serialize.query("expand", expand, 'str')
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
@@ -357,15 +352,12 @@ def get_next(next_link=None):
def list_at_tenant_scope(
self,
- top=None, # type: Optional[int]
expand=None, # type: Optional[str]
**kwargs # type: Any
):
# type: (...) -> Iterable["_models.ProviderListResult"]
"""Gets all resource providers for the tenant.
- :param top: The number of results to return. If null is passed returns all providers.
- :type top: int
:param expand: The properties to include in the results. For example, use &$expand=metadata in
the query string to retrieve resource provider metadata. To include property aliases in
response, use $expand=resourceTypes/aliases.
@@ -393,8 +385,6 @@ def prepare_request(next_link=None):
url = self.list_at_tenant_scope.metadata['url'] # type: ignore
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
- if top is not None:
- query_parameters['$top'] = self._serialize.query("top", top, 'int')
if expand is not None:
query_parameters['$expand'] = self._serialize.query("expand", expand, 'str')
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_resources_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_resources_operations.py
index 05557c6524e2..f0eb8f013360 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_resources_operations.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_resources_operations.py
@@ -398,20 +398,30 @@ def list(
# type: (...) -> Iterable["_models.ResourceListResult"]
"""Get all the resources in a subscription.
- :param filter: The filter to apply on the operation.:code:`
`:code:`
`The properties you
- can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup,
- identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version,
- and plan/promotionCode.:code:`
`:code:`
`For example, to filter by a resource type, use:
- $filter=resourceType eq 'Microsoft.Network/virtualNetworks':code:`
`:code:`
`You can use
- substringof(value, property) in the filter. The properties you can use for substring are: name
- and resourceGroup.:code:`
`:code:`
`For example, to get all resources with 'demo'
- anywhere in the name, use: $filter=substringof('demo', name):code:`
`:code:`
`You can
- link more than one substringof together by adding and/or operators.:code:`
`:code:`
`You
- can filter by tag names and values. For example, to filter for a tag name and value, use
- $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When you filter by a tag name and value,
- the tags for each resource are not returned in the results.:code:`
`:code:`
`You can use
- some properties together when filtering. The combinations you can use are: substringof and/or
- resourceType, plan and plan/publisher and plan/name, identity and identity/principalId.
+ :param filter: The filter to apply on the operation.:code:`
`:code:`
`Filter comparison
+ operators include ``eq`` (equals) and ``ne`` (not equals) and may be used with the following
+ properties: ``location``\ , ``resourceType``\ , ``name``\ , ``resourceGroup``\ , ``identity``\
+ , ``identity/principalId``\ , ``plan``\ , ``plan/publisher``\ , ``plan/product``\ ,
+ ``plan/name``\ , ``plan/version``\ , and ``plan/promotionCode``.:code:`
`:code:`
`For
+ example, to filter by a resource type, use ``$filter=resourceType eq
+ 'Microsoft.Network/virtualNetworks'``\ :code:`
`:code:`
`:code:`
`\
+ ``substringof(value, property)`` can be used to filter for substrings of the following
+ currently-supported properties: ``name`` and ``resourceGroup``\ :code:`
`:code:`
`For
+ example, to get all resources with 'demo' anywhere in the resource name, use
+ ``$filter=substringof('demo', name)``\ :code:`
`:code:`
`Multiple substring operations
+ can also be combined using ``and``\ /\ ``or``
+ operators.:code:`
`:code:`
`:code:`
`Resources can be filtered by tag names and
+ values. For example, to filter for a tag name and value, use ``$filter=tagName eq 'tag1' and
+ tagValue eq 'Value1'``. Note that when resources are filtered by tag name and value,
+ :code:`the original tags for each resource will not be returned in the results.` Any
+ list of additional properties queried via ``$expand`` may also not be compatible when filtering
+ by tag names/values. :code:`
`:code:`
`For tag names only, resources can be filtered by
+ prefix using the following syntax: ``$filter=startswith(tagName, 'depart')``. This query will
+ return all resources with a tag name prefixed by the phrase ``depart`` (i.e.\ ``department``\ ,
+ ``departureDate``\ , ``departureTime``\ , etc.):code:`
`:code:`
`:code:`
`Note that
+ some properties can be combined when filtering resources, which include the following:
+ ``substringof() and/or resourceType``\ , ``plan and plan/publisher and plan/name``\ , and
+ ``identity and identity/principalId``.
:type filter: str
:param expand: Comma-separated list of additional properties to be included in the response.
Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example,
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_operations_mixin.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_operations_mixin.py
index 1a194a9807e9..ed151630858f 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_operations_mixin.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_operations_mixin.py
@@ -36,10 +36,10 @@ def check_resource_name(
:param resource_name_definition: Resource object with values for resource name and resource
type.
- :type resource_name_definition: ~azure.mgmt.resource.subscriptions.v2019_11_01.models.ResourceName
+ :type resource_name_definition: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.ResourceName
:keyword callable cls: A custom type or function that will be passed the direct response
:return: CheckResourceNameResult, or the result of cls(response)
- :rtype: ~azure.mgmt.resource.subscriptions.v2019_11_01.models.CheckResourceNameResult
+ :rtype: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.CheckResourceNameResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
api_version = self._get_api_version('check_resource_name')
@@ -51,6 +51,8 @@ def check_resource_name(
from .v2019_06_01.operations import SubscriptionClientOperationsMixin as OperationClass
elif api_version == '2019-11-01':
from .v2019_11_01.operations import SubscriptionClientOperationsMixin as OperationClass
+ elif api_version == '2021-01-01':
+ from .v2021_01_01.operations import SubscriptionClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'check_resource_name'".format(api_version))
mixin_instance = OperationClass()
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_subscription_client.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_subscription_client.py
index 584f2df83ab4..915c656beced 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_subscription_client.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_subscription_client.py
@@ -54,11 +54,12 @@ class SubscriptionClient(SubscriptionClientOperationsMixin, MultiApiClientMixin,
:type profile: azure.profiles.KnownProfiles
"""
- DEFAULT_API_VERSION = '2019-11-01'
+ DEFAULT_API_VERSION = '2021-01-01'
_PROFILE_TAG = "azure.mgmt.resource.subscriptions.SubscriptionClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
None: DEFAULT_API_VERSION,
+ 'operations': '2019-11-01',
}},
_PROFILE_TAG + " latest"
)
@@ -92,6 +93,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2018-06-01: :mod:`v2018_06_01.models`
* 2019-06-01: :mod:`v2019_06_01.models`
* 2019-11-01: :mod:`v2019_11_01.models`
+ * 2021-01-01: :mod:`v2021_01_01.models`
"""
if api_version == '2016-06-01':
from .v2016_06_01 import models
@@ -105,6 +107,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2019-11-01':
from .v2019_11_01 import models
return models
+ elif api_version == '2021-01-01':
+ from .v2021_01_01 import models
+ return models
raise ValueError("API version {} is not available".format(api_version))
@property
@@ -137,6 +142,7 @@ def subscriptions(self):
* 2018-06-01: :class:`SubscriptionsOperations`
* 2019-06-01: :class:`SubscriptionsOperations`
* 2019-11-01: :class:`SubscriptionsOperations`
+ * 2021-01-01: :class:`SubscriptionsOperations`
"""
api_version = self._get_api_version('subscriptions')
if api_version == '2016-06-01':
@@ -147,6 +153,8 @@ def subscriptions(self):
from .v2019_06_01.operations import SubscriptionsOperations as OperationClass
elif api_version == '2019-11-01':
from .v2019_11_01.operations import SubscriptionsOperations as OperationClass
+ elif api_version == '2021-01-01':
+ from .v2021_01_01.operations import SubscriptionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'subscriptions'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -159,6 +167,7 @@ def tenants(self):
* 2018-06-01: :class:`TenantsOperations`
* 2019-06-01: :class:`TenantsOperations`
* 2019-11-01: :class:`TenantsOperations`
+ * 2021-01-01: :class:`TenantsOperations`
"""
api_version = self._get_api_version('tenants')
if api_version == '2016-06-01':
@@ -169,6 +178,8 @@ def tenants(self):
from .v2019_06_01.operations import TenantsOperations as OperationClass
elif api_version == '2019-11-01':
from .v2019_11_01.operations import TenantsOperations as OperationClass
+ elif api_version == '2021-01-01':
+ from .v2021_01_01.operations import TenantsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'tenants'".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/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/aio/_operations_mixin.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/aio/_operations_mixin.py
index 28b797545d9e..7ab07ebf2f8b 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/aio/_operations_mixin.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/aio/_operations_mixin.py
@@ -32,10 +32,10 @@ async def check_resource_name(
:param resource_name_definition: Resource object with values for resource name and resource
type.
- :type resource_name_definition: ~azure.mgmt.resource.subscriptions.v2019_11_01.models.ResourceName
+ :type resource_name_definition: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.ResourceName
:keyword callable cls: A custom type or function that will be passed the direct response
:return: CheckResourceNameResult, or the result of cls(response)
- :rtype: ~azure.mgmt.resource.subscriptions.v2019_11_01.models.CheckResourceNameResult
+ :rtype: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.CheckResourceNameResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
api_version = self._get_api_version('check_resource_name')
@@ -47,6 +47,8 @@ async def check_resource_name(
from ..v2019_06_01.aio.operations import SubscriptionClientOperationsMixin as OperationClass
elif api_version == '2019-11-01':
from ..v2019_11_01.aio.operations import SubscriptionClientOperationsMixin as OperationClass
+ elif api_version == '2021-01-01':
+ from ..v2021_01_01.aio.operations import SubscriptionClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'check_resource_name'".format(api_version))
mixin_instance = OperationClass()
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/aio/_subscription_client.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/aio/_subscription_client.py
index ca0b63129ad1..a9abc20407d7 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/aio/_subscription_client.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/aio/_subscription_client.py
@@ -52,11 +52,12 @@ class SubscriptionClient(SubscriptionClientOperationsMixin, MultiApiClientMixin,
:type profile: azure.profiles.KnownProfiles
"""
- DEFAULT_API_VERSION = '2019-11-01'
+ DEFAULT_API_VERSION = '2021-01-01'
_PROFILE_TAG = "azure.mgmt.resource.subscriptions.SubscriptionClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
None: DEFAULT_API_VERSION,
+ 'operations': '2019-11-01',
}},
_PROFILE_TAG + " latest"
)
@@ -90,6 +91,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2018-06-01: :mod:`v2018_06_01.models`
* 2019-06-01: :mod:`v2019_06_01.models`
* 2019-11-01: :mod:`v2019_11_01.models`
+ * 2021-01-01: :mod:`v2021_01_01.models`
"""
if api_version == '2016-06-01':
from ..v2016_06_01 import models
@@ -103,6 +105,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2019-11-01':
from ..v2019_11_01 import models
return models
+ elif api_version == '2021-01-01':
+ from ..v2021_01_01 import models
+ return models
raise ValueError("API version {} is not available".format(api_version))
@property
@@ -135,6 +140,7 @@ def subscriptions(self):
* 2018-06-01: :class:`SubscriptionsOperations`
* 2019-06-01: :class:`SubscriptionsOperations`
* 2019-11-01: :class:`SubscriptionsOperations`
+ * 2021-01-01: :class:`SubscriptionsOperations`
"""
api_version = self._get_api_version('subscriptions')
if api_version == '2016-06-01':
@@ -145,6 +151,8 @@ def subscriptions(self):
from ..v2019_06_01.aio.operations import SubscriptionsOperations as OperationClass
elif api_version == '2019-11-01':
from ..v2019_11_01.aio.operations import SubscriptionsOperations as OperationClass
+ elif api_version == '2021-01-01':
+ from ..v2021_01_01.aio.operations import SubscriptionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'subscriptions'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -157,6 +165,7 @@ def tenants(self):
* 2018-06-01: :class:`TenantsOperations`
* 2019-06-01: :class:`TenantsOperations`
* 2019-11-01: :class:`TenantsOperations`
+ * 2021-01-01: :class:`TenantsOperations`
"""
api_version = self._get_api_version('tenants')
if api_version == '2016-06-01':
@@ -167,6 +176,8 @@ def tenants(self):
from ..v2019_06_01.aio.operations import TenantsOperations as OperationClass
elif api_version == '2019-11-01':
from ..v2019_11_01.aio.operations import TenantsOperations as OperationClass
+ elif api_version == '2021-01-01':
+ from ..v2021_01_01.aio.operations import TenantsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'tenants'".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/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/models.py
index 28ba9b61c72e..4d1c3072bc67 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/models.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/models.py
@@ -5,3 +5,4 @@
# license information.
# --------------------------------------------------------------------------
from .v2019_11_01.models import *
+from .v2021_01_01.models import *
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/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.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/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.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/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.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/__init__.py
new file mode 100644
index 000000000000..6d8f45c77a61
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_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 ._subscription_client import SubscriptionClient
+from ._version import VERSION
+
+__version__ = VERSION
+__all__ = ['SubscriptionClient']
+
+try:
+ from ._patch import patch_sdk # type: ignore
+ patch_sdk()
+except ImportError:
+ pass
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_configuration.py
new file mode 100644
index 000000000000..4cd4f335e002
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_configuration.py
@@ -0,0 +1,65 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+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 SubscriptionClientConfiguration(Configuration):
+ """Configuration for SubscriptionClient.
+
+ 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
+ """
+
+ def __init__(
+ self,
+ credential, # type: "TokenCredential"
+ **kwargs # type: Any
+ ):
+ # type: (...) -> None
+ if credential is None:
+ raise ValueError("Parameter 'credential' must not be None.")
+ super(SubscriptionClientConfiguration, self).__init__(**kwargs)
+
+ self.credential = credential
+ self.api_version = "2021-01-01"
+ self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
+ kwargs.setdefault('sdk_moniker', 'mgmt-resource/{}'.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/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_metadata.json b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_metadata.json
new file mode 100644
index 000000000000..5c7ce346bf28
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_metadata.json
@@ -0,0 +1,110 @@
+{
+ "chosen_version": "2021-01-01",
+ "total_api_version_list": ["2021-01-01"],
+ "client": {
+ "name": "SubscriptionClient",
+ "filename": "_subscription_client",
+ "description": "All resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization.",
+ "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\": [\"SubscriptionClientConfiguration\"], \"._operations_mixin\": [\"SubscriptionClientOperationsMixin\"]}}, \"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\": [\"SubscriptionClientConfiguration\"], \"._operations_mixin\": [\"SubscriptionClientOperationsMixin\"]}}, \"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
+ }
+ },
+ "async": {
+ "credential": {
+ "signature": "credential: \"AsyncTokenCredential\",",
+ "description": "Credential needed for the client to connect to Azure.",
+ "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
+ "required": true
+ }
+ },
+ "constant": {
+ },
+ "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,
+ "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": {
+ "subscriptions": "SubscriptionsOperations",
+ "tenants": "TenantsOperations"
+ },
+ "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_resource_name" : {
+ "sync": {
+ "signature": "def check_resource_name(\n self,\n resource_name_definition=None, # type: Optional[\"_models.ResourceName\"]\n **kwargs # type: Any\n):\n",
+ "doc": "\"\"\"Checks resource name validity.\n\nA resource name is valid if it is not a reserved word, does not contains a reserved word and\ndoes not start with a reserved word.\n\n:param resource_name_definition: Resource object with values for resource name and resource\n type.\n:type resource_name_definition: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.ResourceName\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckResourceNameResult, or the result of cls(response)\n:rtype: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.CheckResourceNameResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
+ },
+ "async": {
+ "coroutine": true,
+ "signature": "async def check_resource_name(\n self,\n resource_name_definition: Optional[\"_models.ResourceName\"] = None,\n **kwargs: Any\n) -\u003e \"_models.CheckResourceNameResult\":\n",
+ "doc": "\"\"\"Checks resource name validity.\n\nA resource name is valid if it is not a reserved word, does not contains a reserved word and\ndoes not start with a reserved word.\n\n:param resource_name_definition: Resource object with values for resource name and resource\n type.\n:type resource_name_definition: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.ResourceName\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckResourceNameResult, or the result of cls(response)\n:rtype: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.CheckResourceNameResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
+ },
+ "call": "resource_name_definition"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_subscription_client.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_subscription_client.py
new file mode 100644
index 000000000000..33d13aa52091
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_subscription_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 SubscriptionClientConfiguration
+from .operations import SubscriptionsOperations
+from .operations import TenantsOperations
+from .operations import SubscriptionClientOperationsMixin
+from . import models
+
+
+class SubscriptionClient(SubscriptionClientOperationsMixin):
+ """All resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization.
+
+ :ivar subscriptions: SubscriptionsOperations operations
+ :vartype subscriptions: azure.mgmt.resource.subscriptions.v2021_01_01.operations.SubscriptionsOperations
+ :ivar tenants: TenantsOperations operations
+ :vartype tenants: azure.mgmt.resource.subscriptions.v2021_01_01.operations.TenantsOperations
+ :param credential: Credential needed for the client to connect to Azure.
+ :type credential: ~azure.core.credentials.TokenCredential
+ :param str base_url: Service URL
+ """
+
+ def __init__(
+ self,
+ credential, # type: "TokenCredential"
+ base_url=None, # type: Optional[str]
+ **kwargs # type: Any
+ ):
+ # type: (...) -> None
+ if not base_url:
+ base_url = 'https://management.azure.com'
+ self._config = SubscriptionClientConfiguration(credential, **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.subscriptions = SubscriptionsOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+ self.tenants = TenantsOperations(
+ 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()
+
+ def __enter__(self):
+ # type: () -> SubscriptionClient
+ self._client.__enter__()
+ return self
+
+ def __exit__(self, *exc_details):
+ # type: (Any) -> None
+ self._client.__exit__(*exc_details)
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_version.py
new file mode 100644
index 000000000000..e5754a47ce68
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_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 = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/__init__.py
new file mode 100644
index 000000000000..25a76f1a6996
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_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 ._subscription_client import SubscriptionClient
+__all__ = ['SubscriptionClient']
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/_configuration.py
new file mode 100644
index 000000000000..4bb922d53910
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/_configuration.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.
+# --------------------------------------------------------------------------
+
+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 SubscriptionClientConfiguration(Configuration):
+ """Configuration for SubscriptionClient.
+
+ 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
+ """
+
+ def __init__(
+ self,
+ credential: "AsyncTokenCredential",
+ **kwargs: Any
+ ) -> None:
+ if credential is None:
+ raise ValueError("Parameter 'credential' must not be None.")
+ super(SubscriptionClientConfiguration, self).__init__(**kwargs)
+
+ self.credential = credential
+ self.api_version = "2021-01-01"
+ self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
+ kwargs.setdefault('sdk_moniker', 'mgmt-resource/{}'.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/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/_subscription_client.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/_subscription_client.py
new file mode 100644
index 000000000000..dd8b88cd62ed
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/_subscription_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 SubscriptionClientConfiguration
+from .operations import SubscriptionsOperations
+from .operations import TenantsOperations
+from .operations import SubscriptionClientOperationsMixin
+from .. import models
+
+
+class SubscriptionClient(SubscriptionClientOperationsMixin):
+ """All resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization.
+
+ :ivar subscriptions: SubscriptionsOperations operations
+ :vartype subscriptions: azure.mgmt.resource.subscriptions.v2021_01_01.aio.operations.SubscriptionsOperations
+ :ivar tenants: TenantsOperations operations
+ :vartype tenants: azure.mgmt.resource.subscriptions.v2021_01_01.aio.operations.TenantsOperations
+ :param credential: Credential needed for the client to connect to Azure.
+ :type credential: ~azure.core.credentials_async.AsyncTokenCredential
+ :param str base_url: Service URL
+ """
+
+ def __init__(
+ self,
+ credential: "AsyncTokenCredential",
+ base_url: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ if not base_url:
+ base_url = 'https://management.azure.com'
+ self._config = SubscriptionClientConfiguration(credential, **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.subscriptions = SubscriptionsOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+ self.tenants = TenantsOperations(
+ 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()
+
+ async def __aenter__(self) -> "SubscriptionClient":
+ await self._client.__aenter__()
+ return self
+
+ async def __aexit__(self, *exc_details) -> None:
+ await self._client.__aexit__(*exc_details)
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/operations/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/operations/__init__.py
new file mode 100644
index 000000000000..2547a9583d70
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_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 ._subscriptions_operations import SubscriptionsOperations
+from ._tenants_operations import TenantsOperations
+from ._subscription_client_operations import SubscriptionClientOperationsMixin
+
+__all__ = [
+ 'SubscriptionsOperations',
+ 'TenantsOperations',
+ 'SubscriptionClientOperationsMixin',
+]
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/operations/_subscription_client_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/operations/_subscription_client_operations.py
new file mode 100644
index 000000000000..5d14abe7d8cf
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/operations/_subscription_client_operations.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, 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 SubscriptionClientOperationsMixin:
+
+ async def check_resource_name(
+ self,
+ resource_name_definition: Optional["_models.ResourceName"] = None,
+ **kwargs: Any
+ ) -> "_models.CheckResourceNameResult":
+ """Checks resource name validity.
+
+ A resource name is valid if it is not a reserved word, does not contains a reserved word and
+ does not start with a reserved word.
+
+ :param resource_name_definition: Resource object with values for resource name and resource
+ type.
+ :type resource_name_definition: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.ResourceName
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: CheckResourceNameResult, or the result of cls(response)
+ :rtype: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.CheckResourceNameResult
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckResourceNameResult"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2021-01-01"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.check_resource_name.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['Content-Type'] = 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 resource_name_definition is not None:
+ body_content = self._serialize.body(resource_name_definition, 'ResourceName')
+ 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)
+
+ deserialized = self._deserialize('CheckResourceNameResult', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ check_resource_name.metadata = {'url': '/providers/Microsoft.Resources/checkResourceName'} # type: ignore
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/operations/_subscriptions_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/operations/_subscriptions_operations.py
new file mode 100644
index 000000000000..fc3419dabd4a
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/operations/_subscriptions_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, 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 SubscriptionsOperations:
+ """SubscriptionsOperations 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.resource.subscriptions.v2021_01_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_locations(
+ self,
+ subscription_id: str,
+ include_extended_locations: Optional[bool] = None,
+ **kwargs: Any
+ ) -> AsyncIterable["_models.LocationListResult"]:
+ """Gets all available geo-locations.
+
+ This operation provides all the locations that are available for resource providers; however,
+ each resource provider may support a subset of this list.
+
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :param include_extended_locations: Whether to include extended locations.
+ :type include_extended_locations: bool
+ :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.resource.subscriptions.v2021_01_01.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-01-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_locations.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ if include_extended_locations is not None:
+ query_parameters['includeExtendedLocations'] = self._serialize.query("include_extended_locations", include_extended_locations, 'bool')
+
+ request = self._client.get(url, query_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_locations.metadata = {'url': '/subscriptions/{subscriptionId}/locations'} # type: ignore
+
+ async def get(
+ self,
+ subscription_id: str,
+ **kwargs: Any
+ ) -> "_models.Subscription":
+ """Gets details about a specified subscription.
+
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: Subscription, or the result of cls(response)
+ :rtype: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.Subscription
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.Subscription"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2021-01-01"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # 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('Subscription', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}'} # type: ignore
+
+ def list(
+ self,
+ **kwargs: Any
+ ) -> AsyncIterable["_models.SubscriptionListResult"]:
+ """Gets all subscriptions for a tenant.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either SubscriptionListResult or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.resource.subscriptions.v2021_01_01.models.SubscriptionListResult]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionListResult"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2021-01-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('SubscriptionListResult', 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'} # type: ignore
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/operations/_tenants_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/operations/_tenants_operations.py
new file mode 100644
index 000000000000..fdcd9f317284
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/operations/_tenants_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 TenantsOperations:
+ """TenantsOperations 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.resource.subscriptions.v2021_01_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.TenantListResult"]:
+ """Gets the tenants for your account.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either TenantListResult or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.resource.subscriptions.v2021_01_01.models.TenantListResult]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.TenantListResult"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2021-01-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('TenantListResult', 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': '/tenants'} # type: ignore
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/models/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/models/__init__.py
new file mode 100644
index 000000000000..05452f7cf6cf
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/models/__init__.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.
+# --------------------------------------------------------------------------
+
+try:
+ from ._models_py3 import CheckResourceNameResult
+ from ._models_py3 import ErrorAdditionalInfo
+ from ._models_py3 import ErrorResponse
+ from ._models_py3 import Location
+ from ._models_py3 import LocationListResult
+ from ._models_py3 import LocationMetadata
+ from ._models_py3 import ManagedByTenant
+ from ._models_py3 import Operation
+ from ._models_py3 import OperationDisplay
+ from ._models_py3 import OperationListResult
+ from ._models_py3 import PairedRegion
+ from ._models_py3 import ResourceName
+ from ._models_py3 import Subscription
+ from ._models_py3 import SubscriptionListResult
+ from ._models_py3 import SubscriptionPolicies
+ from ._models_py3 import TenantIdDescription
+ from ._models_py3 import TenantListResult
+except (SyntaxError, ImportError):
+ from ._models import CheckResourceNameResult # type: ignore
+ from ._models import ErrorAdditionalInfo # type: ignore
+ from ._models import ErrorResponse # type: ignore
+ from ._models import Location # type: ignore
+ from ._models import LocationListResult # type: ignore
+ from ._models import LocationMetadata # type: ignore
+ from ._models import ManagedByTenant # type: ignore
+ from ._models import Operation # type: ignore
+ from ._models import OperationDisplay # type: ignore
+ from ._models import OperationListResult # type: ignore
+ from ._models import PairedRegion # type: ignore
+ from ._models import ResourceName # type: ignore
+ from ._models import Subscription # type: ignore
+ from ._models import SubscriptionListResult # type: ignore
+ from ._models import SubscriptionPolicies # type: ignore
+ from ._models import TenantIdDescription # type: ignore
+ from ._models import TenantListResult # type: ignore
+
+from ._subscription_client_enums import (
+ LocationType,
+ RegionCategory,
+ RegionType,
+ ResourceNameStatus,
+ SpendingLimit,
+ SubscriptionState,
+ TenantCategory,
+)
+
+__all__ = [
+ 'CheckResourceNameResult',
+ 'ErrorAdditionalInfo',
+ 'ErrorResponse',
+ 'Location',
+ 'LocationListResult',
+ 'LocationMetadata',
+ 'ManagedByTenant',
+ 'Operation',
+ 'OperationDisplay',
+ 'OperationListResult',
+ 'PairedRegion',
+ 'ResourceName',
+ 'Subscription',
+ 'SubscriptionListResult',
+ 'SubscriptionPolicies',
+ 'TenantIdDescription',
+ 'TenantListResult',
+ 'LocationType',
+ 'RegionCategory',
+ 'RegionType',
+ 'ResourceNameStatus',
+ 'SpendingLimit',
+ 'SubscriptionState',
+ 'TenantCategory',
+]
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/models/_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/models/_models.py
new file mode 100644
index 000000000000..3d8d6c873a3a
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/models/_models.py
@@ -0,0 +1,654 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for 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 CheckResourceNameResult(msrest.serialization.Model):
+ """Resource Name valid if not a reserved word, does not contain a reserved word and does not start with a reserved word.
+
+ :param name: Name of Resource.
+ :type name: str
+ :param type: Type of Resource.
+ :type type: str
+ :param status: Is the resource name Allowed or Reserved. Possible values include: "Allowed",
+ "Reserved".
+ :type status: str or ~azure.mgmt.resource.subscriptions.v2021_01_01.models.ResourceNameStatus
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'status': {'key': 'status', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(CheckResourceNameResult, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.type = kwargs.get('type', None)
+ self.status = kwargs.get('status', 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 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.).
+
+ 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.resource.subscriptions.v2021_01_01.models.ErrorResponse]
+ :ivar additional_info: The error additional info.
+ :vartype additional_info:
+ list[~azure.mgmt.resource.subscriptions.v2021_01_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': '[ErrorResponse]'},
+ 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ErrorResponse, self).__init__(**kwargs)
+ self.code = None
+ self.message = None
+ self.target = None
+ self.details = None
+ self.additional_info = None
+
+
+class Location(msrest.serialization.Model):
+ """Location information.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: The fully qualified ID of the location. For example,
+ /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus.
+ :vartype id: str
+ :ivar subscription_id: The subscription ID.
+ :vartype subscription_id: str
+ :ivar name: The location name.
+ :vartype name: str
+ :ivar type: The location type. Possible values include: "Region", "EdgeZone".
+ :vartype type: str or ~azure.mgmt.resource.subscriptions.v2021_01_01.models.LocationType
+ :ivar display_name: The display name of the location.
+ :vartype display_name: str
+ :ivar regional_display_name: The display name of the location and its region.
+ :vartype regional_display_name: str
+ :param metadata: Metadata of the location, such as lat/long, paired region, and others.
+ :type metadata: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.LocationMetadata
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'subscription_id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'display_name': {'readonly': True},
+ 'regional_display_name': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'subscription_id': {'key': 'subscriptionId', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'display_name': {'key': 'displayName', 'type': 'str'},
+ 'regional_display_name': {'key': 'regionalDisplayName', 'type': 'str'},
+ 'metadata': {'key': 'metadata', 'type': 'LocationMetadata'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(Location, self).__init__(**kwargs)
+ self.id = None
+ self.subscription_id = None
+ self.name = None
+ self.type = None
+ self.display_name = None
+ self.regional_display_name = None
+ self.metadata = kwargs.get('metadata', None)
+
+
+class LocationListResult(msrest.serialization.Model):
+ """Location list operation response.
+
+ :param value: An array of locations.
+ :type value: list[~azure.mgmt.resource.subscriptions.v2021_01_01.models.Location]
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[Location]'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(LocationListResult, self).__init__(**kwargs)
+ self.value = kwargs.get('value', None)
+
+
+class LocationMetadata(msrest.serialization.Model):
+ """Location metadata information.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar region_type: The type of the region. Possible values include: "Physical", "Logical".
+ :vartype region_type: str or ~azure.mgmt.resource.subscriptions.v2021_01_01.models.RegionType
+ :ivar region_category: The category of the region. Possible values include: "Recommended",
+ "Extended", "Other".
+ :vartype region_category: str or
+ ~azure.mgmt.resource.subscriptions.v2021_01_01.models.RegionCategory
+ :ivar geography_group: The geography group of the location.
+ :vartype geography_group: str
+ :ivar longitude: The longitude of the location.
+ :vartype longitude: str
+ :ivar latitude: The latitude of the location.
+ :vartype latitude: str
+ :ivar physical_location: The physical location of the Azure location.
+ :vartype physical_location: str
+ :param paired_region: The regions paired to this region.
+ :type paired_region: list[~azure.mgmt.resource.subscriptions.v2021_01_01.models.PairedRegion]
+ :ivar home_location: The home location of an edge zone.
+ :vartype home_location: str
+ """
+
+ _validation = {
+ 'region_type': {'readonly': True},
+ 'region_category': {'readonly': True},
+ 'geography_group': {'readonly': True},
+ 'longitude': {'readonly': True},
+ 'latitude': {'readonly': True},
+ 'physical_location': {'readonly': True},
+ 'home_location': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'region_type': {'key': 'regionType', 'type': 'str'},
+ 'region_category': {'key': 'regionCategory', 'type': 'str'},
+ 'geography_group': {'key': 'geographyGroup', 'type': 'str'},
+ 'longitude': {'key': 'longitude', 'type': 'str'},
+ 'latitude': {'key': 'latitude', 'type': 'str'},
+ 'physical_location': {'key': 'physicalLocation', 'type': 'str'},
+ 'paired_region': {'key': 'pairedRegion', 'type': '[PairedRegion]'},
+ 'home_location': {'key': 'homeLocation', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(LocationMetadata, self).__init__(**kwargs)
+ self.region_type = None
+ self.region_category = None
+ self.geography_group = None
+ self.longitude = None
+ self.latitude = None
+ self.physical_location = None
+ self.paired_region = kwargs.get('paired_region', None)
+ self.home_location = None
+
+
+class ManagedByTenant(msrest.serialization.Model):
+ """Information about a tenant managing the subscription.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar tenant_id: The tenant ID of the managing tenant. This is a GUID.
+ :vartype tenant_id: str
+ """
+
+ _validation = {
+ 'tenant_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ManagedByTenant, self).__init__(**kwargs)
+ self.tenant_id = None
+
+
+class Operation(msrest.serialization.Model):
+ """Microsoft.Resources operation.
+
+ :param name: Operation name: {provider}/{resource}/{operation}.
+ :type name: str
+ :param display: The object that represents the operation.
+ :type display: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.OperationDisplay
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'display': {'key': 'display', 'type': 'OperationDisplay'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(Operation, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.display = kwargs.get('display', None)
+
+
+class OperationDisplay(msrest.serialization.Model):
+ """The object that represents the operation.
+
+ :param provider: Service provider: Microsoft.Resources.
+ :type provider: str
+ :param resource: Resource on which the operation is performed: Profile, endpoint, etc.
+ :type resource: str
+ :param operation: Operation type: Read, write, 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 Microsoft.Resources operations. It contains a list of operations and a URL link to get the next set of results.
+
+ :param value: List of Microsoft.Resources operations.
+ :type value: list[~azure.mgmt.resource.subscriptions.v2021_01_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 PairedRegion(msrest.serialization.Model):
+ """Information regarding paired region.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar name: The name of the paired region.
+ :vartype name: str
+ :ivar id: The fully qualified ID of the location. For example,
+ /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus.
+ :vartype id: str
+ :ivar subscription_id: The subscription ID.
+ :vartype subscription_id: str
+ """
+
+ _validation = {
+ 'name': {'readonly': True},
+ 'id': {'readonly': True},
+ 'subscription_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'id': {'key': 'id', 'type': 'str'},
+ 'subscription_id': {'key': 'subscriptionId', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(PairedRegion, self).__init__(**kwargs)
+ self.name = None
+ self.id = None
+ self.subscription_id = None
+
+
+class ResourceName(msrest.serialization.Model):
+ """Name and Type of the Resource.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: Required. Name of the resource.
+ :type name: str
+ :param type: Required. The type of the resource.
+ :type type: str
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ResourceName, self).__init__(**kwargs)
+ self.name = kwargs['name']
+ self.type = kwargs['type']
+
+
+class Subscription(msrest.serialization.Model):
+ """Subscription information.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: The fully qualified ID for the subscription. For example,
+ /subscriptions/00000000-0000-0000-0000-000000000000.
+ :vartype id: str
+ :ivar subscription_id: The subscription ID.
+ :vartype subscription_id: str
+ :ivar display_name: The subscription display name.
+ :vartype display_name: str
+ :ivar tenant_id: The subscription tenant ID.
+ :vartype tenant_id: str
+ :ivar state: The subscription state. Possible values are Enabled, Warned, PastDue, Disabled,
+ and Deleted. Possible values include: "Enabled", "Warned", "PastDue", "Disabled", "Deleted".
+ :vartype state: str or ~azure.mgmt.resource.subscriptions.v2021_01_01.models.SubscriptionState
+ :param subscription_policies: The subscription policies.
+ :type subscription_policies:
+ ~azure.mgmt.resource.subscriptions.v2021_01_01.models.SubscriptionPolicies
+ :param authorization_source: The authorization source of the request. Valid values are one or
+ more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy,
+ RoleBased'.
+ :type authorization_source: str
+ :param managed_by_tenants: An array containing the tenants managing the subscription.
+ :type managed_by_tenants:
+ list[~azure.mgmt.resource.subscriptions.v2021_01_01.models.ManagedByTenant]
+ :param tags: A set of tags. The tags attached to the subscription.
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'subscription_id': {'readonly': True},
+ 'display_name': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ 'state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'subscription_id': {'key': 'subscriptionId', 'type': 'str'},
+ 'display_name': {'key': 'displayName', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ 'state': {'key': 'state', 'type': 'str'},
+ 'subscription_policies': {'key': 'subscriptionPolicies', 'type': 'SubscriptionPolicies'},
+ 'authorization_source': {'key': 'authorizationSource', 'type': 'str'},
+ 'managed_by_tenants': {'key': 'managedByTenants', 'type': '[ManagedByTenant]'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(Subscription, self).__init__(**kwargs)
+ self.id = None
+ self.subscription_id = None
+ self.display_name = None
+ self.tenant_id = None
+ self.state = None
+ self.subscription_policies = kwargs.get('subscription_policies', None)
+ self.authorization_source = kwargs.get('authorization_source', None)
+ self.managed_by_tenants = kwargs.get('managed_by_tenants', None)
+ self.tags = kwargs.get('tags', None)
+
+
+class SubscriptionListResult(msrest.serialization.Model):
+ """Subscription list operation response.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param value: An array of subscriptions.
+ :type value: list[~azure.mgmt.resource.subscriptions.v2021_01_01.models.Subscription]
+ :param next_link: Required. The URL to get the next set of results.
+ :type next_link: str
+ """
+
+ _validation = {
+ 'next_link': {'required': True},
+ }
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[Subscription]'},
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(SubscriptionListResult, self).__init__(**kwargs)
+ self.value = kwargs.get('value', None)
+ self.next_link = kwargs['next_link']
+
+
+class SubscriptionPolicies(msrest.serialization.Model):
+ """Subscription policies.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar location_placement_id: The subscription location placement ID. The ID indicates which
+ regions are visible for a subscription. For example, a subscription with a location placement
+ Id of Public_2014-09-01 has access to Azure public regions.
+ :vartype location_placement_id: str
+ :ivar quota_id: The subscription quota ID.
+ :vartype quota_id: str
+ :ivar spending_limit: The subscription spending limit. Possible values include: "On", "Off",
+ "CurrentPeriodOff".
+ :vartype spending_limit: str or
+ ~azure.mgmt.resource.subscriptions.v2021_01_01.models.SpendingLimit
+ """
+
+ _validation = {
+ 'location_placement_id': {'readonly': True},
+ 'quota_id': {'readonly': True},
+ 'spending_limit': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'location_placement_id': {'key': 'locationPlacementId', 'type': 'str'},
+ 'quota_id': {'key': 'quotaId', 'type': 'str'},
+ 'spending_limit': {'key': 'spendingLimit', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(SubscriptionPolicies, self).__init__(**kwargs)
+ self.location_placement_id = None
+ self.quota_id = None
+ self.spending_limit = None
+
+
+class TenantIdDescription(msrest.serialization.Model):
+ """Tenant Id information.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: The fully qualified ID of the tenant. For example,
+ /tenants/00000000-0000-0000-0000-000000000000.
+ :vartype id: str
+ :ivar tenant_id: The tenant ID. For example, 00000000-0000-0000-0000-000000000000.
+ :vartype tenant_id: str
+ :ivar tenant_category: Category of the tenant. Possible values include: "Home", "ProjectedBy",
+ "ManagedBy".
+ :vartype tenant_category: str or
+ ~azure.mgmt.resource.subscriptions.v2021_01_01.models.TenantCategory
+ :ivar country: Country/region name of the address for the tenant.
+ :vartype country: str
+ :ivar country_code: Country/region abbreviation for the tenant.
+ :vartype country_code: str
+ :ivar display_name: The display name of the tenant.
+ :vartype display_name: str
+ :ivar domains: The list of domains for the tenant.
+ :vartype domains: list[str]
+ :ivar default_domain: The default domain for the tenant.
+ :vartype default_domain: str
+ :ivar tenant_type: The tenant type. Only available for 'Home' tenant category.
+ :vartype tenant_type: str
+ :ivar tenant_branding_logo_url: The tenant's branding logo URL. Only available for 'Home'
+ tenant category.
+ :vartype tenant_branding_logo_url: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ 'tenant_category': {'readonly': True},
+ 'country': {'readonly': True},
+ 'country_code': {'readonly': True},
+ 'display_name': {'readonly': True},
+ 'domains': {'readonly': True},
+ 'default_domain': {'readonly': True},
+ 'tenant_type': {'readonly': True},
+ 'tenant_branding_logo_url': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ 'tenant_category': {'key': 'tenantCategory', 'type': 'str'},
+ 'country': {'key': 'country', 'type': 'str'},
+ 'country_code': {'key': 'countryCode', 'type': 'str'},
+ 'display_name': {'key': 'displayName', 'type': 'str'},
+ 'domains': {'key': 'domains', 'type': '[str]'},
+ 'default_domain': {'key': 'defaultDomain', 'type': 'str'},
+ 'tenant_type': {'key': 'tenantType', 'type': 'str'},
+ 'tenant_branding_logo_url': {'key': 'tenantBrandingLogoUrl', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(TenantIdDescription, self).__init__(**kwargs)
+ self.id = None
+ self.tenant_id = None
+ self.tenant_category = None
+ self.country = None
+ self.country_code = None
+ self.display_name = None
+ self.domains = None
+ self.default_domain = None
+ self.tenant_type = None
+ self.tenant_branding_logo_url = None
+
+
+class TenantListResult(msrest.serialization.Model):
+ """Tenant Ids information.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param value: An array of tenants.
+ :type value: list[~azure.mgmt.resource.subscriptions.v2021_01_01.models.TenantIdDescription]
+ :param next_link: Required. The URL to use for getting the next set of results.
+ :type next_link: str
+ """
+
+ _validation = {
+ 'next_link': {'required': True},
+ }
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[TenantIdDescription]'},
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(TenantListResult, self).__init__(**kwargs)
+ self.value = kwargs.get('value', None)
+ self.next_link = kwargs['next_link']
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/models/_models_py3.py
new file mode 100644
index 000000000000..c49a2740875b
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/models/_models_py3.py
@@ -0,0 +1,693 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code 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, Union
+
+import msrest.serialization
+
+from ._subscription_client_enums import *
+
+
+class CheckResourceNameResult(msrest.serialization.Model):
+ """Resource Name valid if not a reserved word, does not contain a reserved word and does not start with a reserved word.
+
+ :param name: Name of Resource.
+ :type name: str
+ :param type: Type of Resource.
+ :type type: str
+ :param status: Is the resource name Allowed or Reserved. Possible values include: "Allowed",
+ "Reserved".
+ :type status: str or ~azure.mgmt.resource.subscriptions.v2021_01_01.models.ResourceNameStatus
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'status': {'key': 'status', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ type: Optional[str] = None,
+ status: Optional[Union[str, "ResourceNameStatus"]] = None,
+ **kwargs
+ ):
+ super(CheckResourceNameResult, self).__init__(**kwargs)
+ self.name = name
+ self.type = type
+ self.status = status
+
+
+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 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.).
+
+ 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.resource.subscriptions.v2021_01_01.models.ErrorResponse]
+ :ivar additional_info: The error additional info.
+ :vartype additional_info:
+ list[~azure.mgmt.resource.subscriptions.v2021_01_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': '[ErrorResponse]'},
+ 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ErrorResponse, self).__init__(**kwargs)
+ self.code = None
+ self.message = None
+ self.target = None
+ self.details = None
+ self.additional_info = None
+
+
+class Location(msrest.serialization.Model):
+ """Location information.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: The fully qualified ID of the location. For example,
+ /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus.
+ :vartype id: str
+ :ivar subscription_id: The subscription ID.
+ :vartype subscription_id: str
+ :ivar name: The location name.
+ :vartype name: str
+ :ivar type: The location type. Possible values include: "Region", "EdgeZone".
+ :vartype type: str or ~azure.mgmt.resource.subscriptions.v2021_01_01.models.LocationType
+ :ivar display_name: The display name of the location.
+ :vartype display_name: str
+ :ivar regional_display_name: The display name of the location and its region.
+ :vartype regional_display_name: str
+ :param metadata: Metadata of the location, such as lat/long, paired region, and others.
+ :type metadata: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.LocationMetadata
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'subscription_id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'display_name': {'readonly': True},
+ 'regional_display_name': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'subscription_id': {'key': 'subscriptionId', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'display_name': {'key': 'displayName', 'type': 'str'},
+ 'regional_display_name': {'key': 'regionalDisplayName', 'type': 'str'},
+ 'metadata': {'key': 'metadata', 'type': 'LocationMetadata'},
+ }
+
+ def __init__(
+ self,
+ *,
+ metadata: Optional["LocationMetadata"] = None,
+ **kwargs
+ ):
+ super(Location, self).__init__(**kwargs)
+ self.id = None
+ self.subscription_id = None
+ self.name = None
+ self.type = None
+ self.display_name = None
+ self.regional_display_name = None
+ self.metadata = metadata
+
+
+class LocationListResult(msrest.serialization.Model):
+ """Location list operation response.
+
+ :param value: An array of locations.
+ :type value: list[~azure.mgmt.resource.subscriptions.v2021_01_01.models.Location]
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[Location]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ value: Optional[List["Location"]] = None,
+ **kwargs
+ ):
+ super(LocationListResult, self).__init__(**kwargs)
+ self.value = value
+
+
+class LocationMetadata(msrest.serialization.Model):
+ """Location metadata information.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar region_type: The type of the region. Possible values include: "Physical", "Logical".
+ :vartype region_type: str or ~azure.mgmt.resource.subscriptions.v2021_01_01.models.RegionType
+ :ivar region_category: The category of the region. Possible values include: "Recommended",
+ "Extended", "Other".
+ :vartype region_category: str or
+ ~azure.mgmt.resource.subscriptions.v2021_01_01.models.RegionCategory
+ :ivar geography_group: The geography group of the location.
+ :vartype geography_group: str
+ :ivar longitude: The longitude of the location.
+ :vartype longitude: str
+ :ivar latitude: The latitude of the location.
+ :vartype latitude: str
+ :ivar physical_location: The physical location of the Azure location.
+ :vartype physical_location: str
+ :param paired_region: The regions paired to this region.
+ :type paired_region: list[~azure.mgmt.resource.subscriptions.v2021_01_01.models.PairedRegion]
+ :ivar home_location: The home location of an edge zone.
+ :vartype home_location: str
+ """
+
+ _validation = {
+ 'region_type': {'readonly': True},
+ 'region_category': {'readonly': True},
+ 'geography_group': {'readonly': True},
+ 'longitude': {'readonly': True},
+ 'latitude': {'readonly': True},
+ 'physical_location': {'readonly': True},
+ 'home_location': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'region_type': {'key': 'regionType', 'type': 'str'},
+ 'region_category': {'key': 'regionCategory', 'type': 'str'},
+ 'geography_group': {'key': 'geographyGroup', 'type': 'str'},
+ 'longitude': {'key': 'longitude', 'type': 'str'},
+ 'latitude': {'key': 'latitude', 'type': 'str'},
+ 'physical_location': {'key': 'physicalLocation', 'type': 'str'},
+ 'paired_region': {'key': 'pairedRegion', 'type': '[PairedRegion]'},
+ 'home_location': {'key': 'homeLocation', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ paired_region: Optional[List["PairedRegion"]] = None,
+ **kwargs
+ ):
+ super(LocationMetadata, self).__init__(**kwargs)
+ self.region_type = None
+ self.region_category = None
+ self.geography_group = None
+ self.longitude = None
+ self.latitude = None
+ self.physical_location = None
+ self.paired_region = paired_region
+ self.home_location = None
+
+
+class ManagedByTenant(msrest.serialization.Model):
+ """Information about a tenant managing the subscription.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar tenant_id: The tenant ID of the managing tenant. This is a GUID.
+ :vartype tenant_id: str
+ """
+
+ _validation = {
+ 'tenant_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ManagedByTenant, self).__init__(**kwargs)
+ self.tenant_id = None
+
+
+class Operation(msrest.serialization.Model):
+ """Microsoft.Resources operation.
+
+ :param name: Operation name: {provider}/{resource}/{operation}.
+ :type name: str
+ :param display: The object that represents the operation.
+ :type display: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.OperationDisplay
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'display': {'key': 'display', 'type': 'OperationDisplay'},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ display: Optional["OperationDisplay"] = None,
+ **kwargs
+ ):
+ super(Operation, self).__init__(**kwargs)
+ self.name = name
+ self.display = display
+
+
+class OperationDisplay(msrest.serialization.Model):
+ """The object that represents the operation.
+
+ :param provider: Service provider: Microsoft.Resources.
+ :type provider: str
+ :param resource: Resource on which the operation is performed: Profile, endpoint, etc.
+ :type resource: str
+ :param operation: Operation type: Read, write, 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 Microsoft.Resources operations. It contains a list of operations and a URL link to get the next set of results.
+
+ :param value: List of Microsoft.Resources operations.
+ :type value: list[~azure.mgmt.resource.subscriptions.v2021_01_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 PairedRegion(msrest.serialization.Model):
+ """Information regarding paired region.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar name: The name of the paired region.
+ :vartype name: str
+ :ivar id: The fully qualified ID of the location. For example,
+ /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus.
+ :vartype id: str
+ :ivar subscription_id: The subscription ID.
+ :vartype subscription_id: str
+ """
+
+ _validation = {
+ 'name': {'readonly': True},
+ 'id': {'readonly': True},
+ 'subscription_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'id': {'key': 'id', 'type': 'str'},
+ 'subscription_id': {'key': 'subscriptionId', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(PairedRegion, self).__init__(**kwargs)
+ self.name = None
+ self.id = None
+ self.subscription_id = None
+
+
+class ResourceName(msrest.serialization.Model):
+ """Name and Type of the Resource.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: Required. Name of the resource.
+ :type name: str
+ :param type: Required. The type of the resource.
+ :type type: str
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'type': {'required': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: str,
+ type: str,
+ **kwargs
+ ):
+ super(ResourceName, self).__init__(**kwargs)
+ self.name = name
+ self.type = type
+
+
+class Subscription(msrest.serialization.Model):
+ """Subscription information.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: The fully qualified ID for the subscription. For example,
+ /subscriptions/00000000-0000-0000-0000-000000000000.
+ :vartype id: str
+ :ivar subscription_id: The subscription ID.
+ :vartype subscription_id: str
+ :ivar display_name: The subscription display name.
+ :vartype display_name: str
+ :ivar tenant_id: The subscription tenant ID.
+ :vartype tenant_id: str
+ :ivar state: The subscription state. Possible values are Enabled, Warned, PastDue, Disabled,
+ and Deleted. Possible values include: "Enabled", "Warned", "PastDue", "Disabled", "Deleted".
+ :vartype state: str or ~azure.mgmt.resource.subscriptions.v2021_01_01.models.SubscriptionState
+ :param subscription_policies: The subscription policies.
+ :type subscription_policies:
+ ~azure.mgmt.resource.subscriptions.v2021_01_01.models.SubscriptionPolicies
+ :param authorization_source: The authorization source of the request. Valid values are one or
+ more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy,
+ RoleBased'.
+ :type authorization_source: str
+ :param managed_by_tenants: An array containing the tenants managing the subscription.
+ :type managed_by_tenants:
+ list[~azure.mgmt.resource.subscriptions.v2021_01_01.models.ManagedByTenant]
+ :param tags: A set of tags. The tags attached to the subscription.
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'subscription_id': {'readonly': True},
+ 'display_name': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ 'state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'subscription_id': {'key': 'subscriptionId', 'type': 'str'},
+ 'display_name': {'key': 'displayName', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ 'state': {'key': 'state', 'type': 'str'},
+ 'subscription_policies': {'key': 'subscriptionPolicies', 'type': 'SubscriptionPolicies'},
+ 'authorization_source': {'key': 'authorizationSource', 'type': 'str'},
+ 'managed_by_tenants': {'key': 'managedByTenants', 'type': '[ManagedByTenant]'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(
+ self,
+ *,
+ subscription_policies: Optional["SubscriptionPolicies"] = None,
+ authorization_source: Optional[str] = None,
+ managed_by_tenants: Optional[List["ManagedByTenant"]] = None,
+ tags: Optional[Dict[str, str]] = None,
+ **kwargs
+ ):
+ super(Subscription, self).__init__(**kwargs)
+ self.id = None
+ self.subscription_id = None
+ self.display_name = None
+ self.tenant_id = None
+ self.state = None
+ self.subscription_policies = subscription_policies
+ self.authorization_source = authorization_source
+ self.managed_by_tenants = managed_by_tenants
+ self.tags = tags
+
+
+class SubscriptionListResult(msrest.serialization.Model):
+ """Subscription list operation response.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param value: An array of subscriptions.
+ :type value: list[~azure.mgmt.resource.subscriptions.v2021_01_01.models.Subscription]
+ :param next_link: Required. The URL to get the next set of results.
+ :type next_link: str
+ """
+
+ _validation = {
+ 'next_link': {'required': True},
+ }
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[Subscription]'},
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ next_link: str,
+ value: Optional[List["Subscription"]] = None,
+ **kwargs
+ ):
+ super(SubscriptionListResult, self).__init__(**kwargs)
+ self.value = value
+ self.next_link = next_link
+
+
+class SubscriptionPolicies(msrest.serialization.Model):
+ """Subscription policies.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar location_placement_id: The subscription location placement ID. The ID indicates which
+ regions are visible for a subscription. For example, a subscription with a location placement
+ Id of Public_2014-09-01 has access to Azure public regions.
+ :vartype location_placement_id: str
+ :ivar quota_id: The subscription quota ID.
+ :vartype quota_id: str
+ :ivar spending_limit: The subscription spending limit. Possible values include: "On", "Off",
+ "CurrentPeriodOff".
+ :vartype spending_limit: str or
+ ~azure.mgmt.resource.subscriptions.v2021_01_01.models.SpendingLimit
+ """
+
+ _validation = {
+ 'location_placement_id': {'readonly': True},
+ 'quota_id': {'readonly': True},
+ 'spending_limit': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'location_placement_id': {'key': 'locationPlacementId', 'type': 'str'},
+ 'quota_id': {'key': 'quotaId', 'type': 'str'},
+ 'spending_limit': {'key': 'spendingLimit', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(SubscriptionPolicies, self).__init__(**kwargs)
+ self.location_placement_id = None
+ self.quota_id = None
+ self.spending_limit = None
+
+
+class TenantIdDescription(msrest.serialization.Model):
+ """Tenant Id information.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: The fully qualified ID of the tenant. For example,
+ /tenants/00000000-0000-0000-0000-000000000000.
+ :vartype id: str
+ :ivar tenant_id: The tenant ID. For example, 00000000-0000-0000-0000-000000000000.
+ :vartype tenant_id: str
+ :ivar tenant_category: Category of the tenant. Possible values include: "Home", "ProjectedBy",
+ "ManagedBy".
+ :vartype tenant_category: str or
+ ~azure.mgmt.resource.subscriptions.v2021_01_01.models.TenantCategory
+ :ivar country: Country/region name of the address for the tenant.
+ :vartype country: str
+ :ivar country_code: Country/region abbreviation for the tenant.
+ :vartype country_code: str
+ :ivar display_name: The display name of the tenant.
+ :vartype display_name: str
+ :ivar domains: The list of domains for the tenant.
+ :vartype domains: list[str]
+ :ivar default_domain: The default domain for the tenant.
+ :vartype default_domain: str
+ :ivar tenant_type: The tenant type. Only available for 'Home' tenant category.
+ :vartype tenant_type: str
+ :ivar tenant_branding_logo_url: The tenant's branding logo URL. Only available for 'Home'
+ tenant category.
+ :vartype tenant_branding_logo_url: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ 'tenant_category': {'readonly': True},
+ 'country': {'readonly': True},
+ 'country_code': {'readonly': True},
+ 'display_name': {'readonly': True},
+ 'domains': {'readonly': True},
+ 'default_domain': {'readonly': True},
+ 'tenant_type': {'readonly': True},
+ 'tenant_branding_logo_url': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ 'tenant_category': {'key': 'tenantCategory', 'type': 'str'},
+ 'country': {'key': 'country', 'type': 'str'},
+ 'country_code': {'key': 'countryCode', 'type': 'str'},
+ 'display_name': {'key': 'displayName', 'type': 'str'},
+ 'domains': {'key': 'domains', 'type': '[str]'},
+ 'default_domain': {'key': 'defaultDomain', 'type': 'str'},
+ 'tenant_type': {'key': 'tenantType', 'type': 'str'},
+ 'tenant_branding_logo_url': {'key': 'tenantBrandingLogoUrl', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(TenantIdDescription, self).__init__(**kwargs)
+ self.id = None
+ self.tenant_id = None
+ self.tenant_category = None
+ self.country = None
+ self.country_code = None
+ self.display_name = None
+ self.domains = None
+ self.default_domain = None
+ self.tenant_type = None
+ self.tenant_branding_logo_url = None
+
+
+class TenantListResult(msrest.serialization.Model):
+ """Tenant Ids information.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param value: An array of tenants.
+ :type value: list[~azure.mgmt.resource.subscriptions.v2021_01_01.models.TenantIdDescription]
+ :param next_link: Required. The URL to use for getting the next set of results.
+ :type next_link: str
+ """
+
+ _validation = {
+ 'next_link': {'required': True},
+ }
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[TenantIdDescription]'},
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ next_link: str,
+ value: Optional[List["TenantIdDescription"]] = None,
+ **kwargs
+ ):
+ super(TenantListResult, self).__init__(**kwargs)
+ self.value = value
+ self.next_link = next_link
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/models/_subscription_client_enums.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/models/_subscription_client_enums.py
new file mode 100644
index 000000000000..ef07d8424e15
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/models/_subscription_client_enums.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 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 LocationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """The location type.
+ """
+
+ REGION = "Region"
+ EDGE_ZONE = "EdgeZone"
+
+class RegionCategory(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """The category of the region.
+ """
+
+ RECOMMENDED = "Recommended"
+ EXTENDED = "Extended"
+ OTHER = "Other"
+
+class RegionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """The type of the region.
+ """
+
+ PHYSICAL = "Physical"
+ LOGICAL = "Logical"
+
+class ResourceNameStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """Is the resource name Allowed or Reserved
+ """
+
+ ALLOWED = "Allowed"
+ RESERVED = "Reserved"
+
+class SpendingLimit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """The subscription spending limit.
+ """
+
+ ON = "On"
+ OFF = "Off"
+ CURRENT_PERIOD_OFF = "CurrentPeriodOff"
+
+class SubscriptionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted.
+ """
+
+ ENABLED = "Enabled"
+ WARNED = "Warned"
+ PAST_DUE = "PastDue"
+ DISABLED = "Disabled"
+ DELETED = "Deleted"
+
+class TenantCategory(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """Category of the tenant.
+ """
+
+ HOME = "Home"
+ PROJECTED_BY = "ProjectedBy"
+ MANAGED_BY = "ManagedBy"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/operations/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/operations/__init__.py
new file mode 100644
index 000000000000..2547a9583d70
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_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 ._subscriptions_operations import SubscriptionsOperations
+from ._tenants_operations import TenantsOperations
+from ._subscription_client_operations import SubscriptionClientOperationsMixin
+
+__all__ = [
+ 'SubscriptionsOperations',
+ 'TenantsOperations',
+ 'SubscriptionClientOperationsMixin',
+]
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/operations/_subscription_client_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/operations/_subscription_client_operations.py
new file mode 100644
index 000000000000..2f4de44a2ab3
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/operations/_subscription_client_operations.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.
+# Code 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 SubscriptionClientOperationsMixin(object):
+
+ def check_resource_name(
+ self,
+ resource_name_definition=None, # type: Optional["_models.ResourceName"]
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "_models.CheckResourceNameResult"
+ """Checks resource name validity.
+
+ A resource name is valid if it is not a reserved word, does not contains a reserved word and
+ does not start with a reserved word.
+
+ :param resource_name_definition: Resource object with values for resource name and resource
+ type.
+ :type resource_name_definition: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.ResourceName
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: CheckResourceNameResult, or the result of cls(response)
+ :rtype: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.CheckResourceNameResult
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckResourceNameResult"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2021-01-01"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.check_resource_name.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['Content-Type'] = 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 resource_name_definition is not None:
+ body_content = self._serialize.body(resource_name_definition, 'ResourceName')
+ 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)
+
+ deserialized = self._deserialize('CheckResourceNameResult', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ check_resource_name.metadata = {'url': '/providers/Microsoft.Resources/checkResourceName'} # type: ignore
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/operations/_subscriptions_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/operations/_subscriptions_operations.py
new file mode 100644
index 000000000000..a5a0667243c2
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/operations/_subscriptions_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.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 SubscriptionsOperations(object):
+ """SubscriptionsOperations operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~azure.mgmt.resource.subscriptions.v2021_01_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_locations(
+ self,
+ subscription_id, # type: str
+ include_extended_locations=None, # type: Optional[bool]
+ **kwargs # type: Any
+ ):
+ # type: (...) -> Iterable["_models.LocationListResult"]
+ """Gets all available geo-locations.
+
+ This operation provides all the locations that are available for resource providers; however,
+ each resource provider may support a subset of this list.
+
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :param include_extended_locations: Whether to include extended locations.
+ :type include_extended_locations: bool
+ :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.resource.subscriptions.v2021_01_01.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-01-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_locations.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ if include_extended_locations is not None:
+ query_parameters['includeExtendedLocations'] = self._serialize.query("include_extended_locations", include_extended_locations, 'bool')
+
+ request = self._client.get(url, query_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_locations.metadata = {'url': '/subscriptions/{subscriptionId}/locations'} # type: ignore
+
+ def get(
+ self,
+ subscription_id, # type: str
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "_models.Subscription"
+ """Gets details about a specified subscription.
+
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: Subscription, or the result of cls(response)
+ :rtype: ~azure.mgmt.resource.subscriptions.v2021_01_01.models.Subscription
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.Subscription"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2021-01-01"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # 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('Subscription', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}'} # type: ignore
+
+ def list(
+ self,
+ **kwargs # type: Any
+ ):
+ # type: (...) -> Iterable["_models.SubscriptionListResult"]
+ """Gets all subscriptions for a tenant.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either SubscriptionListResult or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.resource.subscriptions.v2021_01_01.models.SubscriptionListResult]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionListResult"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2021-01-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('SubscriptionListResult', 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'} # type: ignore
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/operations/_tenants_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/operations/_tenants_operations.py
new file mode 100644
index 000000000000..904300d56211
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/operations/_tenants_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 TenantsOperations(object):
+ """TenantsOperations operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~azure.mgmt.resource.subscriptions.v2021_01_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.TenantListResult"]
+ """Gets the tenants for your account.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either TenantListResult or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.resource.subscriptions.v2021_01_01.models.TenantListResult]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.TenantListResult"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2021-01-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('TenantListResult', 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': '/tenants'} # type: ignore
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/py.typed b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/py.typed
new file mode 100644
index 000000000000..e5aff4f83af8
--- /dev/null
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/py.typed
@@ -0,0 +1 @@
+# Marker file for PEP 561.
\ No newline at end of file
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/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 = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/_version.py
index 232662316d4d..e5754a47ce68 100644
--- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/_version.py
+++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "19.0.0"
+VERSION = "1.0.0b1"