From 4bb4211d0fc6752030db642d73263759a376db7e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 7 May 2021 03:09:33 +0000 Subject: [PATCH] CodeGen from PR 14299 in Azure/azure-rest-api-specs Merge 225e4a77704766b9b6529c40c2677b22b58da9b9 into 3f1e770aa89c7d306d7cdb4f7aa852819d2f9fa8 --- .../azure-mgmt-maintenance/_meta.json | 2 +- .../azure/mgmt/maintenance/__init__.py | 4 +- .../azure/mgmt/maintenance/_configuration.py | 8 +- ...t.py => _maintenance_management_client.py} | 15 +- .../azure/mgmt/maintenance/_metadata.json | 15 +- .../azure/mgmt/maintenance/_version.py | 2 +- .../azure/mgmt/maintenance/aio/__init__.py | 4 +- .../mgmt/maintenance/aio/_configuration.py | 8 +- ...t.py => _maintenance_management_client.py} | 15 +- .../maintenance/aio/operations/__init__.py | 2 - ...ly_update_for_resource_group_operations.py | 2 +- .../operations/_apply_updates_operations.py | 10 +- .../_configuration_assignments_operations.py | 166 +---------------- ...ignments_within_subscription_operations.py | 111 ------------ ...gurations_for_resource_group_operations.py | 2 +- .../_maintenance_configurations_operations.py | 18 +- .../maintenance/aio/operations/_operations.py | 2 +- ...c_maintenance_configurations_operations.py | 6 +- .../aio/operations/_updates_operations.py | 4 +- .../azure/mgmt/maintenance/models/__init__.py | 18 +- ...> _maintenance_management_client_enums.py} | 36 ++-- .../azure/mgmt/maintenance/models/_models.py | 135 +------------- .../mgmt/maintenance/models/_models_py3.py | 158 +--------------- .../mgmt/maintenance/operations/__init__.py | 2 - ...ly_update_for_resource_group_operations.py | 2 +- .../operations/_apply_updates_operations.py | 10 +- .../_configuration_assignments_operations.py | 168 +----------------- ...ignments_within_subscription_operations.py | 116 ------------ ...gurations_for_resource_group_operations.py | 2 +- .../_maintenance_configurations_operations.py | 18 +- .../maintenance/operations/_operations.py | 2 +- ...c_maintenance_configurations_operations.py | 6 +- .../operations/_updates_operations.py | 4 +- 33 files changed, 117 insertions(+), 956 deletions(-) rename sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/{_maintenance_client.py => _maintenance_management_client.py} (88%) rename sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/{_maintenance_client.py => _maintenance_management_client.py} (88%) delete mode 100644 sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_configuration_assignments_within_subscription_operations.py rename sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/{_maintenance_client_enums.py => _maintenance_management_client_enums.py} (65%) delete mode 100644 sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_within_subscription_operations.py diff --git a/sdk/maintenance/azure-mgmt-maintenance/_meta.json b/sdk/maintenance/azure-mgmt-maintenance/_meta.json index 54e3688d7fee..11444fdafb14 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/_meta.json +++ b/sdk/maintenance/azure-mgmt-maintenance/_meta.json @@ -1,7 +1,7 @@ { "autorest": "3.3.0", "use": "@autorest/python@5.6.6", - "commit": "eb6d68be864349a8fd33d261e90bb2756e904e82", + "commit": "d613f610b7b335411c6212d644c9022992252572", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/maintenance/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.3.0", "readme": "specification/maintenance/resource-manager/readme.md" diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/__init__.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/__init__.py index 95895410e585..5102b6845a6d 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/__init__.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._maintenance_client import MaintenanceClient +from ._maintenance_management_client import MaintenanceManagementClient from ._version import VERSION __version__ = VERSION -__all__ = ['MaintenanceClient'] +__all__ = ['MaintenanceManagementClient'] try: from ._patch import patch_sdk # type: ignore diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_configuration.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_configuration.py index 8771beb8154a..7aea1f28a9bb 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_configuration.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_configuration.py @@ -21,8 +21,8 @@ from azure.core.credentials import TokenCredential -class MaintenanceClientConfiguration(Configuration): - """Configuration for MaintenanceClient. +class MaintenanceManagementClientConfiguration(Configuration): + """Configuration for MaintenanceManagementClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -44,11 +44,11 @@ def __init__( raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - super(MaintenanceClientConfiguration, self).__init__(**kwargs) + super(MaintenanceManagementClientConfiguration, self).__init__(**kwargs) self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-04-01-preview" + self.api_version = "2021-05-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-maintenance/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_maintenance_client.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_maintenance_management_client.py similarity index 88% rename from sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_maintenance_client.py rename to sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_maintenance_management_client.py index c31c1c42f71e..da5a8c0719d1 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_maintenance_client.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_maintenance_management_client.py @@ -18,21 +18,20 @@ from azure.core.credentials import TokenCredential from azure.core.pipeline.transport import HttpRequest, HttpResponse -from ._configuration import MaintenanceClientConfiguration +from ._configuration import MaintenanceManagementClientConfiguration from .operations import PublicMaintenanceConfigurationsOperations from .operations import ApplyUpdatesOperations from .operations import ConfigurationAssignmentsOperations from .operations import MaintenanceConfigurationsOperations from .operations import MaintenanceConfigurationsForResourceGroupOperations from .operations import ApplyUpdateForResourceGroupOperations -from .operations import ConfigurationAssignmentsWithinSubscriptionOperations from .operations import Operations from .operations import UpdatesOperations from . import models -class MaintenanceClient(object): - """Maintenance Client. +class MaintenanceManagementClient(object): + """Azure Maintenance Management Client. :ivar public_maintenance_configurations: PublicMaintenanceConfigurationsOperations operations :vartype public_maintenance_configurations: azure.mgmt.maintenance.operations.PublicMaintenanceConfigurationsOperations @@ -46,8 +45,6 @@ class MaintenanceClient(object): :vartype maintenance_configurations_for_resource_group: azure.mgmt.maintenance.operations.MaintenanceConfigurationsForResourceGroupOperations :ivar apply_update_for_resource_group: ApplyUpdateForResourceGroupOperations operations :vartype apply_update_for_resource_group: azure.mgmt.maintenance.operations.ApplyUpdateForResourceGroupOperations - :ivar configuration_assignments_within_subscription: ConfigurationAssignmentsWithinSubscriptionOperations operations - :vartype configuration_assignments_within_subscription: azure.mgmt.maintenance.operations.ConfigurationAssignmentsWithinSubscriptionOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.maintenance.operations.Operations :ivar updates: UpdatesOperations operations @@ -69,7 +66,7 @@ def __init__( # type: (...) -> None if not base_url: base_url = 'https://management.azure.com' - self._config = MaintenanceClientConfiguration(credential, subscription_id, **kwargs) + self._config = MaintenanceManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -89,8 +86,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.apply_update_for_resource_group = ApplyUpdateForResourceGroupOperations( self._client, self._config, self._serialize, self._deserialize) - self.configuration_assignments_within_subscription = ConfigurationAssignmentsWithinSubscriptionOperations( - self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) self.updates = UpdatesOperations( @@ -119,7 +114,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MaintenanceClient + # type: () -> MaintenanceManagementClient self._client.__enter__() return self diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_metadata.json b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_metadata.json index e11de784ac6c..9e47a4863173 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_metadata.json +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_metadata.json @@ -1,17 +1,17 @@ { - "chosen_version": "2021-04-01-preview", - "total_api_version_list": ["2021-04-01-preview"], + "chosen_version": "2021-05-01", + "total_api_version_list": ["2021-05-01"], "client": { - "name": "MaintenanceClient", - "filename": "_maintenance_client", - "description": "Maintenance Client.", + "name": "MaintenanceManagementClient", + "filename": "_maintenance_management_client", + "description": "Azure Maintenance Management Client.", "base_url": "\u0027https://management.azure.com\u0027", "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MaintenanceClientConfiguration\"]}}, \"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\": [\"MaintenanceClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MaintenanceManagementClientConfiguration\"]}}, \"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\": [\"MaintenanceManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -104,7 +104,6 @@ "maintenance_configurations": "MaintenanceConfigurationsOperations", "maintenance_configurations_for_resource_group": "MaintenanceConfigurationsForResourceGroupOperations", "apply_update_for_resource_group": "ApplyUpdateForResourceGroupOperations", - "configuration_assignments_within_subscription": "ConfigurationAssignmentsWithinSubscriptionOperations", "operations": "Operations", "updates": "UpdatesOperations" } diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_version.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_version.py index c47f66669f1b..59deb8c7263b 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_version.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.1.0" diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/__init__.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/__init__.py index fbdfed2dc4cc..c23a09cf9909 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/__init__.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/__init__.py @@ -6,5 +6,5 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._maintenance_client import MaintenanceClient -__all__ = ['MaintenanceClient'] +from ._maintenance_management_client import MaintenanceManagementClient +__all__ = ['MaintenanceManagementClient'] diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_configuration.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_configuration.py index 9e3c0af06fba..e86f26bf0658 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_configuration.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MaintenanceClientConfiguration(Configuration): - """Configuration for MaintenanceClient. +class MaintenanceManagementClientConfiguration(Configuration): + """Configuration for MaintenanceManagementClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -41,11 +41,11 @@ def __init__( raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - super(MaintenanceClientConfiguration, self).__init__(**kwargs) + super(MaintenanceManagementClientConfiguration, self).__init__(**kwargs) self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-04-01-preview" + self.api_version = "2021-05-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-maintenance/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_maintenance_client.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_maintenance_management_client.py similarity index 88% rename from sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_maintenance_client.py rename to sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_maintenance_management_client.py index 4d34c4f687a2..6ef18654eba3 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_maintenance_client.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_maintenance_management_client.py @@ -16,21 +16,20 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -from ._configuration import MaintenanceClientConfiguration +from ._configuration import MaintenanceManagementClientConfiguration from .operations import PublicMaintenanceConfigurationsOperations from .operations import ApplyUpdatesOperations from .operations import ConfigurationAssignmentsOperations from .operations import MaintenanceConfigurationsOperations from .operations import MaintenanceConfigurationsForResourceGroupOperations from .operations import ApplyUpdateForResourceGroupOperations -from .operations import ConfigurationAssignmentsWithinSubscriptionOperations from .operations import Operations from .operations import UpdatesOperations from .. import models -class MaintenanceClient(object): - """Maintenance Client. +class MaintenanceManagementClient(object): + """Azure Maintenance Management Client. :ivar public_maintenance_configurations: PublicMaintenanceConfigurationsOperations operations :vartype public_maintenance_configurations: azure.mgmt.maintenance.aio.operations.PublicMaintenanceConfigurationsOperations @@ -44,8 +43,6 @@ class MaintenanceClient(object): :vartype maintenance_configurations_for_resource_group: azure.mgmt.maintenance.aio.operations.MaintenanceConfigurationsForResourceGroupOperations :ivar apply_update_for_resource_group: ApplyUpdateForResourceGroupOperations operations :vartype apply_update_for_resource_group: azure.mgmt.maintenance.aio.operations.ApplyUpdateForResourceGroupOperations - :ivar configuration_assignments_within_subscription: ConfigurationAssignmentsWithinSubscriptionOperations operations - :vartype configuration_assignments_within_subscription: azure.mgmt.maintenance.aio.operations.ConfigurationAssignmentsWithinSubscriptionOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.maintenance.aio.operations.Operations :ivar updates: UpdatesOperations operations @@ -66,7 +63,7 @@ def __init__( ) -> None: if not base_url: base_url = 'https://management.azure.com' - self._config = MaintenanceClientConfiguration(credential, subscription_id, **kwargs) + self._config = MaintenanceManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -86,8 +83,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.apply_update_for_resource_group = ApplyUpdateForResourceGroupOperations( self._client, self._config, self._serialize, self._deserialize) - self.configuration_assignments_within_subscription = ConfigurationAssignmentsWithinSubscriptionOperations( - self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) self.updates = UpdatesOperations( @@ -113,7 +108,7 @@ async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> Async async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MaintenanceClient": + async def __aenter__(self) -> "MaintenanceManagementClient": await self._client.__aenter__() return self diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/__init__.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/__init__.py index 9073f0a77635..0936b6c33b50 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/__init__.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/__init__.py @@ -12,7 +12,6 @@ from ._maintenance_configurations_operations import MaintenanceConfigurationsOperations from ._maintenance_configurations_for_resource_group_operations import MaintenanceConfigurationsForResourceGroupOperations from ._apply_update_for_resource_group_operations import ApplyUpdateForResourceGroupOperations -from ._configuration_assignments_within_subscription_operations import ConfigurationAssignmentsWithinSubscriptionOperations from ._operations import Operations from ._updates_operations import UpdatesOperations @@ -23,7 +22,6 @@ 'MaintenanceConfigurationsOperations', 'MaintenanceConfigurationsForResourceGroupOperations', 'ApplyUpdateForResourceGroupOperations', - 'ConfigurationAssignmentsWithinSubscriptionOperations', 'Operations', 'UpdatesOperations', ] diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_apply_update_for_resource_group_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_apply_update_for_resource_group_operations.py index 41746d50939a..e46f1f219956 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_apply_update_for_resource_group_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_apply_update_for_resource_group_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_apply_updates_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_apply_updates_operations.py index a68417c4ac73..bba2d3be0d73 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_apply_updates_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_apply_updates_operations.py @@ -80,7 +80,7 @@ async def get_parent( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -155,7 +155,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -231,7 +231,7 @@ async def create_or_update_parent( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -302,7 +302,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -359,7 +359,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_configuration_assignments_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_configuration_assignments_operations.py index aa899c38483d..b94aacc6e776 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_configuration_assignments_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_configuration_assignments_operations.py @@ -41,87 +41,6 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def get_parent( - self, - resource_group_name: str, - provider_name: str, - resource_parent_type: str, - resource_parent_name: str, - resource_type: str, - resource_name: str, - configuration_assignment_name: str, - **kwargs - ) -> "_models.ConfigurationAssignment": - """Get configuration assignment. - - Get configuration for resource. - - :param resource_group_name: Resource group name. - :type resource_group_name: str - :param provider_name: Resource provider name. - :type provider_name: str - :param resource_parent_type: Resource parent type. - :type resource_parent_type: str - :param resource_parent_name: Resource parent identifier. - :type resource_parent_name: str - :param resource_type: Resource type. - :type resource_type: str - :param resource_name: Resource identifier. - :type resource_name: str - :param configuration_assignment_name: Configuration assignment name. - :type configuration_assignment_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ConfigurationAssignment, or the result of cls(response) - :rtype: ~azure.mgmt.maintenance.models.ConfigurationAssignment - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationAssignment"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" - accept = "application/json" - - # Construct URL - url = self.get_parent.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), - 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), - 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'configurationAssignmentName': self._serialize.url("configuration_assignment_name", configuration_assignment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.MaintenanceError, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ConfigurationAssignment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} # type: ignore - async def create_or_update_parent( self, resource_group_name: str, @@ -164,7 +83,7 @@ async def create_or_update_parent( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -250,7 +169,7 @@ async def delete_parent( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -294,79 +213,6 @@ async def delete_parent( return deserialized delete_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} # type: ignore - async def get( - self, - resource_group_name: str, - provider_name: str, - resource_type: str, - resource_name: str, - configuration_assignment_name: str, - **kwargs - ) -> "_models.ConfigurationAssignment": - """Get configuration assignment. - - Get configuration for resource. - - :param resource_group_name: Resource group name. - :type resource_group_name: str - :param provider_name: Resource provider name. - :type provider_name: str - :param resource_type: Resource type. - :type resource_type: str - :param resource_name: Resource identifier. - :type resource_name: str - :param configuration_assignment_name: Configuration assignment name. - :type configuration_assignment_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ConfigurationAssignment, or the result of cls(response) - :rtype: ~azure.mgmt.maintenance.models.ConfigurationAssignment - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationAssignment"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'configurationAssignmentName': self._serialize.url("configuration_assignment_name", configuration_assignment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.MaintenanceError, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ConfigurationAssignment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} # type: ignore - async def create_or_update( self, resource_group_name: str, @@ -403,7 +249,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -481,7 +327,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -559,7 +405,7 @@ def list_parent( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -646,7 +492,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_configuration_assignments_within_subscription_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_configuration_assignments_within_subscription_operations.py deleted file mode 100644 index 811a6d62914e..000000000000 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_configuration_assignments_within_subscription_operations.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ConfigurationAssignmentsWithinSubscriptionOperations: - """ConfigurationAssignmentsWithinSubscriptionOperations 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.maintenance.models - :param client: Client for service requests. - :param config: Configuration 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 - ) -> AsyncIterable["_models.ListConfigurationAssignmentsResult"]: - """Get configuration assignment within a subscription. - - Get configuration assignment within a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ListConfigurationAssignmentsResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.maintenance.models.ListConfigurationAssignmentsResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListConfigurationAssignmentsResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_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('ListConfigurationAssignmentsResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.MaintenanceError, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Maintenance/configurationAssignments'} # type: ignore diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_maintenance_configurations_for_resource_group_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_maintenance_configurations_for_resource_group_operations.py index b58d5e411824..4b17136c5ef0 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_maintenance_configurations_for_resource_group_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_maintenance_configurations_for_resource_group_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_maintenance_configurations_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_maintenance_configurations_operations.py index d0ab25e28dcf..d28a810b6f4b 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_maintenance_configurations_operations.py @@ -53,7 +53,7 @@ async def get( :param resource_group_name: Resource Group Name. :type resource_group_name: str - :param resource_name: Resource Identifier. + :param resource_name: Maintenance Configuration Name. :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MaintenanceConfiguration, or the result of cls(response) @@ -65,7 +65,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -115,7 +115,7 @@ async def create_or_update( :param resource_group_name: Resource Group Name. :type resource_group_name: str - :param resource_name: Resource Identifier. + :param resource_name: Maintenance Configuration Name. :type resource_name: str :param configuration: The configuration. :type configuration: ~azure.mgmt.maintenance.models.MaintenanceConfiguration @@ -129,7 +129,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -183,7 +183,7 @@ async def delete( :param resource_group_name: Resource Group Name. :type resource_group_name: str - :param resource_name: Resource Identifier. + :param resource_name: Maintenance Configuration Name. :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MaintenanceConfiguration, or the result of cls(response) @@ -195,7 +195,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -247,7 +247,7 @@ async def update( :param resource_group_name: Resource Group Name. :type resource_group_name: str - :param resource_name: Resource Identifier. + :param resource_name: Maintenance Configuration Name. :type resource_name: str :param configuration: The configuration. :type configuration: ~azure.mgmt.maintenance.models.MaintenanceConfiguration @@ -261,7 +261,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -321,7 +321,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_operations.py index 57eb3c895a82..edcba5340450 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_operations.py @@ -59,7 +59,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_public_maintenance_configurations_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_public_maintenance_configurations_operations.py index 74d0def1fbe6..3ff55c068fc9 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_public_maintenance_configurations_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_public_maintenance_configurations_operations.py @@ -59,7 +59,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -119,7 +119,7 @@ async def get( Get Public Maintenance Configuration record. - :param resource_name: Resource Identifier. + :param resource_name: Maintenance Configuration Name. :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MaintenanceConfiguration, or the result of cls(response) @@ -131,7 +131,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_updates_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_updates_operations.py index 41152abe7ee6..ec92532a33d7 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_updates_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_updates_operations.py @@ -77,7 +77,7 @@ def list_parent( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -164,7 +164,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/__init__.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/__init__.py index d121e9f01fd6..feded2194d4a 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/__init__.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/__init__.py @@ -10,9 +10,6 @@ from ._models_py3 import ApplyUpdate from ._models_py3 import ConfigurationAssignment from ._models_py3 import ErrorDetails - from ._models_py3 import InputLinuxParameters - from ._models_py3 import InputPatchConfiguration - from ._models_py3 import InputWindowsParameters from ._models_py3 import ListApplyUpdate from ._models_py3 import ListConfigurationAssignmentsResult from ._models_py3 import ListMaintenanceConfigurationsResult @@ -24,15 +21,11 @@ from ._models_py3 import OperationsListResult from ._models_py3 import Resource from ._models_py3 import SystemData - from ._models_py3 import TaskProperties from ._models_py3 import Update except (SyntaxError, ImportError): from ._models import ApplyUpdate # type: ignore from ._models import ConfigurationAssignment # type: ignore from ._models import ErrorDetails # type: ignore - from ._models import InputLinuxParameters # type: ignore - from ._models import InputPatchConfiguration # type: ignore - from ._models import InputWindowsParameters # type: ignore from ._models import ListApplyUpdate # type: ignore from ._models import ListConfigurationAssignmentsResult # type: ignore from ._models import ListMaintenanceConfigurationsResult # type: ignore @@ -44,15 +37,12 @@ from ._models import OperationsListResult # type: ignore from ._models import Resource # type: ignore from ._models import SystemData # type: ignore - from ._models import TaskProperties # type: ignore from ._models import Update # type: ignore -from ._maintenance_client_enums import ( +from ._maintenance_management_client_enums import ( CreatedByType, ImpactType, MaintenanceScope, - RebootOptions, - TaskScope, UpdateStatus, Visibility, ) @@ -61,9 +51,6 @@ 'ApplyUpdate', 'ConfigurationAssignment', 'ErrorDetails', - 'InputLinuxParameters', - 'InputPatchConfiguration', - 'InputWindowsParameters', 'ListApplyUpdate', 'ListConfigurationAssignmentsResult', 'ListMaintenanceConfigurationsResult', @@ -75,13 +62,10 @@ 'OperationsListResult', 'Resource', 'SystemData', - 'TaskProperties', 'Update', 'CreatedByType', 'ImpactType', 'MaintenanceScope', - 'RebootOptions', - 'TaskScope', 'UpdateStatus', 'Visibility', ] diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_maintenance_client_enums.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_maintenance_management_client_enums.py similarity index 65% rename from sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_maintenance_client_enums.py rename to sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_maintenance_management_client_enums.py index 5621ac81ac41..2c59ce218b3e 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_maintenance_client_enums.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_maintenance_management_client_enums.py @@ -39,51 +39,53 @@ class ImpactType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The impact type """ + #: Pending updates has no impact on resource. NONE = "None" + #: Pending updates can freeze network or disk io operation on resource. FREEZE = "Freeze" + #: Pending updates can cause resource to restart. RESTART = "Restart" + #: Pending updates can redeploy resource. REDEPLOY = "Redeploy" class MaintenanceScope(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Gets or sets maintenanceScope of the configuration """ + #: This maintenance scope controls installation of azure platform updates i.e. services on + #: physical nodes hosting customer VMs. HOST = "Host" + #: This maintenance scope controls os image installation on VM/VMSS. OS_IMAGE = "OSImage" + #: This maintenance scope controls extension installation on VM/VMSS. EXTENSION = "Extension" + #: This maintenance scope controls installation of windows and linux packages on VM/VMSS. IN_GUEST_PATCH = "InGuestPatch" + #: This maintenance scope controls installation of SQL server platform updates. SQLDB = "SQLDB" + #: This maintenance scope controls installation of SQL managed instance platform update. SQL_MANAGED_INSTANCE = "SQLManagedInstance" -class RebootOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Possible reboot preference as defined by the user based on which it would be decided to reboot - the machine or not after the patch operation is completed. - """ - - NEVER_REBOOT = "NeverReboot" - REBOOT_IF_REQUIRED = "RebootIfRequired" - ALWAYS_REBOOT = "AlwaysReboot" - -class TaskScope(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Global Task execute once when schedule trigger. Resource task execute for each VM. - """ - - GLOBAL_ENUM = "Global" - RESOURCE = "Resource" - class UpdateStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The status """ + #: There are pending updates to be installed. PENDING = "Pending" + #: Updates installation are in progress. IN_PROGRESS = "InProgress" + #: All updates are successfully applied. COMPLETED = "Completed" + #: Updates installation failed but are ready to retry again. RETRY_NOW = "RetryNow" + #: Updates installation failed and should be retried later. RETRY_LATER = "RetryLater" class Visibility(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Gets or sets the visibility of the configuration + """Gets or sets the visibility of the configuration. The default value is 'Custom' """ + #: Only visible to users with permissions. CUSTOM = "Custom" + #: Visible to all users. PUBLIC = "Public" diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_models.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_models.py index 4231d48e233b..01153758c032 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_models.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_models.py @@ -174,101 +174,6 @@ def __init__( self.message = kwargs.get('message', None) -class InputLinuxParameters(msrest.serialization.Model): - """Input properties for patching a Linux machine. - - :param package_name_masks_to_exclude: Package names to be excluded for patching. - :type package_name_masks_to_exclude: list[str] - :param package_name_masks_to_include: Package names to be included for patching. - :type package_name_masks_to_include: list[str] - :param classifications_to_include: Classification category of patches to be patched. - :type classifications_to_include: list[str] - """ - - _attribute_map = { - 'package_name_masks_to_exclude': {'key': 'packageNameMasksToExclude', 'type': '[str]'}, - 'package_name_masks_to_include': {'key': 'packageNameMasksToInclude', 'type': '[str]'}, - 'classifications_to_include': {'key': 'classificationsToInclude', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(InputLinuxParameters, self).__init__(**kwargs) - self.package_name_masks_to_exclude = kwargs.get('package_name_masks_to_exclude', None) - self.package_name_masks_to_include = kwargs.get('package_name_masks_to_include', None) - self.classifications_to_include = kwargs.get('classifications_to_include', None) - - -class InputPatchConfiguration(msrest.serialization.Model): - """Input configuration for a patch run. - - :param reboot_setting: Possible reboot preference as defined by the user based on which it - would be decided to reboot the machine or not after the patch operation is completed. Possible - values include: "NeverReboot", "RebootIfRequired", "AlwaysReboot". - :type reboot_setting: str or ~azure.mgmt.maintenance.models.RebootOptions - :param windows_parameters: Input parameters specific to patching a Windows machine. For Linux - machines, do not pass this property. - :type windows_parameters: ~azure.mgmt.maintenance.models.InputWindowsParameters - :param linux_parameters: Input parameters specific to patching Linux machine. For Windows - machines, do not pass this property. - :type linux_parameters: ~azure.mgmt.maintenance.models.InputLinuxParameters - :param pre_tasks: List of pre tasks. e.g. [{'source' :'runbook', 'taskScope': 'Global', - 'parameters': { 'arg1': 'value1'}}]. - :type pre_tasks: list[~azure.mgmt.maintenance.models.TaskProperties] - :param post_tasks: List of post tasks. e.g. [{'source' :'runbook', 'taskScope': 'Resource', - 'parameters': { 'arg1': 'value1'}}]. - :type post_tasks: list[~azure.mgmt.maintenance.models.TaskProperties] - """ - - _attribute_map = { - 'reboot_setting': {'key': 'rebootSetting', 'type': 'str'}, - 'windows_parameters': {'key': 'windowsParameters', 'type': 'InputWindowsParameters'}, - 'linux_parameters': {'key': 'linuxParameters', 'type': 'InputLinuxParameters'}, - 'pre_tasks': {'key': 'tasks.preTasks', 'type': '[TaskProperties]'}, - 'post_tasks': {'key': 'tasks.postTasks', 'type': '[TaskProperties]'}, - } - - def __init__( - self, - **kwargs - ): - super(InputPatchConfiguration, self).__init__(**kwargs) - self.reboot_setting = kwargs.get('reboot_setting', None) - self.windows_parameters = kwargs.get('windows_parameters', None) - self.linux_parameters = kwargs.get('linux_parameters', None) - self.pre_tasks = kwargs.get('pre_tasks', None) - self.post_tasks = kwargs.get('post_tasks', None) - - -class InputWindowsParameters(msrest.serialization.Model): - """Input properties for patching a Windows machine. - - :param kb_numbers_to_exclude: Windows KBID to be excluded for patching. - :type kb_numbers_to_exclude: list[str] - :param kb_numbers_to_include: Windows KBID to be included for patching. - :type kb_numbers_to_include: list[str] - :param classifications_to_include: Classification category of patches to be patched. - :type classifications_to_include: list[str] - """ - - _attribute_map = { - 'kb_numbers_to_exclude': {'key': 'kbNumbersToExclude', 'type': '[str]'}, - 'kb_numbers_to_include': {'key': 'kbNumbersToInclude', 'type': '[str]'}, - 'classifications_to_include': {'key': 'classificationsToInclude', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(InputWindowsParameters, self).__init__(**kwargs) - self.kb_numbers_to_exclude = kwargs.get('kb_numbers_to_exclude', None) - self.kb_numbers_to_include = kwargs.get('kb_numbers_to_include', None) - self.classifications_to_include = kwargs.get('classifications_to_include', None) - - class ListApplyUpdate(msrest.serialization.Model): """Response for ApplyUpdate list. @@ -370,11 +275,9 @@ class MaintenanceConfiguration(Resource): :param maintenance_scope: Gets or sets maintenanceScope of the configuration. Possible values include: "Host", "OSImage", "Extension", "InGuestPatch", "SQLDB", "SQLManagedInstance". :type maintenance_scope: str or ~azure.mgmt.maintenance.models.MaintenanceScope - :param visibility: Gets or sets the visibility of the configuration. Possible values include: - "Custom", "Public". + :param visibility: Gets or sets the visibility of the configuration. The default value is + 'Custom'. Possible values include: "Custom", "Public". :type visibility: str or ~azure.mgmt.maintenance.models.Visibility - :param install_patches: The input parameters to be passed to the patch run operation. - :type install_patches: ~azure.mgmt.maintenance.models.InputPatchConfiguration :param start_date_time: Effective start date of the maintenance window in YYYY-MM-DD hh:mm format. The start date can be set to either the current date or future date. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone. @@ -423,7 +326,6 @@ class MaintenanceConfiguration(Resource): 'extension_properties': {'key': 'properties.extensionProperties', 'type': '{str}'}, 'maintenance_scope': {'key': 'properties.maintenanceScope', 'type': 'str'}, 'visibility': {'key': 'properties.visibility', 'type': 'str'}, - 'install_patches': {'key': 'properties.installPatches', 'type': 'InputPatchConfiguration'}, 'start_date_time': {'key': 'properties.maintenanceWindow.startDateTime', 'type': 'str'}, 'expiration_date_time': {'key': 'properties.maintenanceWindow.expirationDateTime', 'type': 'str'}, 'duration': {'key': 'properties.maintenanceWindow.duration', 'type': 'str'}, @@ -442,7 +344,6 @@ def __init__( self.extension_properties = kwargs.get('extension_properties', None) self.maintenance_scope = kwargs.get('maintenance_scope', None) self.visibility = kwargs.get('visibility', None) - self.install_patches = kwargs.get('install_patches', None) self.start_date_time = kwargs.get('start_date_time', None) self.expiration_date_time = kwargs.get('expiration_date_time', None) self.duration = kwargs.get('duration', None) @@ -479,7 +380,7 @@ class Operation(msrest.serialization.Model): :param origin: Origin of the operation. :type origin: str :param properties: Properties of the operation. - :type properties: object + :type properties: str :param is_data_action: Indicates whether the operation is a data action. :type is_data_action: bool """ @@ -488,7 +389,7 @@ class Operation(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationInfo'}, 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': 'str'}, 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, } @@ -595,34 +496,6 @@ def __init__( self.last_modified_at = kwargs.get('last_modified_at', None) -class TaskProperties(msrest.serialization.Model): - """Task properties of the software update configuration. - - :param parameters: Gets or sets the parameters of the task. - :type parameters: dict[str, str] - :param source: Gets or sets the name of the runbook. - :type source: str - :param task_scope: Global Task execute once when schedule trigger. Resource task execute for - each VM. Possible values include: "Global", "Resource". Default value: "Global". - :type task_scope: str or ~azure.mgmt.maintenance.models.TaskScope - """ - - _attribute_map = { - 'parameters': {'key': 'parameters', 'type': '{str}'}, - 'source': {'key': 'source', 'type': 'str'}, - 'task_scope': {'key': 'taskScope', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TaskProperties, self).__init__(**kwargs) - self.parameters = kwargs.get('parameters', None) - self.source = kwargs.get('source', None) - self.task_scope = kwargs.get('task_scope', "Global") - - class Update(msrest.serialization.Model): """Maintenance update on a resource. diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_models_py3.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_models_py3.py index 69fd2c420b96..8b9d72ed726e 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_models_py3.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_models_py3.py @@ -12,7 +12,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._maintenance_client_enums import * +from ._maintenance_management_client_enums import * class Resource(msrest.serialization.Model): @@ -190,115 +190,6 @@ def __init__( self.message = message -class InputLinuxParameters(msrest.serialization.Model): - """Input properties for patching a Linux machine. - - :param package_name_masks_to_exclude: Package names to be excluded for patching. - :type package_name_masks_to_exclude: list[str] - :param package_name_masks_to_include: Package names to be included for patching. - :type package_name_masks_to_include: list[str] - :param classifications_to_include: Classification category of patches to be patched. - :type classifications_to_include: list[str] - """ - - _attribute_map = { - 'package_name_masks_to_exclude': {'key': 'packageNameMasksToExclude', 'type': '[str]'}, - 'package_name_masks_to_include': {'key': 'packageNameMasksToInclude', 'type': '[str]'}, - 'classifications_to_include': {'key': 'classificationsToInclude', 'type': '[str]'}, - } - - def __init__( - self, - *, - package_name_masks_to_exclude: Optional[List[str]] = None, - package_name_masks_to_include: Optional[List[str]] = None, - classifications_to_include: Optional[List[str]] = None, - **kwargs - ): - super(InputLinuxParameters, self).__init__(**kwargs) - self.package_name_masks_to_exclude = package_name_masks_to_exclude - self.package_name_masks_to_include = package_name_masks_to_include - self.classifications_to_include = classifications_to_include - - -class InputPatchConfiguration(msrest.serialization.Model): - """Input configuration for a patch run. - - :param reboot_setting: Possible reboot preference as defined by the user based on which it - would be decided to reboot the machine or not after the patch operation is completed. Possible - values include: "NeverReboot", "RebootIfRequired", "AlwaysReboot". - :type reboot_setting: str or ~azure.mgmt.maintenance.models.RebootOptions - :param windows_parameters: Input parameters specific to patching a Windows machine. For Linux - machines, do not pass this property. - :type windows_parameters: ~azure.mgmt.maintenance.models.InputWindowsParameters - :param linux_parameters: Input parameters specific to patching Linux machine. For Windows - machines, do not pass this property. - :type linux_parameters: ~azure.mgmt.maintenance.models.InputLinuxParameters - :param pre_tasks: List of pre tasks. e.g. [{'source' :'runbook', 'taskScope': 'Global', - 'parameters': { 'arg1': 'value1'}}]. - :type pre_tasks: list[~azure.mgmt.maintenance.models.TaskProperties] - :param post_tasks: List of post tasks. e.g. [{'source' :'runbook', 'taskScope': 'Resource', - 'parameters': { 'arg1': 'value1'}}]. - :type post_tasks: list[~azure.mgmt.maintenance.models.TaskProperties] - """ - - _attribute_map = { - 'reboot_setting': {'key': 'rebootSetting', 'type': 'str'}, - 'windows_parameters': {'key': 'windowsParameters', 'type': 'InputWindowsParameters'}, - 'linux_parameters': {'key': 'linuxParameters', 'type': 'InputLinuxParameters'}, - 'pre_tasks': {'key': 'tasks.preTasks', 'type': '[TaskProperties]'}, - 'post_tasks': {'key': 'tasks.postTasks', 'type': '[TaskProperties]'}, - } - - def __init__( - self, - *, - reboot_setting: Optional[Union[str, "RebootOptions"]] = None, - windows_parameters: Optional["InputWindowsParameters"] = None, - linux_parameters: Optional["InputLinuxParameters"] = None, - pre_tasks: Optional[List["TaskProperties"]] = None, - post_tasks: Optional[List["TaskProperties"]] = None, - **kwargs - ): - super(InputPatchConfiguration, self).__init__(**kwargs) - self.reboot_setting = reboot_setting - self.windows_parameters = windows_parameters - self.linux_parameters = linux_parameters - self.pre_tasks = pre_tasks - self.post_tasks = post_tasks - - -class InputWindowsParameters(msrest.serialization.Model): - """Input properties for patching a Windows machine. - - :param kb_numbers_to_exclude: Windows KBID to be excluded for patching. - :type kb_numbers_to_exclude: list[str] - :param kb_numbers_to_include: Windows KBID to be included for patching. - :type kb_numbers_to_include: list[str] - :param classifications_to_include: Classification category of patches to be patched. - :type classifications_to_include: list[str] - """ - - _attribute_map = { - 'kb_numbers_to_exclude': {'key': 'kbNumbersToExclude', 'type': '[str]'}, - 'kb_numbers_to_include': {'key': 'kbNumbersToInclude', 'type': '[str]'}, - 'classifications_to_include': {'key': 'classificationsToInclude', 'type': '[str]'}, - } - - def __init__( - self, - *, - kb_numbers_to_exclude: Optional[List[str]] = None, - kb_numbers_to_include: Optional[List[str]] = None, - classifications_to_include: Optional[List[str]] = None, - **kwargs - ): - super(InputWindowsParameters, self).__init__(**kwargs) - self.kb_numbers_to_exclude = kb_numbers_to_exclude - self.kb_numbers_to_include = kb_numbers_to_include - self.classifications_to_include = classifications_to_include - - class ListApplyUpdate(msrest.serialization.Model): """Response for ApplyUpdate list. @@ -408,11 +299,9 @@ class MaintenanceConfiguration(Resource): :param maintenance_scope: Gets or sets maintenanceScope of the configuration. Possible values include: "Host", "OSImage", "Extension", "InGuestPatch", "SQLDB", "SQLManagedInstance". :type maintenance_scope: str or ~azure.mgmt.maintenance.models.MaintenanceScope - :param visibility: Gets or sets the visibility of the configuration. Possible values include: - "Custom", "Public". + :param visibility: Gets or sets the visibility of the configuration. The default value is + 'Custom'. Possible values include: "Custom", "Public". :type visibility: str or ~azure.mgmt.maintenance.models.Visibility - :param install_patches: The input parameters to be passed to the patch run operation. - :type install_patches: ~azure.mgmt.maintenance.models.InputPatchConfiguration :param start_date_time: Effective start date of the maintenance window in YYYY-MM-DD hh:mm format. The start date can be set to either the current date or future date. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone. @@ -461,7 +350,6 @@ class MaintenanceConfiguration(Resource): 'extension_properties': {'key': 'properties.extensionProperties', 'type': '{str}'}, 'maintenance_scope': {'key': 'properties.maintenanceScope', 'type': 'str'}, 'visibility': {'key': 'properties.visibility', 'type': 'str'}, - 'install_patches': {'key': 'properties.installPatches', 'type': 'InputPatchConfiguration'}, 'start_date_time': {'key': 'properties.maintenanceWindow.startDateTime', 'type': 'str'}, 'expiration_date_time': {'key': 'properties.maintenanceWindow.expirationDateTime', 'type': 'str'}, 'duration': {'key': 'properties.maintenanceWindow.duration', 'type': 'str'}, @@ -478,7 +366,6 @@ def __init__( extension_properties: Optional[Dict[str, str]] = None, maintenance_scope: Optional[Union[str, "MaintenanceScope"]] = None, visibility: Optional[Union[str, "Visibility"]] = None, - install_patches: Optional["InputPatchConfiguration"] = None, start_date_time: Optional[str] = None, expiration_date_time: Optional[str] = None, duration: Optional[str] = None, @@ -493,7 +380,6 @@ def __init__( self.extension_properties = extension_properties self.maintenance_scope = maintenance_scope self.visibility = visibility - self.install_patches = install_patches self.start_date_time = start_date_time self.expiration_date_time = expiration_date_time self.duration = duration @@ -532,7 +418,7 @@ class Operation(msrest.serialization.Model): :param origin: Origin of the operation. :type origin: str :param properties: Properties of the operation. - :type properties: object + :type properties: str :param is_data_action: Indicates whether the operation is a data action. :type is_data_action: bool """ @@ -541,7 +427,7 @@ class Operation(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationInfo'}, 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': 'str'}, 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, } @@ -551,7 +437,7 @@ def __init__( name: Optional[str] = None, display: Optional["OperationInfo"] = None, origin: Optional[str] = None, - properties: Optional[object] = None, + properties: Optional[str] = None, is_data_action: Optional[bool] = None, **kwargs ): @@ -668,38 +554,6 @@ def __init__( self.last_modified_at = last_modified_at -class TaskProperties(msrest.serialization.Model): - """Task properties of the software update configuration. - - :param parameters: Gets or sets the parameters of the task. - :type parameters: dict[str, str] - :param source: Gets or sets the name of the runbook. - :type source: str - :param task_scope: Global Task execute once when schedule trigger. Resource task execute for - each VM. Possible values include: "Global", "Resource". Default value: "Global". - :type task_scope: str or ~azure.mgmt.maintenance.models.TaskScope - """ - - _attribute_map = { - 'parameters': {'key': 'parameters', 'type': '{str}'}, - 'source': {'key': 'source', 'type': 'str'}, - 'task_scope': {'key': 'taskScope', 'type': 'str'}, - } - - def __init__( - self, - *, - parameters: Optional[Dict[str, str]] = None, - source: Optional[str] = None, - task_scope: Optional[Union[str, "TaskScope"]] = "Global", - **kwargs - ): - super(TaskProperties, self).__init__(**kwargs) - self.parameters = parameters - self.source = source - self.task_scope = task_scope - - class Update(msrest.serialization.Model): """Maintenance update on a resource. diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/__init__.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/__init__.py index 9073f0a77635..0936b6c33b50 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/__init__.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/__init__.py @@ -12,7 +12,6 @@ from ._maintenance_configurations_operations import MaintenanceConfigurationsOperations from ._maintenance_configurations_for_resource_group_operations import MaintenanceConfigurationsForResourceGroupOperations from ._apply_update_for_resource_group_operations import ApplyUpdateForResourceGroupOperations -from ._configuration_assignments_within_subscription_operations import ConfigurationAssignmentsWithinSubscriptionOperations from ._operations import Operations from ._updates_operations import UpdatesOperations @@ -23,7 +22,6 @@ 'MaintenanceConfigurationsOperations', 'MaintenanceConfigurationsForResourceGroupOperations', 'ApplyUpdateForResourceGroupOperations', - 'ConfigurationAssignmentsWithinSubscriptionOperations', 'Operations', 'UpdatesOperations', ] diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_update_for_resource_group_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_update_for_resource_group_operations.py index c262ae673c69..11aa09212a18 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_update_for_resource_group_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_update_for_resource_group_operations.py @@ -67,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_updates_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_updates_operations.py index 1d7a8caea5ab..e685724c07cd 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_updates_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_updates_operations.py @@ -85,7 +85,7 @@ def get_parent( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -161,7 +161,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -238,7 +238,7 @@ def create_or_update_parent( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -310,7 +310,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -368,7 +368,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_operations.py index 79e520bb9765..ed7665c4242a 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_operations.py @@ -45,88 +45,6 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def get_parent( - self, - resource_group_name, # type: str - provider_name, # type: str - resource_parent_type, # type: str - resource_parent_name, # type: str - resource_type, # type: str - resource_name, # type: str - configuration_assignment_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ConfigurationAssignment" - """Get configuration assignment. - - Get configuration for resource. - - :param resource_group_name: Resource group name. - :type resource_group_name: str - :param provider_name: Resource provider name. - :type provider_name: str - :param resource_parent_type: Resource parent type. - :type resource_parent_type: str - :param resource_parent_name: Resource parent identifier. - :type resource_parent_name: str - :param resource_type: Resource type. - :type resource_type: str - :param resource_name: Resource identifier. - :type resource_name: str - :param configuration_assignment_name: Configuration assignment name. - :type configuration_assignment_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ConfigurationAssignment, or the result of cls(response) - :rtype: ~azure.mgmt.maintenance.models.ConfigurationAssignment - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationAssignment"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" - accept = "application/json" - - # Construct URL - url = self.get_parent.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - 'resourceParentType': self._serialize.url("resource_parent_type", resource_parent_type, 'str'), - 'resourceParentName': self._serialize.url("resource_parent_name", resource_parent_name, 'str'), - 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'configurationAssignmentName': self._serialize.url("configuration_assignment_name", configuration_assignment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.MaintenanceError, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ConfigurationAssignment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} # type: ignore - def create_or_update_parent( self, resource_group_name, # type: str @@ -170,7 +88,7 @@ def create_or_update_parent( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -257,7 +175,7 @@ def delete_parent( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -301,80 +219,6 @@ def delete_parent( return deserialized delete_parent.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} # type: ignore - def get( - self, - resource_group_name, # type: str - provider_name, # type: str - resource_type, # type: str - resource_name, # type: str - configuration_assignment_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ConfigurationAssignment" - """Get configuration assignment. - - Get configuration for resource. - - :param resource_group_name: Resource group name. - :type resource_group_name: str - :param provider_name: Resource provider name. - :type provider_name: str - :param resource_type: Resource type. - :type resource_type: str - :param resource_name: Resource identifier. - :type resource_name: str - :param configuration_assignment_name: Configuration assignment name. - :type configuration_assignment_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ConfigurationAssignment, or the result of cls(response) - :rtype: ~azure.mgmt.maintenance.models.ConfigurationAssignment - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationAssignment"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'providerName': self._serialize.url("provider_name", provider_name, 'str'), - 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'configurationAssignmentName': self._serialize.url("configuration_assignment_name", configuration_assignment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.MaintenanceError, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ConfigurationAssignment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}'} # type: ignore - def create_or_update( self, resource_group_name, # type: str @@ -412,7 +256,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -491,7 +335,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -570,7 +414,7 @@ def list_parent( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -658,7 +502,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_within_subscription_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_within_subscription_operations.py deleted file mode 100644 index fef66c507d50..000000000000 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_within_subscription_operations.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import 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 ConfigurationAssignmentsWithinSubscriptionOperations(object): - """ConfigurationAssignmentsWithinSubscriptionOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.maintenance.models - :param client: Client for service requests. - :param config: Configuration 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.ListConfigurationAssignmentsResult"] - """Get configuration assignment within a subscription. - - Get configuration assignment within a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ListConfigurationAssignmentsResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.maintenance.models.ListConfigurationAssignmentsResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListConfigurationAssignmentsResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_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('ListConfigurationAssignmentsResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.MaintenanceError, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Maintenance/configurationAssignments'} # type: ignore diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_maintenance_configurations_for_resource_group_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_maintenance_configurations_for_resource_group_operations.py index 37edd5bd4fc5..91528fd5bf10 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_maintenance_configurations_for_resource_group_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_maintenance_configurations_for_resource_group_operations.py @@ -67,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_maintenance_configurations_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_maintenance_configurations_operations.py index a7277d8f85b1..86fa917df320 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_maintenance_configurations_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_maintenance_configurations_operations.py @@ -58,7 +58,7 @@ def get( :param resource_group_name: Resource Group Name. :type resource_group_name: str - :param resource_name: Resource Identifier. + :param resource_name: Maintenance Configuration Name. :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MaintenanceConfiguration, or the result of cls(response) @@ -70,7 +70,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -121,7 +121,7 @@ def create_or_update( :param resource_group_name: Resource Group Name. :type resource_group_name: str - :param resource_name: Resource Identifier. + :param resource_name: Maintenance Configuration Name. :type resource_name: str :param configuration: The configuration. :type configuration: ~azure.mgmt.maintenance.models.MaintenanceConfiguration @@ -135,7 +135,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -190,7 +190,7 @@ def delete( :param resource_group_name: Resource Group Name. :type resource_group_name: str - :param resource_name: Resource Identifier. + :param resource_name: Maintenance Configuration Name. :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MaintenanceConfiguration, or the result of cls(response) @@ -202,7 +202,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -255,7 +255,7 @@ def update( :param resource_group_name: Resource Group Name. :type resource_group_name: str - :param resource_name: Resource Identifier. + :param resource_name: Maintenance Configuration Name. :type resource_name: str :param configuration: The configuration. :type configuration: ~azure.mgmt.maintenance.models.MaintenanceConfiguration @@ -269,7 +269,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -330,7 +330,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_operations.py index e3457e9b2810..1303d90fdb9b 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_operations.py @@ -64,7 +64,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_public_maintenance_configurations_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_public_maintenance_configurations_operations.py index 17d160bcbffb..5d6f06774682 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_public_maintenance_configurations_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_public_maintenance_configurations_operations.py @@ -64,7 +64,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -125,7 +125,7 @@ def get( Get Public Maintenance Configuration record. - :param resource_name: Resource Identifier. + :param resource_name: Maintenance Configuration Name. :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MaintenanceConfiguration, or the result of cls(response) @@ -137,7 +137,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_updates_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_updates_operations.py index 82df162b8c92..5221c5e015c4 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_updates_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_updates_operations.py @@ -82,7 +82,7 @@ def list_parent( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -170,7 +170,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None):