Skip to content

Commit

Permalink
CodeGen from PR 14254 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Fix force delete query parameter (Azure#14254)

* remove name validation from client side

* remove name check from deploymentScripts swagger

* remove name check from previous swagger versions

* remove pattern from resourcegroupname parameter

* Fix force deletion query parameter

* add forceDeletionTypes to newer swagger
  • Loading branch information
SDKAuto committed May 19, 2021
1 parent 18f4f5c commit 7997395
Show file tree
Hide file tree
Showing 46 changed files with 96 additions and 60 deletions.
6 changes: 3 additions & 3 deletions sdk/resources/azure-mgmt-resource/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"autorest": "3.3.0",
"autorest": "3.4.2",
"use": "@autorest/[email protected]",
"commit": "14d2ddf809ea5c8ce9d6017b5ab1aca96df05643",
"commit": "6816683ce2d163a8ba62f426202fdcfbe7b68e35",
"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/[email protected] --version=3.3.0",
"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/[email protected] --version=3.4.2",
"readme": "specification/resources/resource-manager/readme.md"
}
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ async def create_or_update(
async def _delete_initial(
self,
resource_group_name: str,
force_deletion_resource_types: Optional[str] = None,
force_deletion_types: Optional[str] = None,
**kwargs
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
Expand All @@ -188,8 +188,8 @@ async def _delete_initial(

# Construct parameters
query_parameters = {} # type: Dict[str, Any]
if force_deletion_resource_types is not None:
query_parameters['forceDeletionResourceTypes'] = self._serialize.query("force_deletion_resource_types", force_deletion_resource_types, 'str')
if force_deletion_types is not None:
query_parameters['forceDeletionTypes'] = self._serialize.query("force_deletion_types", force_deletion_types, 'str')
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

# Construct headers
Expand All @@ -212,7 +212,7 @@ async def _delete_initial(
async def begin_delete(
self,
resource_group_name: str,
force_deletion_resource_types: Optional[str] = None,
force_deletion_types: Optional[str] = None,
**kwargs
) -> AsyncLROPoller[None]:
"""Deletes a resource group.
Expand All @@ -223,10 +223,10 @@ async def begin_delete(
:param resource_group_name: The name of the resource group to delete. The name is case
insensitive.
:type resource_group_name: str
:param force_deletion_resource_types: The resource types you want to force delete. Currently,
only the following is supported:
forceDeletionResourceTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets.
:type force_deletion_resource_types: str
:param force_deletion_types: The resource types you want to force delete. Currently, only the
following is supported:
forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets.
:type force_deletion_types: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
Expand All @@ -247,7 +247,7 @@ async def begin_delete(
if cont_token is None:
raw_result = await self._delete_initial(
resource_group_name=resource_group_name,
force_deletion_resource_types=force_deletion_resource_types,
force_deletion_types=force_deletion_types,
cls=lambda x,y,z: x,
**kwargs
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def create_or_update(
def _delete_initial(
self,
resource_group_name, # type: str
force_deletion_resource_types=None, # type: Optional[str]
force_deletion_types=None, # type: Optional[str]
**kwargs # type: Any
):
# type: (...) -> None
Expand All @@ -195,8 +195,8 @@ def _delete_initial(

# Construct parameters
query_parameters = {} # type: Dict[str, Any]
if force_deletion_resource_types is not None:
query_parameters['forceDeletionResourceTypes'] = self._serialize.query("force_deletion_resource_types", force_deletion_resource_types, 'str')
if force_deletion_types is not None:
query_parameters['forceDeletionTypes'] = self._serialize.query("force_deletion_types", force_deletion_types, 'str')
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

# Construct headers
Expand All @@ -219,7 +219,7 @@ def _delete_initial(
def begin_delete(
self,
resource_group_name, # type: str
force_deletion_resource_types=None, # type: Optional[str]
force_deletion_types=None, # type: Optional[str]
**kwargs # type: Any
):
# type: (...) -> LROPoller[None]
Expand All @@ -231,10 +231,10 @@ def begin_delete(
:param resource_group_name: The name of the resource group to delete. The name is case
insensitive.
:type resource_group_name: str
:param force_deletion_resource_types: The resource types you want to force delete. Currently,
only the following is supported:
forceDeletionResourceTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets.
:type force_deletion_resource_types: str
:param force_deletion_types: The resource types you want to force delete. Currently, only the
following is supported:
forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets.
:type force_deletion_types: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: Pass in True if you'd like the ARMPolling polling method,
Expand All @@ -255,7 +255,7 @@ def begin_delete(
if cont_token is None:
raw_result = self._delete_initial(
resource_group_name=resource_group_name,
force_deletion_resource_types=force_deletion_resource_types,
force_deletion_types=force_deletion_types,
cls=lambda x,y,z: x,
**kwargs
)
Expand Down
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 = "17.0.0"
VERSION = "1.0.0b1"
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 = "17.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ async def create_or_update(
async def _delete_initial(
self,
resource_group_name: str,
force_deletion_types: Optional[str] = None,
**kwargs
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
Expand All @@ -187,6 +188,8 @@ async def _delete_initial(

# Construct parameters
query_parameters = {} # type: Dict[str, Any]
if force_deletion_types is not None:
query_parameters['forceDeletionTypes'] = self._serialize.query("force_deletion_types", force_deletion_types, 'str')
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

# Construct headers
Expand All @@ -209,6 +212,7 @@ async def _delete_initial(
async def begin_delete(
self,
resource_group_name: str,
force_deletion_types: Optional[str] = None,
**kwargs
) -> AsyncLROPoller[None]:
"""Deletes a resource group.
Expand All @@ -219,6 +223,10 @@ async def begin_delete(
:param resource_group_name: The name of the resource group to delete. The name is case
insensitive.
:type resource_group_name: str
:param force_deletion_types: The resource types you want to force delete. Currently, only the
following is supported:
forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets.
:type force_deletion_types: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
Expand All @@ -239,6 +247,7 @@ async def begin_delete(
if cont_token is None:
raw_result = await self._delete_initial(
resource_group_name=resource_group_name,
force_deletion_types=force_deletion_types,
cls=lambda x,y,z: x,
**kwargs
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def create_or_update(
def _delete_initial(
self,
resource_group_name, # type: str
force_deletion_types=None, # type: Optional[str]
**kwargs # type: Any
):
# type: (...) -> None
Expand All @@ -194,6 +195,8 @@ def _delete_initial(

# Construct parameters
query_parameters = {} # type: Dict[str, Any]
if force_deletion_types is not None:
query_parameters['forceDeletionTypes'] = self._serialize.query("force_deletion_types", force_deletion_types, 'str')
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

# Construct headers
Expand All @@ -216,6 +219,7 @@ def _delete_initial(
def begin_delete(
self,
resource_group_name, # type: str
force_deletion_types=None, # type: Optional[str]
**kwargs # type: Any
):
# type: (...) -> LROPoller[None]
Expand All @@ -227,6 +231,10 @@ def begin_delete(
:param resource_group_name: The name of the resource group to delete. The name is case
insensitive.
:type resource_group_name: str
:param force_deletion_types: The resource types you want to force delete. Currently, only the
following is supported:
forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets.
:type force_deletion_types: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: Pass in True if you'd like the ARMPolling polling method,
Expand All @@ -247,6 +255,7 @@ def begin_delete(
if cont_token is None:
raw_result = self._delete_initial(
resource_group_name=resource_group_name,
force_deletion_types=force_deletion_types,
cls=lambda x,y,z: x,
**kwargs
)
Expand Down
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 = "17.0.0"
VERSION = "1.0.0b1"
Loading

0 comments on commit 7997395

Please sign in to comment.