Skip to content

Commit

Permalink
CodeGen from PR 21203 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
 New API version for Microsoft.Resources stable/2022-09-01 (Azure#21203)

* Base commit for new API version

* Rename folder to new API version

* Update API version for all files in new API version folder

* Add a 202 response for tags PUPT/PATCH/DELETE operations

* Change API version from 2022-11-01 to 2022-09-01

* Add new examples and update existing examples

* Add Location headers to 202 response

* Suppress system data error for tags scope APIs

* Make supression more specific by adding TagsResource to 'where' clause

* Fix suppression for tags in readme.md
  • Loading branch information
SDKAuto committed Nov 14, 2022
1 parent c8ebd81 commit 5f6e1d1
Show file tree
Hide file tree
Showing 402 changed files with 6,749 additions and 5,042 deletions.
8 changes: 4 additions & 4 deletions sdk/resources/azure-mgmt-resource/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "2097e719fdba665954e057d57bef61766a013218",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.1.11",
"@autorest/python@6.2.1",
"@autorest/modelerfour@4.24.3"
],
"commit": "68847d6ae901f0cb2efa62ae2c523ad8cf5c2ea3",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/resources/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.1.11 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/resources/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.2.1 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"readme": "specification/resources/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = ["ChangesClient"]
__all__ = [
"ChangesClient",
]
__all__.extend([p for p in _patch_all if p not in __all__])

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import sys
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -14,6 +15,11 @@

from ._version import VERSION

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
Expand All @@ -37,7 +43,7 @@ class ChangesClientConfiguration(Configuration): # pylint: disable=too-many-ins

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(ChangesClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop("api_version", "2022-05-01") # type: str
api_version = kwargs.pop("api_version", "2022-05-01") # type: Literal["2022-05-01"]

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@
"operation_groups": {
"changes": "ChangesOperations"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "21.2.1"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = ["ChangesClient"]
__all__ = [
"ChangesClient",
]
__all__.extend([p for p in _patch_all if p not in __all__])

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import sys
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -14,6 +15,11 @@

from .._version import VERSION

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential
Expand All @@ -37,7 +43,7 @@ class ChangesClientConfiguration(Configuration): # pylint: disable=too-many-ins

def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(ChangesClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop("api_version", "2022-05-01") # type: str
api_version = kwargs.pop("api_version", "2022-05-01") # type: Literal["2022-05-01"]

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
import urllib.parse

Expand All @@ -30,6 +31,10 @@
from ..._vendor import _convert_request
from ...operations._operations import build_changes_get_request, build_changes_list_request

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -88,7 +93,7 @@ def list(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str
api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: Literal["2022-05-01"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.ChangeResourceListResult]

error_map = {
Expand Down Expand Up @@ -200,7 +205,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str
api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: Literal["2022-05-01"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.ChangeResourceResult]

request = build_changes_get_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
import urllib.parse

Expand All @@ -29,6 +30,10 @@
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]

Expand All @@ -50,7 +55,7 @@ def build_changes_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str
api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: Literal["2022-05-01"]
accept = _headers.pop("Accept", "application/json")

# Construct URL
Expand Down Expand Up @@ -93,7 +98,7 @@ def build_changes_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str
api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: Literal["2022-05-01"]
accept = _headers.pop("Accept", "application/json")

# Construct URL
Expand Down Expand Up @@ -175,7 +180,7 @@ def list(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str
api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: Literal["2022-05-01"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.ChangeResourceListResult]

error_map = {
Expand Down Expand Up @@ -287,7 +292,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str
api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: Literal["2022-05-01"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.ChangeResourceResult]

request = build_changes_get_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = ["DeploymentScriptsClient"]
__all__ = [
"DeploymentScriptsClient",
]
__all__.extend([p for p in _patch_all if p not in __all__])

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import sys
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -14,6 +15,11 @@

from ._version import VERSION

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
Expand All @@ -37,7 +43,7 @@ class DeploymentScriptsClientConfiguration(Configuration): # pylint: disable=to

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(DeploymentScriptsClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop("api_version", "2019-10-01-preview") # type: str
api_version = kwargs.pop("api_version", "2019-10-01-preview") # type: Literal["2019-10-01-preview"]

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@
"operation_groups": {
"deployment_scripts": "DeploymentScriptsOperations"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "21.2.1"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = ["DeploymentScriptsClient"]
__all__ = [
"DeploymentScriptsClient",
]
__all__.extend([p for p in _patch_all if p not in __all__])

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import sys
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -14,6 +15,11 @@

from .._version import VERSION

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential
Expand All @@ -37,7 +43,7 @@ class DeploymentScriptsClientConfiguration(Configuration): # pylint: disable=to

def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(DeploymentScriptsClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop("api_version", "2019-10-01-preview") # type: str
api_version = kwargs.pop("api_version", "2019-10-01-preview") # type: Literal["2019-10-01-preview"]

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Loading

0 comments on commit 5f6e1d1

Please sign in to comment.