diff --git a/azure-mgmt-devspaces/azure/mgmt/devspaces/models/__init__.py b/azure-mgmt-devspaces/azure/mgmt/devspaces/models/__init__.py index 6d70e1eb0cb1..ec13a481a4b8 100644 --- a/azure-mgmt-devspaces/azure/mgmt/devspaces/models/__init__.py +++ b/azure-mgmt-devspaces/azure/mgmt/devspaces/models/__init__.py @@ -24,7 +24,7 @@ from .resource_py3 import Resource from .kubernetes_connection_details_py3 import KubernetesConnectionDetails from .error_details_py3 import ErrorDetails - from .error_response_py3 import ErrorResponse, ErrorResponseException + from .dev_spaces_error_response_py3 import DevSpacesErrorResponse, DevSpacesErrorResponseException except (SyntaxError, ImportError): from .container_host_mapping import ContainerHostMapping from .tracked_resource import TrackedResource @@ -40,7 +40,7 @@ from .resource import Resource from .kubernetes_connection_details import KubernetesConnectionDetails from .error_details import ErrorDetails - from .error_response import ErrorResponse, ErrorResponseException + from .dev_spaces_error_response import DevSpacesErrorResponse, DevSpacesErrorResponseException from .resource_provider_operation_definition_paged import ResourceProviderOperationDefinitionPaged from .controller_paged import ControllerPaged from .dev_spaces_management_client_enums import ( @@ -63,7 +63,7 @@ 'Resource', 'KubernetesConnectionDetails', 'ErrorDetails', - 'ErrorResponse', 'ErrorResponseException', + 'DevSpacesErrorResponse', 'DevSpacesErrorResponseException', 'ResourceProviderOperationDefinitionPaged', 'ControllerPaged', 'ProvisioningState', diff --git a/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters.py b/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters.py index 814c47933c7e..89c4af59b22b 100644 --- a/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters.py +++ b/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters.py @@ -17,12 +17,17 @@ class ControllerUpdateParameters(Model): :param tags: Tags for the Azure Dev Spaces Controller. :type tags: dict[str, str] + :param target_container_host_credentials_base64: Credentials of the target + container host (base64). + :type target_container_host_credentials_base64: str """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'target_container_host_credentials_base64': {'key': 'properties.targetContainerHostCredentialsBase64', 'type': 'str'}, } def __init__(self, **kwargs): super(ControllerUpdateParameters, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) + self.target_container_host_credentials_base64 = kwargs.get('target_container_host_credentials_base64', None) diff --git a/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters_py3.py b/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters_py3.py index 23b45b9cf3ba..59d0b1bb6749 100644 --- a/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters_py3.py +++ b/azure-mgmt-devspaces/azure/mgmt/devspaces/models/controller_update_parameters_py3.py @@ -17,12 +17,17 @@ class ControllerUpdateParameters(Model): :param tags: Tags for the Azure Dev Spaces Controller. :type tags: dict[str, str] + :param target_container_host_credentials_base64: Credentials of the target + container host (base64). + :type target_container_host_credentials_base64: str """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'target_container_host_credentials_base64': {'key': 'properties.targetContainerHostCredentialsBase64', 'type': 'str'}, } - def __init__(self, *, tags=None, **kwargs) -> None: + def __init__(self, *, tags=None, target_container_host_credentials_base64: str=None, **kwargs) -> None: super(ControllerUpdateParameters, self).__init__(**kwargs) self.tags = tags + self.target_container_host_credentials_base64 = target_container_host_credentials_base64 diff --git a/azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_response.py b/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response.py similarity index 76% rename from azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_response.py rename to azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response.py index 9f90351350f0..a73eee9a345b 100644 --- a/azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_response.py +++ b/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response.py @@ -13,7 +13,7 @@ from msrest.exceptions import HttpOperationError -class ErrorResponse(Model): +class DevSpacesErrorResponse(Model): """Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. @@ -26,12 +26,12 @@ class ErrorResponse(Model): } def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) + super(DevSpacesErrorResponse, self).__init__(**kwargs) self.error = kwargs.get('error', None) -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. +class DevSpacesErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DevSpacesErrorResponse'. :param deserialize: A deserializer :param response: Server response to be deserialized. @@ -39,4 +39,4 @@ class ErrorResponseException(HttpOperationError): def __init__(self, deserialize, response, *args): - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + super(DevSpacesErrorResponseException, self).__init__(deserialize, response, 'DevSpacesErrorResponse', *args) diff --git a/azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_response_py3.py b/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response_py3.py similarity index 76% rename from azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_response_py3.py rename to azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response_py3.py index f2baf9cce1ee..e5d4da727637 100644 --- a/azure-mgmt-devspaces/azure/mgmt/devspaces/models/error_response_py3.py +++ b/azure-mgmt-devspaces/azure/mgmt/devspaces/models/dev_spaces_error_response_py3.py @@ -13,7 +13,7 @@ from msrest.exceptions import HttpOperationError -class ErrorResponse(Model): +class DevSpacesErrorResponse(Model): """Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. @@ -26,12 +26,12 @@ class ErrorResponse(Model): } def __init__(self, *, error=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) + super(DevSpacesErrorResponse, self).__init__(**kwargs) self.error = error -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. +class DevSpacesErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'DevSpacesErrorResponse'. :param deserialize: A deserializer :param response: Server response to be deserialized. @@ -39,4 +39,4 @@ class ErrorResponseException(HttpOperationError): def __init__(self, deserialize, response, *args): - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + super(DevSpacesErrorResponseException, self).__init__(deserialize, response, 'DevSpacesErrorResponse', *args) diff --git a/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/container_host_mappings_operations.py b/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/container_host_mappings_operations.py index 376194681f07..be50d5c6b29b 100644 --- a/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/container_host_mappings_operations.py +++ b/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/container_host_mappings_operations.py @@ -58,7 +58,7 @@ def get_container_host_mapping( :rtype: ~azure.mgmt.devspaces.models.ContainerHostMapping or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorResponseException` + :class:`DevSpacesErrorResponseException` """ container_host_mapping = models.ContainerHostMapping(container_host_resource_id=container_host_resource_id) @@ -94,7 +94,7 @@ def get_container_host_mapping( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) + raise models.DevSpacesErrorResponseException(self._deserialize, response) deserialized = None diff --git a/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/controllers_operations.py b/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/controllers_operations.py index 7c8f39c220c2..bcd78880c41a 100644 --- a/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/controllers_operations.py +++ b/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/controllers_operations.py @@ -58,14 +58,14 @@ def get( :rtype: ~azure.mgmt.devspaces.models.Controller or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorResponseException` + :class:`DevSpacesErrorResponseException` """ # Construct URL url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'name': self._serialize.url("name", name, 'str', max_length=31, min_length=3, pattern=r'^[a-zA-Z0-9](-?[a-zA-Z0-9])*$') + 'name': self._serialize.url("name", name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]([_-]*[a-zA-Z0-9])*$') } url = self._client.format_url(url, **path_format_arguments) @@ -88,7 +88,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + raise models.DevSpacesErrorResponseException(self._deserialize, response) deserialized = None @@ -110,7 +110,7 @@ def _create_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'name': self._serialize.url("name", name, 'str', max_length=31, min_length=3, pattern=r'^[a-zA-Z0-9](-?[a-zA-Z0-9])*$') + 'name': self._serialize.url("name", name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]([_-]*[a-zA-Z0-9])*$') } url = self._client.format_url(url, **path_format_arguments) @@ -137,7 +137,7 @@ def _create_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) + raise models.DevSpacesErrorResponseException(self._deserialize, response) deserialized = None @@ -178,7 +178,7 @@ def create( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.devspaces.models.Controller]] :raises: - :class:`ErrorResponseException` + :class:`DevSpacesErrorResponseException` """ raw_result = self._create_initial( resource_group_name=resource_group_name, @@ -215,7 +215,7 @@ def _delete_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'name': self._serialize.url("name", name, 'str', max_length=31, min_length=3, pattern=r'^[a-zA-Z0-9](-?[a-zA-Z0-9])*$') + 'name': self._serialize.url("name", name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]([_-]*[a-zA-Z0-9])*$') } url = self._client.format_url(url, **path_format_arguments) @@ -237,7 +237,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: - raise models.ErrorResponseException(self._deserialize, response) + raise models.DevSpacesErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -264,7 +264,7 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ErrorResponseException` + :class:`DevSpacesErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, @@ -289,7 +289,7 @@ def get_long_running_output(response): delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces/controllers/{name}'} def update( - self, resource_group_name, name, tags=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, tags=None, target_container_host_credentials_base64=None, custom_headers=None, raw=False, **operation_config): """Updates an Azure Dev Spaces Controller. Updates the properties of an existing Azure Dev Spaces Controller with @@ -302,6 +302,9 @@ def update( :type name: str :param tags: Tags for the Azure Dev Spaces Controller. :type tags: dict[str, str] + :param target_container_host_credentials_base64: Credentials of the + target container host (base64). + :type target_container_host_credentials_base64: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -311,16 +314,16 @@ def update( :rtype: ~azure.mgmt.devspaces.models.Controller or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorResponseException` + :class:`DevSpacesErrorResponseException` """ - controller_update_parameters = models.ControllerUpdateParameters(tags=tags) + controller_update_parameters = models.ControllerUpdateParameters(tags=tags, target_container_host_credentials_base64=target_container_host_credentials_base64) # Construct URL url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'name': self._serialize.url("name", name, 'str', max_length=31, min_length=3, pattern=r'^[a-zA-Z0-9](-?[a-zA-Z0-9])*$') + 'name': self._serialize.url("name", name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]([_-]*[a-zA-Z0-9])*$') } url = self._client.format_url(url, **path_format_arguments) @@ -346,13 +349,15 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + if response.status_code not in [200, 201]: + raise models.DevSpacesErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize('Controller', response) + if response.status_code == 201: + deserialized = self._deserialize('Controller', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -380,7 +385,7 @@ def list_by_resource_group( :rtype: ~azure.mgmt.devspaces.models.ControllerPaged[~azure.mgmt.devspaces.models.Controller] :raises: - :class:`ErrorResponseException` + :class:`DevSpacesErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -416,7 +421,7 @@ def internal_paging(next_link=None, raw=False): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + raise models.DevSpacesErrorResponseException(self._deserialize, response) return response @@ -447,7 +452,7 @@ def list( :rtype: ~azure.mgmt.devspaces.models.ControllerPaged[~azure.mgmt.devspaces.models.Controller] :raises: - :class:`ErrorResponseException` + :class:`DevSpacesErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -482,7 +487,7 @@ def internal_paging(next_link=None, raw=False): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + raise models.DevSpacesErrorResponseException(self._deserialize, response) return response @@ -522,7 +527,7 @@ def list_connection_details( :rtype: ~azure.mgmt.devspaces.models.ControllerConnectionDetailsList or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorResponseException` + :class:`DevSpacesErrorResponseException` """ list_connection_details_parameters = models.ListConnectionDetailsParameters(target_container_host_resource_id=target_container_host_resource_id) @@ -531,7 +536,7 @@ def list_connection_details( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'name': self._serialize.url("name", name, 'str', max_length=31, min_length=3, pattern=r'^[a-zA-Z0-9](-?[a-zA-Z0-9])*$') + 'name': self._serialize.url("name", name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]([_-]*[a-zA-Z0-9])*$') } url = self._client.format_url(url, **path_format_arguments) @@ -558,7 +563,7 @@ def list_connection_details( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + raise models.DevSpacesErrorResponseException(self._deserialize, response) deserialized = None