diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/MANIFEST.in b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/MANIFEST.in index a3cb07df87658..3a9b6517412bc 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/MANIFEST.in +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/_meta.json b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/_meta.json new file mode 100644 index 0000000000000..d2aa2fe77fa1f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "3.3.0", + "use": "@autorest/python@5.6.5", + "commit": "0ad2a66240354dc6deb9102049e8e9b52fcf81c5", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/servicefabricmanagedclusters/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.5 --version=3.3.0", + "readme": "specification/servicefabricmanagedclusters/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_configuration.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_configuration.py index 975f57d040a52..c976efafbcda5 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_configuration.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-01-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-servicefabricmanagedclusters/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_metadata.json b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_metadata.json index b80565ec14661..ed3b24fdbc9ab 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_metadata.json +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2021-01-01-preview", - "total_api_version_list": ["2021-01-01-preview"], + "chosen_version": "2021-05-01", + "total_api_version_list": ["2021-05-01"], "client": { "name": "ServiceFabricManagedClustersManagementClient", "filename": "_service_fabric_managed_clusters_management_client", @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": true + "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\": [\"ServiceFabricManagedClustersManagementClientConfiguration\"]}}, \"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\": [\"ServiceFabricManagedClustersManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "The customer subscription identifier.", "docstring_type": "str", "required": true @@ -42,14 +44,58 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "application_types": "ApplicationTypesOperations", @@ -57,11 +103,8 @@ "applications": "ApplicationsOperations", "services": "ServicesOperations", "managed_clusters": "ManagedClustersOperations", + "managed_cluster_version": "ManagedClusterVersionOperations", "operations": "Operations", "node_types": "NodeTypesOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_service_fabric_managed_clusters_management_client.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_service_fabric_managed_clusters_management_client.py index c990f1790a6da..77a12593eee0a 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_service_fabric_managed_clusters_management_client.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_service_fabric_managed_clusters_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import ServiceFabricManagedClustersManagementClientConfiguration from .operations import ApplicationTypesOperations @@ -23,6 +24,7 @@ from .operations import ApplicationsOperations from .operations import ServicesOperations from .operations import ManagedClustersOperations +from .operations import ManagedClusterVersionOperations from .operations import Operations from .operations import NodeTypesOperations from . import models @@ -41,6 +43,8 @@ class ServiceFabricManagedClustersManagementClient(object): :vartype services: service_fabric_managed_clusters_management_client.operations.ServicesOperations :ivar managed_clusters: ManagedClustersOperations operations :vartype managed_clusters: service_fabric_managed_clusters_management_client.operations.ManagedClustersOperations + :ivar managed_cluster_version: ManagedClusterVersionOperations operations + :vartype managed_cluster_version: service_fabric_managed_clusters_management_client.operations.ManagedClusterVersionOperations :ivar operations: Operations operations :vartype operations: service_fabric_managed_clusters_management_client.operations.Operations :ivar node_types: NodeTypesOperations operations @@ -68,6 +72,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.application_types = ApplicationTypesOperations( @@ -80,11 +85,31 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.managed_clusters = ManagedClustersOperations( self._client, self._config, self._serialize, self._deserialize) + self.managed_cluster_version = ManagedClusterVersionOperations( + self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) self.node_types = NodeTypesOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_version.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_version.py index e5754a47ce68f..eae7c95b6fbdb 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_version.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "0.1.0" diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/_configuration.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/_configuration.py index d7add0c2634eb..be8b70e0afee9 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/_configuration.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-01-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-servicefabricmanagedclusters/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/_service_fabric_managed_clusters_management_client.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/_service_fabric_managed_clusters_management_client.py index 64fd0b6c6a537..51f62426d059d 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/_service_fabric_managed_clusters_management_client.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/_service_fabric_managed_clusters_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -21,6 +22,7 @@ from .operations import ApplicationsOperations from .operations import ServicesOperations from .operations import ManagedClustersOperations +from .operations import ManagedClusterVersionOperations from .operations import Operations from .operations import NodeTypesOperations from .. import models @@ -39,6 +41,8 @@ class ServiceFabricManagedClustersManagementClient(object): :vartype services: service_fabric_managed_clusters_management_client.aio.operations.ServicesOperations :ivar managed_clusters: ManagedClustersOperations operations :vartype managed_clusters: service_fabric_managed_clusters_management_client.aio.operations.ManagedClustersOperations + :ivar managed_cluster_version: ManagedClusterVersionOperations operations + :vartype managed_cluster_version: service_fabric_managed_clusters_management_client.aio.operations.ManagedClusterVersionOperations :ivar operations: Operations operations :vartype operations: service_fabric_managed_clusters_management_client.aio.operations.Operations :ivar node_types: NodeTypesOperations operations @@ -65,6 +69,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.application_types = ApplicationTypesOperations( @@ -77,11 +82,30 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.managed_clusters = ManagedClustersOperations( self._client, self._config, self._serialize, self._deserialize) + self.managed_cluster_version = ManagedClusterVersionOperations( + self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) self.node_types = NodeTypesOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/__init__.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/__init__.py index 613aba52b2a2f..c4e1c9fcc149f 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/__init__.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/__init__.py @@ -11,6 +11,7 @@ from ._applications_operations import ApplicationsOperations from ._services_operations import ServicesOperations from ._managed_clusters_operations import ManagedClustersOperations +from ._managed_cluster_version_operations import ManagedClusterVersionOperations from ._operations import Operations from ._node_types_operations import NodeTypesOperations @@ -20,6 +21,7 @@ 'ApplicationsOperations', 'ServicesOperations', 'ManagedClustersOperations', + 'ManagedClusterVersionOperations', 'Operations', 'NodeTypesOperations', ] diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_application_type_versions_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_application_type_versions_operations.py index 2258aa3841e64..3d015523d791c 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_application_type_versions_operations.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_application_type_versions_operations.py @@ -74,7 +74,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -102,7 +102,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApplicationTypeVersionResource', pipeline_response) @@ -127,7 +127,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -160,7 +160,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -201,8 +201,8 @@ async def begin_create_or_update( :type parameters: ~service_fabric_managed_clusters_management_client.models.ApplicationTypeVersionResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ApplicationTypeVersionResource or the result of cls(response) @@ -292,7 +292,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -325,7 +325,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApplicationTypeVersionResource', pipeline_response) @@ -349,7 +349,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -377,7 +377,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -407,8 +407,8 @@ async def begin_delete( :type version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -489,7 +489,7 @@ def list_by_application_types( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -532,7 +532,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_application_types_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_application_types_operations.py index 0696e474977da..acabc81ba1603 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_application_types_operations.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_application_types_operations.py @@ -71,7 +71,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -98,7 +98,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApplicationTypeResource', pipeline_response) @@ -140,7 +140,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -172,7 +172,7 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApplicationTypeResource', pipeline_response) @@ -213,7 +213,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -245,7 +245,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApplicationTypeResource', pipeline_response) @@ -268,7 +268,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -295,7 +295,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -322,8 +322,8 @@ async def begin_delete( :type application_type_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -399,7 +399,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -441,7 +441,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_applications_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_applications_operations.py index 91e76a80f46b9..12087dffdcbf4 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_applications_operations.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_applications_operations.py @@ -71,7 +71,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -98,7 +98,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApplicationResource', pipeline_response) @@ -122,7 +122,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -154,7 +154,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -191,8 +191,8 @@ async def begin_create_or_update( :type parameters: ~service_fabric_managed_clusters_management_client.models.ApplicationResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ApplicationResource or the result of cls(response) @@ -277,7 +277,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -309,7 +309,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApplicationResource', pipeline_response) @@ -332,7 +332,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -359,7 +359,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -386,8 +386,8 @@ async def begin_delete( :type application_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -463,7 +463,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -505,7 +505,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_managed_cluster_version_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_managed_cluster_version_operations.py new file mode 100644 index 0000000000000..fb3ad9f6fc443 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_managed_cluster_version_operations.py @@ -0,0 +1,285 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ManagedClusterVersionOperations: + """ManagedClusterVersionOperations 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: ~service_fabric_managed_clusters_management_client.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 + + async def get( + self, + location: str, + cluster_version: str, + **kwargs + ) -> "_models.ManagedClusterCodeVersionResult": + """Gets information about a Service Fabric managed cluster code version available in the specified location. + + Gets information about an available Service Fabric managed cluster code version. + + :param location: The location for the cluster code versions. This is different from cluster + location. + :type location: str + :param cluster_version: The cluster code version. + :type cluster_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterCodeVersionResult, or the result of cls(response) + :rtype: ~service_fabric_managed_clusters_management_client.models.ManagedClusterCodeVersionResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterCodeVersionResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'clusterVersion': self._serialize.url("cluster_version", cluster_version, '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.ErrorModel, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterCodeVersionResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion}'} # type: ignore + + async def get_by_environment( + self, + location: str, + cluster_version: str, + **kwargs + ) -> "_models.ManagedClusterCodeVersionResult": + """Gets information about a Service Fabric cluster code version available for the specified environment. + + Gets information about an available Service Fabric cluster code version by environment. + + :param location: The location for the cluster code versions. This is different from cluster + location. + :type location: str + :param cluster_version: The cluster code version. + :type cluster_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterCodeVersionResult, or the result of cls(response) + :rtype: ~service_fabric_managed_clusters_management_client.models.ManagedClusterCodeVersionResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterCodeVersionResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + environment = "Windows" + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_by_environment.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'environment': self._serialize.url("environment", environment, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'clusterVersion': self._serialize.url("cluster_version", cluster_version, '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.ErrorModel, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterCodeVersionResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_by_environment.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion}'} # type: ignore + + async def list( + self, + location: str, + **kwargs + ) -> "_models.ManagedClusterCodeVersionListResult": + """Gets the list of Service Fabric cluster code versions available for the specified location. + + Gets all available code versions for Service Fabric cluster resources by location. + + :param location: The location for the cluster code versions. This is different from cluster + location. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterCodeVersionListResult, or the result of cls(response) + :rtype: ~service_fabric_managed_clusters_management_client.models.ManagedClusterCodeVersionListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterCodeVersionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + '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') + + # 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.ErrorModel, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterCodeVersionListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions'} # type: ignore + + async def list_by_environment( + self, + location: str, + **kwargs + ) -> "_models.ManagedClusterCodeVersionListResult": + """Gets the list of Service Fabric cluster code versions available for the specified environment. + + Gets all available code versions for Service Fabric cluster resources by environment. + + :param location: The location for the cluster code versions. This is different from cluster + location. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterCodeVersionListResult, or the result of cls(response) + :rtype: ~service_fabric_managed_clusters_management_client.models.ManagedClusterCodeVersionListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterCodeVersionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + environment = "Windows" + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_by_environment.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'environment': self._serialize.url("environment", environment, 'str'), + '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') + + # 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.ErrorModel, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterCodeVersionListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_environment.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions'} # type: ignore diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_managed_clusters_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_managed_clusters_operations.py index 0af10812c863d..38a4dd61cb126 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_managed_clusters_operations.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_managed_clusters_operations.py @@ -65,7 +65,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -106,7 +106,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -136,7 +136,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -176,7 +176,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -212,7 +212,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -238,7 +238,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagedCluster', pipeline_response) @@ -261,7 +261,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -292,7 +292,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -326,8 +326,8 @@ async def begin_create_or_update( :type parameters: ~service_fabric_managed_clusters_management_client.models.ManagedCluster :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) @@ -407,7 +407,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -438,7 +438,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagedCluster', pipeline_response) @@ -460,7 +460,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -486,7 +486,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -510,8 +510,8 @@ async def begin_delete( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_node_types_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_node_types_operations.py index 6b01591baf03b..b314254e8c179 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_node_types_operations.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_node_types_operations.py @@ -67,7 +67,7 @@ def list_by_managed_clusters( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -109,7 +109,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -133,7 +133,7 @@ async def _restart_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -165,7 +165,7 @@ async def _restart_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -196,8 +196,8 @@ async def begin_restart( :type parameters: ~service_fabric_managed_clusters_management_client.models.NodeTypeActionParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -262,7 +262,7 @@ async def _reimage_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -294,7 +294,7 @@ async def _reimage_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -325,8 +325,8 @@ async def begin_reimage( :type parameters: ~service_fabric_managed_clusters_management_client.models.NodeTypeActionParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -391,7 +391,7 @@ async def _delete_node_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -423,7 +423,7 @@ async def _delete_node_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -454,8 +454,8 @@ async def begin_delete_node( :type parameters: ~service_fabric_managed_clusters_management_client.models.NodeTypeActionParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -534,7 +534,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -561,7 +561,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NodeType', pipeline_response) @@ -585,7 +585,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -617,7 +617,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -654,8 +654,8 @@ async def begin_create_or_update( :type parameters: ~service_fabric_managed_clusters_management_client.models.NodeType :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NodeType or the result of cls(response) @@ -740,7 +740,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -772,7 +772,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NodeType', pipeline_response) @@ -795,7 +795,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -822,7 +822,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -849,8 +849,8 @@ async def begin_delete( :type node_type_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_operations.py index 5cf43c5c972a6..32c4eaa62e23c 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_operations.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/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-01-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -95,7 +95,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_services_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_services_operations.py index eabcaf551deb7..0d06f224a8ccc 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_services_operations.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_services_operations.py @@ -75,7 +75,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -103,7 +103,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ServiceResource', pipeline_response) @@ -128,7 +128,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -161,7 +161,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -202,8 +202,8 @@ async def begin_create_or_update( :type parameters: ~service_fabric_managed_clusters_management_client.models.ServiceResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ServiceResource or the result of cls(response) @@ -294,7 +294,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -327,7 +327,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ServiceResource', pipeline_response) @@ -351,7 +351,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -379,7 +379,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -410,8 +410,8 @@ async def begin_delete( :type service_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -492,7 +492,7 @@ def list_by_applications( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -535,7 +535,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/__init__.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/__init__.py index bc02491d4d47a..7a4058239b70c 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/__init__.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/__init__.py @@ -31,6 +31,8 @@ from ._models_py3 import ErrorModelError from ._models_py3 import LoadBalancingRule from ._models_py3 import ManagedCluster + from ._models_py3 import ManagedClusterCodeVersionListResult + from ._models_py3 import ManagedClusterCodeVersionResult from ._models_py3 import ManagedClusterListResult from ._models_py3 import ManagedClusterUpdateParameters from ._models_py3 import ManagedIdentity @@ -104,6 +106,8 @@ from ._models import ErrorModelError # type: ignore from ._models import LoadBalancingRule # type: ignore from ._models import ManagedCluster # type: ignore + from ._models import ManagedClusterCodeVersionListResult # type: ignore + from ._models import ManagedClusterCodeVersionResult # type: ignore from ._models import ManagedClusterListResult # type: ignore from ._models import ManagedClusterUpdateParameters # type: ignore from ._models import ManagedIdentity # type: ignore @@ -157,7 +161,9 @@ Access, ClusterState, ClusterUpgradeCadence, + ClusterUpgradeMode, Direction, + DiskType, FailureAction, ManagedClusterAddOnFeature, ManagedIdentityType, @@ -203,6 +209,8 @@ 'ErrorModelError', 'LoadBalancingRule', 'ManagedCluster', + 'ManagedClusterCodeVersionListResult', + 'ManagedClusterCodeVersionResult', 'ManagedClusterListResult', 'ManagedClusterUpdateParameters', 'ManagedIdentity', @@ -254,7 +262,9 @@ 'Access', 'ClusterState', 'ClusterUpgradeCadence', + 'ClusterUpgradeMode', 'Direction', + 'DiskType', 'FailureAction', 'ManagedClusterAddOnFeature', 'ManagedIdentityType', diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_models.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_models.py index cba99fcf4e055..9188002bf19e6 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_models.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_models.py @@ -551,10 +551,7 @@ class ApplicationUpgradePolicy(msrest.serialization.Model): :param instance_close_delay_duration: Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster upgrade, only for those instances which have - a non-zero delay duration configured in the service description. See - InstanceCloseDelayDurationSeconds property in StatelessServiceDescription for details. Note, - the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates that - the behavior will entirely depend on the delay configured in the stateless service description. + a non-zero delay duration configured in the service description. :type instance_close_delay_duration: long :param upgrade_mode: The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto. Possible values include: "Monitored", "UnmonitoredAuto". @@ -942,6 +939,9 @@ class LoadBalancingRule(msrest.serialization.Model): :param protocol: Required. The reference to the transport protocol used by the load balancing rule. Possible values include: "tcp", "udp". :type protocol: str or ~service_fabric_managed_clusters_management_client.models.Protocol + :param probe_port: The prob port used by the load balancing rule. Acceptable values are between + 1 and 65535. + :type probe_port: int :param probe_protocol: Required. the reference to the load balancer probe used by the load balancing rule. Possible values include: "tcp", "http", "https". :type probe_protocol: str or @@ -954,6 +954,7 @@ class LoadBalancingRule(msrest.serialization.Model): 'frontend_port': {'required': True, 'maximum': 65534, 'minimum': 1}, 'backend_port': {'required': True, 'maximum': 65534, 'minimum': 1}, 'protocol': {'required': True}, + 'probe_port': {'maximum': 65534, 'minimum': 1}, 'probe_protocol': {'required': True}, } @@ -961,6 +962,7 @@ class LoadBalancingRule(msrest.serialization.Model): 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, 'backend_port': {'key': 'backendPort', 'type': 'int'}, 'protocol': {'key': 'protocol', 'type': 'str'}, + 'probe_port': {'key': 'probePort', 'type': 'int'}, 'probe_protocol': {'key': 'probeProtocol', 'type': 'str'}, 'probe_request_path': {'key': 'probeRequestPath', 'type': 'str'}, } @@ -973,6 +975,7 @@ def __init__( self.frontend_port = kwargs['frontend_port'] self.backend_port = kwargs['backend_port'] self.protocol = kwargs['protocol'] + self.probe_port = kwargs.get('probe_port', None) self.probe_protocol = kwargs['probe_protocol'] self.probe_request_path = kwargs.get('probe_request_path', None) @@ -1106,13 +1109,18 @@ class ManagedCluster(Resource): :vartype provisioning_state: str or ~service_fabric_managed_clusters_management_client.models.ManagedResourceProvisioningState :param cluster_code_version: The Service Fabric runtime version of the cluster. This property - can only by set the user when **upgradeMode** is set to 'Manual'. To get list of available - Service Fabric versions for new clusters use `ClusterVersion API <./ClusterVersion.md>`_. To - get the list of available version for existing clusters use **availableClusterVersions**. + is required when **clusterUpgradeMode** is set to 'Manual'. To get list of available Service + Fabric versions for new clusters use `ClusterVersion API <./ClusterVersion.md>`_. To get the + list of available version for existing clusters use **availableClusterVersions**. :type cluster_code_version: str + :param cluster_upgrade_mode: The upgrade mode of the cluster when new Service Fabric runtime + version is available. Possible values include: "Automatic", "Manual". Default value: + "Automatic". + :type cluster_upgrade_mode: str or + ~service_fabric_managed_clusters_management_client.models.ClusterUpgradeMode :param cluster_upgrade_cadence: Indicates when new cluster runtime version upgrades will be - applied after they are released. By default is Wave0. Possible values include: "Wave0", - "Wave1", "Wave2". + applied after they are released. By default is Wave0. Only applies when **clusterUpgradeMode** + is set to 'Automatic'. Possible values include: "Wave0", "Wave1", "Wave2". :type cluster_upgrade_cadence: str or ~service_fabric_managed_clusters_management_client.models.ClusterUpgradeCadence :param addon_features: List of add-on features to enable on the cluster. @@ -1122,6 +1130,8 @@ class ManagedCluster(Resource): types that are created using any platform OS image with version 'latest'. The default value for this setting is false. :type enable_auto_os_upgrade: bool + :param zonal_resiliency: Indicates if the cluster has zone resiliency. + :type zonal_resiliency: bool :param application_type_versions_cleanup_policy: The policy used to clean up unused versions. :type application_type_versions_cleanup_policy: ~service_fabric_managed_clusters_management_client.models.ApplicationTypeVersionsCleanupPolicy @@ -1169,9 +1179,11 @@ class ManagedCluster(Resource): 'fabric_settings': {'key': 'properties.fabricSettings', 'type': '[SettingsSectionDescription]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'cluster_code_version': {'key': 'properties.clusterCodeVersion', 'type': 'str'}, + 'cluster_upgrade_mode': {'key': 'properties.clusterUpgradeMode', 'type': 'str'}, 'cluster_upgrade_cadence': {'key': 'properties.clusterUpgradeCadence', 'type': 'str'}, 'addon_features': {'key': 'properties.addonFeatures', 'type': '[str]'}, 'enable_auto_os_upgrade': {'key': 'properties.enableAutoOSUpgrade', 'type': 'bool'}, + 'zonal_resiliency': {'key': 'properties.zonalResiliency', 'type': 'bool'}, 'application_type_versions_cleanup_policy': {'key': 'properties.applicationTypeVersionsCleanupPolicy', 'type': 'ApplicationTypeVersionsCleanupPolicy'}, } @@ -1199,12 +1211,80 @@ def __init__( self.fabric_settings = kwargs.get('fabric_settings', None) self.provisioning_state = None self.cluster_code_version = kwargs.get('cluster_code_version', None) + self.cluster_upgrade_mode = kwargs.get('cluster_upgrade_mode', "Automatic") self.cluster_upgrade_cadence = kwargs.get('cluster_upgrade_cadence', None) self.addon_features = kwargs.get('addon_features', None) self.enable_auto_os_upgrade = kwargs.get('enable_auto_os_upgrade', None) + self.zonal_resiliency = kwargs.get('zonal_resiliency', False) self.application_type_versions_cleanup_policy = kwargs.get('application_type_versions_cleanup_policy', None) +class ManagedClusterCodeVersionListResult(msrest.serialization.Model): + """The list results of the Service Fabric runtime versions. + + :param value: + :type value: + list[~service_fabric_managed_clusters_management_client.models.ManagedClusterCodeVersionResult] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagedClusterCodeVersionResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterCodeVersionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ManagedClusterCodeVersionResult(msrest.serialization.Model): + """The result of the Service Fabric runtime versions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: The identification of the result. + :type id: str + :param name: The name of the result. + :type name: str + :param type: The result resource type. + :type type: str + :param code_version: The Service Fabric runtime version of the cluster. + :type code_version: str + :param support_expiry_utc: The date of expiry of support of the version. + :type support_expiry_utc: str + :ivar os_type: Cluster operating system, the default will be Windows. Default value: "Windows". + :vartype os_type: str + """ + + _validation = { + 'os_type': {'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'code_version': {'key': 'properties.codeVersion', 'type': 'str'}, + 'support_expiry_utc': {'key': 'properties.supportExpiryUtc', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + } + + os_type = "Windows" + + def __init__( + self, + **kwargs + ): + super(ManagedClusterCodeVersionResult, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.code_version = kwargs.get('code_version', None) + self.support_expiry_utc = kwargs.get('support_expiry_utc', None) + + class ManagedClusterListResult(msrest.serialization.Model): """Managed Cluster list results. @@ -1496,6 +1576,11 @@ class NodeType(ManagedProxyResource): :type vm_instance_count: int :param data_disk_size_gb: Disk size for each vm in the node type in GBs. :type data_disk_size_gb: int + :param data_disk_type: Managed data disk type. IOPS and throughput are given by the disk size, + to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks- + types. Possible values include: "Standard_LRS", "StandardSSD_LRS", "Premium_LRS". Default + value: "StandardSSD_LRS". + :type data_disk_type: str or ~service_fabric_managed_clusters_management_client.models.DiskType :param placement_properties: The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run. :type placement_properties: dict[str, str] @@ -1535,6 +1620,8 @@ class NodeType(ManagedProxyResource): :param vm_managed_identity: Identities for the virtual machine scale set under the node type. :type vm_managed_identity: ~service_fabric_managed_clusters_management_client.models.VmManagedIdentity + :param is_stateless: Indicates if the node type can only host Stateless workloads. + :type is_stateless: bool :ivar provisioning_state: The provisioning state of the managed cluster resource. Possible values include: "None", "Creating", "Created", "Updating", "Succeeded", "Failed", "Canceled", "Deleting", "Deleted", "Other". @@ -1560,6 +1647,7 @@ class NodeType(ManagedProxyResource): 'is_primary': {'key': 'properties.isPrimary', 'type': 'bool'}, 'vm_instance_count': {'key': 'properties.vmInstanceCount', 'type': 'int'}, 'data_disk_size_gb': {'key': 'properties.dataDiskSizeGB', 'type': 'int'}, + 'data_disk_type': {'key': 'properties.dataDiskType', 'type': 'str'}, 'placement_properties': {'key': 'properties.placementProperties', 'type': '{str}'}, 'capacities': {'key': 'properties.capacities', 'type': '{str}'}, 'application_ports': {'key': 'properties.applicationPorts', 'type': 'EndpointRangeDescription'}, @@ -1572,6 +1660,7 @@ class NodeType(ManagedProxyResource): 'vm_secrets': {'key': 'properties.vmSecrets', 'type': '[VaultSecretGroup]'}, 'vm_extensions': {'key': 'properties.vmExtensions', 'type': '[VMSSExtension]'}, 'vm_managed_identity': {'key': 'properties.vmManagedIdentity', 'type': 'VmManagedIdentity'}, + 'is_stateless': {'key': 'properties.isStateless', 'type': 'bool'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -1583,6 +1672,7 @@ def __init__( self.is_primary = kwargs.get('is_primary', None) self.vm_instance_count = kwargs.get('vm_instance_count', None) self.data_disk_size_gb = kwargs.get('data_disk_size_gb', None) + self.data_disk_type = kwargs.get('data_disk_type', "StandardSSD_LRS") self.placement_properties = kwargs.get('placement_properties', None) self.capacities = kwargs.get('capacities', None) self.application_ports = kwargs.get('application_ports', None) @@ -1595,6 +1685,7 @@ def __init__( self.vm_secrets = kwargs.get('vm_secrets', None) self.vm_extensions = kwargs.get('vm_extensions', None) self.vm_managed_identity = kwargs.get('vm_managed_identity', None) + self.is_stateless = kwargs.get('is_stateless', False) self.provisioning_state = None @@ -2353,9 +2444,6 @@ class ServiceResourceProperties(ServiceResourcePropertiesBase): values include: "SharedProcess", "ExclusiveProcess". :type service_package_activation_mode: str or ~service_fabric_managed_clusters_management_client.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS system service to be - enabled in Service Fabric cluster. - :type service_dns_name: str """ _validation = { @@ -2377,7 +2465,6 @@ class ServiceResourceProperties(ServiceResourcePropertiesBase): 'service_type_name': {'key': 'serviceTypeName', 'type': 'str'}, 'partition_description': {'key': 'partitionDescription', 'type': 'Partition'}, 'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'}, } _subtype_map = { @@ -2394,7 +2481,6 @@ def __init__( self.service_type_name = kwargs['service_type_name'] self.partition_description = kwargs['partition_description'] self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) - self.service_dns_name = kwargs.get('service_dns_name', None) class ServiceTypeHealthPolicy(msrest.serialization.Model): @@ -2638,9 +2724,6 @@ class StatefulServiceProperties(ServiceResourceProperties): values include: "SharedProcess", "ExclusiveProcess". :type service_package_activation_mode: str or ~service_fabric_managed_clusters_management_client.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS system service to be - enabled in Service Fabric cluster. - :type service_dns_name: str :param has_persisted_state: A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. :type has_persisted_state: bool @@ -2687,7 +2770,6 @@ class StatefulServiceProperties(ServiceResourceProperties): 'service_type_name': {'key': 'serviceTypeName', 'type': 'str'}, 'partition_description': {'key': 'partitionDescription', 'type': 'Partition'}, 'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'}, 'has_persisted_state': {'key': 'hasPersistedState', 'type': 'bool'}, 'target_replica_set_size': {'key': 'targetReplicaSetSize', 'type': 'int'}, 'min_replica_set_size': {'key': 'minReplicaSetSize', 'type': 'int'}, @@ -2761,9 +2843,6 @@ class StatelessServiceProperties(ServiceResourceProperties): values include: "SharedProcess", "ExclusiveProcess". :type service_package_activation_mode: str or ~service_fabric_managed_clusters_management_client.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS system service to be - enabled in Service Fabric cluster. - :type service_dns_name: str :param instance_count: Required. The instance count. :type instance_count: int :param min_instance_count: MinInstanceCount is the minimum number of instances that must be up @@ -2780,19 +2859,6 @@ class StatelessServiceProperties(ServiceResourceProperties): MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. :type min_instance_percentage: int - :param instance_close_delay_duration: Duration represented in ISO 8601 format "hh:mm:ss", to - wait before a stateless instance is closed, to allow the active requests to drain gracefully. - This would be effective when the instance is closing during the application/cluster upgrade and - disabling node. The endpoint exposed on this instance is removed prior to starting the delay, - which prevents new connections to this instance. In addition, clients that have subscribed to - service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do the following upon receiving the endpoint removal notification: - Stop sending new - requests to this instance. - Close existing connections after in-flight requests have - completed. - Connect to a different instance of the service partition for future requests. - Note, the default value of InstanceCloseDelayDuration is 0, which indicates that there won't be - any delay or removal of the endpoint prior to closing the instance. - :type instance_close_delay_duration: str """ _validation = { @@ -2815,11 +2881,9 @@ class StatelessServiceProperties(ServiceResourceProperties): 'service_type_name': {'key': 'serviceTypeName', 'type': 'str'}, 'partition_description': {'key': 'partitionDescription', 'type': 'Partition'}, 'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'}, 'instance_count': {'key': 'instanceCount', 'type': 'int'}, 'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'}, 'min_instance_percentage': {'key': 'minInstancePercentage', 'type': 'int'}, - 'instance_close_delay_duration': {'key': 'instanceCloseDelayDuration', 'type': 'str'}, } def __init__( @@ -2831,7 +2895,6 @@ def __init__( self.instance_count = kwargs['instance_count'] self.min_instance_count = kwargs.get('min_instance_count', None) self.min_instance_percentage = kwargs.get('min_instance_percentage', None) - self.instance_close_delay_duration = kwargs.get('instance_close_delay_duration', "0") class SubResource(msrest.serialization.Model): diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_models_py3.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_models_py3.py index 7cc55bc464097..beb5dda40971e 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_models_py3.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_models_py3.py @@ -597,10 +597,7 @@ class ApplicationUpgradePolicy(msrest.serialization.Model): :param instance_close_delay_duration: Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster upgrade, only for those instances which have - a non-zero delay duration configured in the service description. See - InstanceCloseDelayDurationSeconds property in StatelessServiceDescription for details. Note, - the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates that - the behavior will entirely depend on the delay configured in the stateless service description. + a non-zero delay duration configured in the service description. :type instance_close_delay_duration: long :param upgrade_mode: The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto. Possible values include: "Monitored", "UnmonitoredAuto". @@ -1031,6 +1028,9 @@ class LoadBalancingRule(msrest.serialization.Model): :param protocol: Required. The reference to the transport protocol used by the load balancing rule. Possible values include: "tcp", "udp". :type protocol: str or ~service_fabric_managed_clusters_management_client.models.Protocol + :param probe_port: The prob port used by the load balancing rule. Acceptable values are between + 1 and 65535. + :type probe_port: int :param probe_protocol: Required. the reference to the load balancer probe used by the load balancing rule. Possible values include: "tcp", "http", "https". :type probe_protocol: str or @@ -1043,6 +1043,7 @@ class LoadBalancingRule(msrest.serialization.Model): 'frontend_port': {'required': True, 'maximum': 65534, 'minimum': 1}, 'backend_port': {'required': True, 'maximum': 65534, 'minimum': 1}, 'protocol': {'required': True}, + 'probe_port': {'maximum': 65534, 'minimum': 1}, 'probe_protocol': {'required': True}, } @@ -1050,6 +1051,7 @@ class LoadBalancingRule(msrest.serialization.Model): 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, 'backend_port': {'key': 'backendPort', 'type': 'int'}, 'protocol': {'key': 'protocol', 'type': 'str'}, + 'probe_port': {'key': 'probePort', 'type': 'int'}, 'probe_protocol': {'key': 'probeProtocol', 'type': 'str'}, 'probe_request_path': {'key': 'probeRequestPath', 'type': 'str'}, } @@ -1061,6 +1063,7 @@ def __init__( backend_port: int, protocol: Union[str, "Protocol"], probe_protocol: Union[str, "ProbeProtocol"], + probe_port: Optional[int] = None, probe_request_path: Optional[str] = None, **kwargs ): @@ -1068,6 +1071,7 @@ def __init__( self.frontend_port = frontend_port self.backend_port = backend_port self.protocol = protocol + self.probe_port = probe_port self.probe_protocol = probe_protocol self.probe_request_path = probe_request_path @@ -1204,13 +1208,18 @@ class ManagedCluster(Resource): :vartype provisioning_state: str or ~service_fabric_managed_clusters_management_client.models.ManagedResourceProvisioningState :param cluster_code_version: The Service Fabric runtime version of the cluster. This property - can only by set the user when **upgradeMode** is set to 'Manual'. To get list of available - Service Fabric versions for new clusters use `ClusterVersion API <./ClusterVersion.md>`_. To - get the list of available version for existing clusters use **availableClusterVersions**. + is required when **clusterUpgradeMode** is set to 'Manual'. To get list of available Service + Fabric versions for new clusters use `ClusterVersion API <./ClusterVersion.md>`_. To get the + list of available version for existing clusters use **availableClusterVersions**. :type cluster_code_version: str + :param cluster_upgrade_mode: The upgrade mode of the cluster when new Service Fabric runtime + version is available. Possible values include: "Automatic", "Manual". Default value: + "Automatic". + :type cluster_upgrade_mode: str or + ~service_fabric_managed_clusters_management_client.models.ClusterUpgradeMode :param cluster_upgrade_cadence: Indicates when new cluster runtime version upgrades will be - applied after they are released. By default is Wave0. Possible values include: "Wave0", - "Wave1", "Wave2". + applied after they are released. By default is Wave0. Only applies when **clusterUpgradeMode** + is set to 'Automatic'. Possible values include: "Wave0", "Wave1", "Wave2". :type cluster_upgrade_cadence: str or ~service_fabric_managed_clusters_management_client.models.ClusterUpgradeCadence :param addon_features: List of add-on features to enable on the cluster. @@ -1220,6 +1229,8 @@ class ManagedCluster(Resource): types that are created using any platform OS image with version 'latest'. The default value for this setting is false. :type enable_auto_os_upgrade: bool + :param zonal_resiliency: Indicates if the cluster has zone resiliency. + :type zonal_resiliency: bool :param application_type_versions_cleanup_policy: The policy used to clean up unused versions. :type application_type_versions_cleanup_policy: ~service_fabric_managed_clusters_management_client.models.ApplicationTypeVersionsCleanupPolicy @@ -1267,9 +1278,11 @@ class ManagedCluster(Resource): 'fabric_settings': {'key': 'properties.fabricSettings', 'type': '[SettingsSectionDescription]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'cluster_code_version': {'key': 'properties.clusterCodeVersion', 'type': 'str'}, + 'cluster_upgrade_mode': {'key': 'properties.clusterUpgradeMode', 'type': 'str'}, 'cluster_upgrade_cadence': {'key': 'properties.clusterUpgradeCadence', 'type': 'str'}, 'addon_features': {'key': 'properties.addonFeatures', 'type': '[str]'}, 'enable_auto_os_upgrade': {'key': 'properties.enableAutoOSUpgrade', 'type': 'bool'}, + 'zonal_resiliency': {'key': 'properties.zonalResiliency', 'type': 'bool'}, 'application_type_versions_cleanup_policy': {'key': 'properties.applicationTypeVersionsCleanupPolicy', 'type': 'ApplicationTypeVersionsCleanupPolicy'}, } @@ -1291,9 +1304,11 @@ def __init__( azure_active_directory: Optional["AzureActiveDirectory"] = None, fabric_settings: Optional[List["SettingsSectionDescription"]] = None, cluster_code_version: Optional[str] = None, + cluster_upgrade_mode: Optional[Union[str, "ClusterUpgradeMode"]] = "Automatic", cluster_upgrade_cadence: Optional[Union[str, "ClusterUpgradeCadence"]] = None, addon_features: Optional[List[Union[str, "ManagedClusterAddOnFeature"]]] = None, enable_auto_os_upgrade: Optional[bool] = None, + zonal_resiliency: Optional[bool] = False, application_type_versions_cleanup_policy: Optional["ApplicationTypeVersionsCleanupPolicy"] = None, **kwargs ): @@ -1317,12 +1332,88 @@ def __init__( self.fabric_settings = fabric_settings self.provisioning_state = None self.cluster_code_version = cluster_code_version + self.cluster_upgrade_mode = cluster_upgrade_mode self.cluster_upgrade_cadence = cluster_upgrade_cadence self.addon_features = addon_features self.enable_auto_os_upgrade = enable_auto_os_upgrade + self.zonal_resiliency = zonal_resiliency self.application_type_versions_cleanup_policy = application_type_versions_cleanup_policy +class ManagedClusterCodeVersionListResult(msrest.serialization.Model): + """The list results of the Service Fabric runtime versions. + + :param value: + :type value: + list[~service_fabric_managed_clusters_management_client.models.ManagedClusterCodeVersionResult] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagedClusterCodeVersionResult]'}, + } + + def __init__( + self, + *, + value: Optional[List["ManagedClusterCodeVersionResult"]] = None, + **kwargs + ): + super(ManagedClusterCodeVersionListResult, self).__init__(**kwargs) + self.value = value + + +class ManagedClusterCodeVersionResult(msrest.serialization.Model): + """The result of the Service Fabric runtime versions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: The identification of the result. + :type id: str + :param name: The name of the result. + :type name: str + :param type: The result resource type. + :type type: str + :param code_version: The Service Fabric runtime version of the cluster. + :type code_version: str + :param support_expiry_utc: The date of expiry of support of the version. + :type support_expiry_utc: str + :ivar os_type: Cluster operating system, the default will be Windows. Default value: "Windows". + :vartype os_type: str + """ + + _validation = { + 'os_type': {'constant': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'code_version': {'key': 'properties.codeVersion', 'type': 'str'}, + 'support_expiry_utc': {'key': 'properties.supportExpiryUtc', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + } + + os_type = "Windows" + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + code_version: Optional[str] = None, + support_expiry_utc: Optional[str] = None, + **kwargs + ): + super(ManagedClusterCodeVersionResult, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.code_version = code_version + self.support_expiry_utc = support_expiry_utc + + class ManagedClusterListResult(msrest.serialization.Model): """Managed Cluster list results. @@ -1637,6 +1728,11 @@ class NodeType(ManagedProxyResource): :type vm_instance_count: int :param data_disk_size_gb: Disk size for each vm in the node type in GBs. :type data_disk_size_gb: int + :param data_disk_type: Managed data disk type. IOPS and throughput are given by the disk size, + to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks- + types. Possible values include: "Standard_LRS", "StandardSSD_LRS", "Premium_LRS". Default + value: "StandardSSD_LRS". + :type data_disk_type: str or ~service_fabric_managed_clusters_management_client.models.DiskType :param placement_properties: The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run. :type placement_properties: dict[str, str] @@ -1676,6 +1772,8 @@ class NodeType(ManagedProxyResource): :param vm_managed_identity: Identities for the virtual machine scale set under the node type. :type vm_managed_identity: ~service_fabric_managed_clusters_management_client.models.VmManagedIdentity + :param is_stateless: Indicates if the node type can only host Stateless workloads. + :type is_stateless: bool :ivar provisioning_state: The provisioning state of the managed cluster resource. Possible values include: "None", "Creating", "Created", "Updating", "Succeeded", "Failed", "Canceled", "Deleting", "Deleted", "Other". @@ -1701,6 +1799,7 @@ class NodeType(ManagedProxyResource): 'is_primary': {'key': 'properties.isPrimary', 'type': 'bool'}, 'vm_instance_count': {'key': 'properties.vmInstanceCount', 'type': 'int'}, 'data_disk_size_gb': {'key': 'properties.dataDiskSizeGB', 'type': 'int'}, + 'data_disk_type': {'key': 'properties.dataDiskType', 'type': 'str'}, 'placement_properties': {'key': 'properties.placementProperties', 'type': '{str}'}, 'capacities': {'key': 'properties.capacities', 'type': '{str}'}, 'application_ports': {'key': 'properties.applicationPorts', 'type': 'EndpointRangeDescription'}, @@ -1713,6 +1812,7 @@ class NodeType(ManagedProxyResource): 'vm_secrets': {'key': 'properties.vmSecrets', 'type': '[VaultSecretGroup]'}, 'vm_extensions': {'key': 'properties.vmExtensions', 'type': '[VMSSExtension]'}, 'vm_managed_identity': {'key': 'properties.vmManagedIdentity', 'type': 'VmManagedIdentity'}, + 'is_stateless': {'key': 'properties.isStateless', 'type': 'bool'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -1723,6 +1823,7 @@ def __init__( is_primary: Optional[bool] = None, vm_instance_count: Optional[int] = None, data_disk_size_gb: Optional[int] = None, + data_disk_type: Optional[Union[str, "DiskType"]] = "StandardSSD_LRS", placement_properties: Optional[Dict[str, str]] = None, capacities: Optional[Dict[str, str]] = None, application_ports: Optional["EndpointRangeDescription"] = None, @@ -1735,12 +1836,14 @@ def __init__( vm_secrets: Optional[List["VaultSecretGroup"]] = None, vm_extensions: Optional[List["VMSSExtension"]] = None, vm_managed_identity: Optional["VmManagedIdentity"] = None, + is_stateless: Optional[bool] = False, **kwargs ): super(NodeType, self).__init__(tags=tags, **kwargs) self.is_primary = is_primary self.vm_instance_count = vm_instance_count self.data_disk_size_gb = data_disk_size_gb + self.data_disk_type = data_disk_type self.placement_properties = placement_properties self.capacities = capacities self.application_ports = application_ports @@ -1753,6 +1856,7 @@ def __init__( self.vm_secrets = vm_secrets self.vm_extensions = vm_extensions self.vm_managed_identity = vm_managed_identity + self.is_stateless = is_stateless self.provisioning_state = None @@ -2571,9 +2675,6 @@ class ServiceResourceProperties(ServiceResourcePropertiesBase): values include: "SharedProcess", "ExclusiveProcess". :type service_package_activation_mode: str or ~service_fabric_managed_clusters_management_client.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS system service to be - enabled in Service Fabric cluster. - :type service_dns_name: str """ _validation = { @@ -2595,7 +2696,6 @@ class ServiceResourceProperties(ServiceResourcePropertiesBase): 'service_type_name': {'key': 'serviceTypeName', 'type': 'str'}, 'partition_description': {'key': 'partitionDescription', 'type': 'Partition'}, 'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'}, } _subtype_map = { @@ -2614,7 +2714,6 @@ def __init__( default_move_cost: Optional[Union[str, "MoveCost"]] = None, scaling_policies: Optional[List["ScalingPolicy"]] = None, service_package_activation_mode: Optional[Union[str, "ServicePackageActivationMode"]] = None, - service_dns_name: Optional[str] = None, **kwargs ): super(ServiceResourceProperties, self).__init__(placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, **kwargs) @@ -2623,7 +2722,6 @@ def __init__( self.service_type_name = service_type_name self.partition_description = partition_description self.service_package_activation_mode = service_package_activation_mode - self.service_dns_name = service_dns_name class ServiceTypeHealthPolicy(msrest.serialization.Model): @@ -2881,9 +2979,6 @@ class StatefulServiceProperties(ServiceResourceProperties): values include: "SharedProcess", "ExclusiveProcess". :type service_package_activation_mode: str or ~service_fabric_managed_clusters_management_client.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS system service to be - enabled in Service Fabric cluster. - :type service_dns_name: str :param has_persisted_state: A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. :type has_persisted_state: bool @@ -2930,7 +3025,6 @@ class StatefulServiceProperties(ServiceResourceProperties): 'service_type_name': {'key': 'serviceTypeName', 'type': 'str'}, 'partition_description': {'key': 'partitionDescription', 'type': 'Partition'}, 'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'}, 'has_persisted_state': {'key': 'hasPersistedState', 'type': 'bool'}, 'target_replica_set_size': {'key': 'targetReplicaSetSize', 'type': 'int'}, 'min_replica_set_size': {'key': 'minReplicaSetSize', 'type': 'int'}, @@ -2953,7 +3047,6 @@ def __init__( default_move_cost: Optional[Union[str, "MoveCost"]] = None, scaling_policies: Optional[List["ScalingPolicy"]] = None, service_package_activation_mode: Optional[Union[str, "ServicePackageActivationMode"]] = None, - service_dns_name: Optional[str] = None, has_persisted_state: Optional[bool] = None, target_replica_set_size: Optional[int] = None, min_replica_set_size: Optional[int] = None, @@ -2964,7 +3057,7 @@ def __init__( drop_source_replica_on_move: Optional[bool] = None, **kwargs ): - super(StatefulServiceProperties, self).__init__(placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_type_name=service_type_name, partition_description=partition_description, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, **kwargs) + super(StatefulServiceProperties, self).__init__(placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_type_name=service_type_name, partition_description=partition_description, service_package_activation_mode=service_package_activation_mode, **kwargs) self.service_kind = 'Stateful' # type: str self.has_persisted_state = has_persisted_state self.target_replica_set_size = target_replica_set_size @@ -3023,9 +3116,6 @@ class StatelessServiceProperties(ServiceResourceProperties): values include: "SharedProcess", "ExclusiveProcess". :type service_package_activation_mode: str or ~service_fabric_managed_clusters_management_client.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS system service to be - enabled in Service Fabric cluster. - :type service_dns_name: str :param instance_count: Required. The instance count. :type instance_count: int :param min_instance_count: MinInstanceCount is the minimum number of instances that must be up @@ -3042,19 +3132,6 @@ class StatelessServiceProperties(ServiceResourceProperties): MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. :type min_instance_percentage: int - :param instance_close_delay_duration: Duration represented in ISO 8601 format "hh:mm:ss", to - wait before a stateless instance is closed, to allow the active requests to drain gracefully. - This would be effective when the instance is closing during the application/cluster upgrade and - disabling node. The endpoint exposed on this instance is removed prior to starting the delay, - which prevents new connections to this instance. In addition, clients that have subscribed to - service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do the following upon receiving the endpoint removal notification: - Stop sending new - requests to this instance. - Close existing connections after in-flight requests have - completed. - Connect to a different instance of the service partition for future requests. - Note, the default value of InstanceCloseDelayDuration is 0, which indicates that there won't be - any delay or removal of the endpoint prior to closing the instance. - :type instance_close_delay_duration: str """ _validation = { @@ -3077,11 +3154,9 @@ class StatelessServiceProperties(ServiceResourceProperties): 'service_type_name': {'key': 'serviceTypeName', 'type': 'str'}, 'partition_description': {'key': 'partitionDescription', 'type': 'Partition'}, 'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'}, 'instance_count': {'key': 'instanceCount', 'type': 'int'}, 'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'}, 'min_instance_percentage': {'key': 'minInstancePercentage', 'type': 'int'}, - 'instance_close_delay_duration': {'key': 'instanceCloseDelayDuration', 'type': 'str'}, } def __init__( @@ -3097,18 +3172,15 @@ def __init__( default_move_cost: Optional[Union[str, "MoveCost"]] = None, scaling_policies: Optional[List["ScalingPolicy"]] = None, service_package_activation_mode: Optional[Union[str, "ServicePackageActivationMode"]] = None, - service_dns_name: Optional[str] = None, min_instance_count: Optional[int] = None, min_instance_percentage: Optional[int] = None, - instance_close_delay_duration: Optional[str] = "0", **kwargs ): - super(StatelessServiceProperties, self).__init__(placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_type_name=service_type_name, partition_description=partition_description, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, **kwargs) + super(StatelessServiceProperties, self).__init__(placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_type_name=service_type_name, partition_description=partition_description, service_package_activation_mode=service_package_activation_mode, **kwargs) self.service_kind = 'Stateless' # type: str self.instance_count = instance_count self.min_instance_count = min_instance_count self.min_instance_percentage = min_instance_percentage - self.instance_close_delay_duration = instance_close_delay_duration class SubResource(msrest.serialization.Model): diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_service_fabric_managed_clusters_management_client_enums.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_service_fabric_managed_clusters_management_client_enums.py index 8bd1bd636f510..28bbae925d8c2 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_service_fabric_managed_clusters_management_client_enums.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_service_fabric_managed_clusters_management_client_enums.py @@ -35,25 +35,22 @@ class Access(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): class ClusterState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The current state of the cluster. - - - * WaitingForNodes - Indicates that the cluster resource is created and the resource provider is - waiting for Service Fabric VM extension to boot up and report to it. - * Deploying - Indicates that the Service Fabric runtime is being installed on the VMs. Cluster - resource will be in this state until the cluster boots up and system services are up. - * BaselineUpgrade - Indicates that the cluster is upgrading to establishes the cluster version. - This upgrade is automatically initiated when the cluster boots up for the first time. - * Upgrading - Indicates that the cluster is being upgraded with the user provided - configuration. - * UpgradeFailed - Indicates that the last upgrade for the cluster has failed. - * Ready - Indicates that the cluster is in a stable state. """ + #: Indicates that the cluster resource is created and the resource provider is waiting for Service + #: Fabric VM extension to boot up and report to it. WAITING_FOR_NODES = "WaitingForNodes" + #: Indicates that the Service Fabric runtime is being installed on the VMs. Cluster resource will + #: be in this state until the cluster boots up and system services are up. DEPLOYING = "Deploying" + #: Indicates that the cluster is upgrading to establishes the cluster version. This upgrade is + #: automatically initiated when the cluster boots up for the first time. BASELINE_UPGRADE = "BaselineUpgrade" + #: Indicates that the cluster is being upgraded with the user provided configuration. UPGRADING = "Upgrading" + #: Indicates that the last upgrade for the cluster has failed. UPGRADE_FAILED = "UpgradeFailed" + #: Indicates that the cluster is in a stable state. READY = "Ready" class ClusterUpgradeCadence(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): @@ -61,9 +58,27 @@ class ClusterUpgradeCadence(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) default is Wave0. """ - WAVE0 = "Wave0" #: Cluster upgrade starts immediately after a new version is rolled out. Recommended for Test/Dev clusters. - WAVE1 = "Wave1" #: Cluster upgrade starts 7 days after a new version is rolled out. Recommended for Pre-prod clusters. - WAVE2 = "Wave2" #: Cluster upgrade starts 14 days after a new version is rolled out. Recommended for Production clusters. + #: Cluster upgrade starts immediately after a new version is rolled out. Recommended for Test/Dev + #: clusters. + WAVE0 = "Wave0" + #: Cluster upgrade starts 7 days after a new version is rolled out. Recommended for Pre-prod + #: clusters. + WAVE1 = "Wave1" + #: Cluster upgrade starts 14 days after a new version is rolled out. Recommended for Production + #: clusters. + WAVE2 = "Wave2" + +class ClusterUpgradeMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The upgrade mode of the cluster when new Service Fabric runtime version is available. + """ + + #: The cluster will be automatically upgraded to the latest Service Fabric runtime version, + #: **clusterUpgradeCadence** will determine when the upgrade starts after the new version becomes + #: available. + AUTOMATIC = "Automatic" + #: The cluster will not be automatically upgraded to the latest Service Fabric runtime version. + #: The cluster is upgraded by setting the **clusterCodeVersion** property in the cluster resource. + MANUAL = "Manual" class Direction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Network security rule direction. @@ -72,6 +87,19 @@ class Direction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): INBOUND = "inbound" OUTBOUND = "outbound" +class DiskType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Managed data disk type. IOPS and throughput are given by the disk size, to see more information + go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types. + """ + + #: Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access. + STANDARD_LRS = "Standard_LRS" + #: Standard SSD locally redundant storage. Best for web servers, lightly used enterprise + #: applications and dev/test. + STANDARD_SSD_LRS = "StandardSSD_LRS" + #: Premium SSD locally redundant storage. Best for production and performance sensitive workloads. + PREMIUM_LRS = "Premium_LRS" + class FailureAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies @@ -79,8 +107,12 @@ class FailureAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): switch to UnmonitoredManual upgrade mode. """ - ROLLBACK = "Rollback" #: Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade fails. - MANUAL = "Manual" #: Indicates that a manual repair will need to be performed by the administrator if the upgrade fails. Service Fabric will not proceed to the next upgrade domain automatically. + #: Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade + #: fails. + ROLLBACK = "Rollback" + #: Indicates that a manual repair will need to be performed by the administrator if the upgrade + #: fails. Service Fabric will not proceed to the next upgrade domain automatically. + MANUAL = "Manual" class ManagedClusterAddOnFeature(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Available cluster add-on features @@ -94,10 +126,15 @@ class ManagedIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The type of managed identity for the resource. """ - NONE = "None" #: Indicates that no identity is associated with the resource. - SYSTEM_ASSIGNED = "SystemAssigned" #: Indicates that system assigned identity is associated with the resource. - USER_ASSIGNED = "UserAssigned" #: Indicates that user assigned identity is associated with the resource. - SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned" #: Indicates that both system assigned and user assigned identity are associated with the resource. + #: Indicates that no identity is associated with the resource. + NONE = "None" + #: Indicates that system assigned identity is associated with the resource. + SYSTEM_ASSIGNED = "SystemAssigned" + #: Indicates that user assigned identity is associated with the resource. + USER_ASSIGNED = "UserAssigned" + #: Indicates that both system assigned and user assigned identity are associated with the + #: resource. + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned" class ManagedResourceProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The provisioning state of the managed resource. @@ -118,10 +155,14 @@ class MoveCost(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Specifies the move cost for the service. """ - ZERO = "Zero" #: Zero move cost. This value is zero. - LOW = "Low" #: Specifies the move cost of the service as Low. The value is 1. - MEDIUM = "Medium" #: Specifies the move cost of the service as Medium. The value is 2. - HIGH = "High" #: Specifies the move cost of the service as High. The value is 3. + #: Zero move cost. This value is zero. + ZERO = "Zero" + #: Specifies the move cost of the service as Low. The value is 1. + LOW = "Low" + #: Specifies the move cost of the service as Medium. The value is 2. + MEDIUM = "Medium" + #: Specifies the move cost of the service as High. The value is 3. + HIGH = "High" class NsgProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Network protocol this rule applies to. @@ -139,9 +180,15 @@ class PartitionScheme(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Enumerates the ways that a service can be partitioned. """ - SINGLETON = "Singleton" #: Indicates that the partition is based on string names, and is a SingletonPartitionScheme object, The value is 0. - UNIFORM_INT64_RANGE = "UniformInt64Range" #: Indicates that the partition is based on Int64 key ranges, and is a UniformInt64RangePartitionScheme object. The value is 1. - NAMED = "Named" #: Indicates that the partition is based on string names, and is a NamedPartitionScheme object. The value is 2. + #: Indicates that the partition is based on string names, and is a SingletonPartitionScheme + #: object, The value is 0. + SINGLETON = "Singleton" + #: Indicates that the partition is based on Int64 key ranges, and is a + #: UniformInt64RangePartitionScheme object. The value is 1. + UNIFORM_INT64_RANGE = "UniformInt64Range" + #: Indicates that the partition is based on string names, and is a NamedPartitionScheme object. + #: The value is 2. + NAMED = "Named" class ProbeProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """the reference to the load balancer probe used by the load balancing rule. @@ -163,22 +210,35 @@ class RollingUpgradeMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): UnmonitoredAuto. """ - MONITORED = "Monitored" #: The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. The value is 0. - UNMONITORED_AUTO = "UnmonitoredAuto" #: The upgrade will proceed automatically without performing any health monitoring. The value is 1. + #: The upgrade will stop after completing each upgrade domain and automatically monitor health + #: before proceeding. The value is 0. + MONITORED = "Monitored" + #: The upgrade will proceed automatically without performing any health monitoring. The value is + #: 1. + UNMONITORED_AUTO = "UnmonitoredAuto" class ServiceCorrelationScheme(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The service correlation scheme. """ - ALIGNED_AFFINITY = "AlignedAffinity" #: Aligned affinity ensures that the primaries of the partitions of the affinitized services are collocated on the same nodes. This is the default and is the same as selecting the Affinity scheme. The value is 0. - NON_ALIGNED_AFFINITY = "NonAlignedAffinity" #: Non-Aligned affinity guarantees that all replicas of each service will be placed on the same nodes. Unlike Aligned Affinity, this does not guarantee that replicas of particular role will be collocated. The value is 1. + #: Aligned affinity ensures that the primaries of the partitions of the affinitized services are + #: collocated on the same nodes. This is the default and is the same as selecting the Affinity + #: scheme. The value is 0. + ALIGNED_AFFINITY = "AlignedAffinity" + #: Non-Aligned affinity guarantees that all replicas of each service will be placed on the same + #: nodes. Unlike Aligned Affinity, this does not guarantee that replicas of particular role will + #: be collocated. The value is 1. + NON_ALIGNED_AFFINITY = "NonAlignedAffinity" class ServiceKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The kind of service (Stateless or Stateful). """ - STATELESS = "Stateless" #: Does not use Service Fabric to make its state highly available or reliable. The value is 0. - STATEFUL = "Stateful" #: Uses Service Fabric to make its state or part of its state highly available and reliable. The value is 1. + #: Does not use Service Fabric to make its state highly available or reliable. The value is 0. + STATELESS = "Stateless" + #: Uses Service Fabric to make its state or part of its state highly available and reliable. The + #: value is 1. + STATEFUL = "Stateful" class ServiceLoadMetricWeight(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Determines the metric weight relative to the other metrics that are configured for this @@ -186,41 +246,72 @@ class ServiceLoadMetricWeight(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum prefers the metric with the higher weight. """ - ZERO = "Zero" #: Disables resource balancing for this metric. This value is zero. - LOW = "Low" #: Specifies the metric weight of the service load as Low. The value is 1. - MEDIUM = "Medium" #: Specifies the metric weight of the service load as Medium. The value is 2. - HIGH = "High" #: Specifies the metric weight of the service load as High. The value is 3. + #: Disables resource balancing for this metric. This value is zero. + ZERO = "Zero" + #: Specifies the metric weight of the service load as Low. The value is 1. + LOW = "Low" + #: Specifies the metric weight of the service load as Medium. The value is 2. + MEDIUM = "Medium" + #: Specifies the metric weight of the service load as High. The value is 3. + HIGH = "High" class ServicePackageActivationMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The activation Mode of the service package """ - SHARED_PROCESS = "SharedProcess" #: Indicates the application package activation mode will use shared process. - EXCLUSIVE_PROCESS = "ExclusiveProcess" #: Indicates the application package activation mode will use exclusive process. + #: Indicates the application package activation mode will use shared process. + SHARED_PROCESS = "SharedProcess" + #: Indicates the application package activation mode will use exclusive process. + EXCLUSIVE_PROCESS = "ExclusiveProcess" class ServicePlacementPolicyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The type of placement policy for a service fabric service. Following are the possible values. """ - INVALID_DOMAIN = "InvalidDomain" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementInvalidDomainPolicyDescription, which indicates that a particular fault or upgrade domain cannot be used for placement of this service. The value is 0. - REQUIRED_DOMAIN = "RequiredDomain" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription indicating that the replicas of the service must be placed in a specific domain. The value is 1. - PREFERRED_PRIMARY_DOMAIN = "PreferredPrimaryDomain" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the Primary replica for the partitions of the service should be located in a particular domain as an optimization. The value is 2. - REQUIRED_DOMAIN_DISTRIBUTION = "RequiredDomainDistribution" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription, indicating that the system will disallow placement of any two replicas from the same partition in the same domain at any time. The value is 3. - NON_PARTIALLY_PLACE_SERVICE = "NonPartiallyPlaceService" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible all replicas of a particular partition of the service should be placed atomically. The value is 4. + #: Indicates that the ServicePlacementPolicyDescription is of type + #: ServicePlacementInvalidDomainPolicyDescription, which indicates that a particular fault or + #: upgrade domain cannot be used for placement of this service. The value is 0. + INVALID_DOMAIN = "InvalidDomain" + #: Indicates that the ServicePlacementPolicyDescription is of type + #: ServicePlacementRequireDomainDistributionPolicyDescription indicating that the replicas of the + #: service must be placed in a specific domain. The value is 1. + REQUIRED_DOMAIN = "RequiredDomain" + #: Indicates that the ServicePlacementPolicyDescription is of type + #: ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the + #: Primary replica for the partitions of the service should be located in a particular domain as + #: an optimization. The value is 2. + PREFERRED_PRIMARY_DOMAIN = "PreferredPrimaryDomain" + #: Indicates that the ServicePlacementPolicyDescription is of type + #: ServicePlacementRequireDomainDistributionPolicyDescription, indicating that the system will + #: disallow placement of any two replicas from the same partition in the same domain at any time. + #: The value is 3. + REQUIRED_DOMAIN_DISTRIBUTION = "RequiredDomainDistribution" + #: Indicates that the ServicePlacementPolicyDescription is of type + #: ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible all + #: replicas of a particular partition of the service should be placed atomically. The value is 4. + NON_PARTIALLY_PLACE_SERVICE = "NonPartiallyPlaceService" class ServiceScalingMechanismKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Enumerates the ways that a service can be partitioned. """ - SCALE_PARTITION_INSTANCE_COUNT = "ScalePartitionInstanceCount" #: Represents a scaling mechanism for adding or removing instances of stateless service partition. The value is 0. - ADD_REMOVE_INCREMENTAL_NAMED_PARTITION = "AddRemoveIncrementalNamedPartition" #: Represents a scaling mechanism for adding or removing named partitions of a stateless service. The value is 1. + #: Represents a scaling mechanism for adding or removing instances of stateless service partition. + #: The value is 0. + SCALE_PARTITION_INSTANCE_COUNT = "ScalePartitionInstanceCount" + #: Represents a scaling mechanism for adding or removing named partitions of a stateless service. + #: The value is 1. + ADD_REMOVE_INCREMENTAL_NAMED_PARTITION = "AddRemoveIncrementalNamedPartition" class ServiceScalingTriggerKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Enumerates the ways that a service can be partitioned. """ - AVERAGE_PARTITION_LOAD = "AveragePartitionLoad" #: Represents a scaling trigger related to an average load of a metric/resource of a partition. The value is 0. - AVERAGE_SERVICE_LOAD = "AverageServiceLoad" #: Represents a scaling policy related to an average load of a metric/resource of a service. The value is 1. + #: Represents a scaling trigger related to an average load of a metric/resource of a partition. + #: The value is 0. + AVERAGE_PARTITION_LOAD = "AveragePartitionLoad" + #: Represents a scaling policy related to an average load of a metric/resource of a service. The + #: value is 1. + AVERAGE_SERVICE_LOAD = "AverageServiceLoad" class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Sku Name. Basic requires a minimum of 3 nodes and Standard a minimum of 5. Basic only allows 1 diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/__init__.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/__init__.py index 613aba52b2a2f..c4e1c9fcc149f 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/__init__.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/__init__.py @@ -11,6 +11,7 @@ from ._applications_operations import ApplicationsOperations from ._services_operations import ServicesOperations from ._managed_clusters_operations import ManagedClustersOperations +from ._managed_cluster_version_operations import ManagedClusterVersionOperations from ._operations import Operations from ._node_types_operations import NodeTypesOperations @@ -20,6 +21,7 @@ 'ApplicationsOperations', 'ServicesOperations', 'ManagedClustersOperations', + 'ManagedClusterVersionOperations', 'Operations', 'NodeTypesOperations', ] diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_application_type_versions_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_application_type_versions_operations.py index a60f4cea26a96..96d08e8c530ec 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_application_type_versions_operations.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_application_type_versions_operations.py @@ -79,7 +79,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -107,7 +107,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApplicationTypeVersionResource', pipeline_response) @@ -133,7 +133,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -166,7 +166,7 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -208,8 +208,8 @@ def begin_create_or_update( :type parameters: ~service_fabric_managed_clusters_management_client.models.ApplicationTypeVersionResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ApplicationTypeVersionResource or the result of cls(response) @@ -300,7 +300,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -333,7 +333,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApplicationTypeVersionResource', pipeline_response) @@ -358,7 +358,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -386,7 +386,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -417,8 +417,8 @@ def begin_delete( :type version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -500,7 +500,7 @@ def list_by_application_types( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -543,7 +543,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_application_types_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_application_types_operations.py index a1eee71c848fa..75cd55c81f5ed 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_application_types_operations.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_application_types_operations.py @@ -76,7 +76,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -103,7 +103,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApplicationTypeResource', pipeline_response) @@ -146,7 +146,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -178,7 +178,7 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApplicationTypeResource', pipeline_response) @@ -220,7 +220,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -252,7 +252,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApplicationTypeResource', pipeline_response) @@ -276,7 +276,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -303,7 +303,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -331,8 +331,8 @@ def begin_delete( :type application_type_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -409,7 +409,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -451,7 +451,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_applications_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_applications_operations.py index 24d271323265f..86016af8a49d8 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_applications_operations.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_applications_operations.py @@ -76,7 +76,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -103,7 +103,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApplicationResource', pipeline_response) @@ -128,7 +128,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -160,7 +160,7 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -198,8 +198,8 @@ def begin_create_or_update( :type parameters: ~service_fabric_managed_clusters_management_client.models.ApplicationResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ApplicationResource or the result of cls(response) @@ -285,7 +285,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -317,7 +317,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApplicationResource', pipeline_response) @@ -341,7 +341,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -368,7 +368,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -396,8 +396,8 @@ def begin_delete( :type application_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -474,7 +474,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -516,7 +516,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_managed_cluster_version_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_managed_cluster_version_operations.py new file mode 100644 index 0000000000000..d40adec558333 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_managed_cluster_version_operations.py @@ -0,0 +1,293 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ManagedClusterVersionOperations(object): + """ManagedClusterVersionOperations 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: ~service_fabric_managed_clusters_management_client.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 get( + self, + location, # type: str + cluster_version, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterCodeVersionResult" + """Gets information about a Service Fabric managed cluster code version available in the specified location. + + Gets information about an available Service Fabric managed cluster code version. + + :param location: The location for the cluster code versions. This is different from cluster + location. + :type location: str + :param cluster_version: The cluster code version. + :type cluster_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterCodeVersionResult, or the result of cls(response) + :rtype: ~service_fabric_managed_clusters_management_client.models.ManagedClusterCodeVersionResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterCodeVersionResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'clusterVersion': self._serialize.url("cluster_version", cluster_version, '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.ErrorModel, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterCodeVersionResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion}'} # type: ignore + + def get_by_environment( + self, + location, # type: str + cluster_version, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterCodeVersionResult" + """Gets information about a Service Fabric cluster code version available for the specified environment. + + Gets information about an available Service Fabric cluster code version by environment. + + :param location: The location for the cluster code versions. This is different from cluster + location. + :type location: str + :param cluster_version: The cluster code version. + :type cluster_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterCodeVersionResult, or the result of cls(response) + :rtype: ~service_fabric_managed_clusters_management_client.models.ManagedClusterCodeVersionResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterCodeVersionResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + environment = "Windows" + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_by_environment.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'environment': self._serialize.url("environment", environment, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'clusterVersion': self._serialize.url("cluster_version", cluster_version, '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.ErrorModel, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterCodeVersionResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_by_environment.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion}'} # type: ignore + + def list( + self, + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterCodeVersionListResult" + """Gets the list of Service Fabric cluster code versions available for the specified location. + + Gets all available code versions for Service Fabric cluster resources by location. + + :param location: The location for the cluster code versions. This is different from cluster + location. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterCodeVersionListResult, or the result of cls(response) + :rtype: ~service_fabric_managed_clusters_management_client.models.ManagedClusterCodeVersionListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterCodeVersionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + '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') + + # 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.ErrorModel, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterCodeVersionListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions'} # type: ignore + + def list_by_environment( + self, + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterCodeVersionListResult" + """Gets the list of Service Fabric cluster code versions available for the specified environment. + + Gets all available code versions for Service Fabric cluster resources by environment. + + :param location: The location for the cluster code versions. This is different from cluster + location. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterCodeVersionListResult, or the result of cls(response) + :rtype: ~service_fabric_managed_clusters_management_client.models.ManagedClusterCodeVersionListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterCodeVersionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + environment = "Windows" + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_by_environment.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'environment': self._serialize.url("environment", environment, 'str'), + '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') + + # 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.ErrorModel, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterCodeVersionListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_environment.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions'} # type: ignore diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_managed_clusters_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_managed_clusters_operations.py index ce0d8144dd45b..b51fdd547e974 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_managed_clusters_operations.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_managed_clusters_operations.py @@ -70,7 +70,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -111,7 +111,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -142,7 +142,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -182,7 +182,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -219,7 +219,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -245,7 +245,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagedCluster', pipeline_response) @@ -269,7 +269,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -300,7 +300,7 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -335,8 +335,8 @@ def begin_create_or_update( :type parameters: ~service_fabric_managed_clusters_management_client.models.ManagedCluster :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) @@ -417,7 +417,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -448,7 +448,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagedCluster', pipeline_response) @@ -471,7 +471,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -497,7 +497,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -522,8 +522,8 @@ def begin_delete( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_node_types_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_node_types_operations.py index 51886c1585c36..337b2f27e979a 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_node_types_operations.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_node_types_operations.py @@ -72,7 +72,7 @@ def list_by_managed_clusters( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -114,7 +114,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -139,7 +139,7 @@ def _restart_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -171,7 +171,7 @@ def _restart_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -203,8 +203,8 @@ def begin_restart( :type parameters: ~service_fabric_managed_clusters_management_client.models.NodeTypeActionParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -270,7 +270,7 @@ def _reimage_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -302,7 +302,7 @@ def _reimage_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -334,8 +334,8 @@ def begin_reimage( :type parameters: ~service_fabric_managed_clusters_management_client.models.NodeTypeActionParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -401,7 +401,7 @@ def _delete_node_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -433,7 +433,7 @@ def _delete_node_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -465,8 +465,8 @@ def begin_delete_node( :type parameters: ~service_fabric_managed_clusters_management_client.models.NodeTypeActionParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -546,7 +546,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -573,7 +573,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NodeType', pipeline_response) @@ -598,7 +598,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -630,7 +630,7 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -668,8 +668,8 @@ def begin_create_or_update( :type parameters: ~service_fabric_managed_clusters_management_client.models.NodeType :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either NodeType or the result of cls(response) @@ -755,7 +755,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -787,7 +787,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NodeType', pipeline_response) @@ -811,7 +811,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -838,7 +838,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -866,8 +866,8 @@ def begin_delete( :type node_type_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_operations.py index 28f6e98854e6a..96b28db7ca729 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_operations.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/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-01-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -100,7 +100,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_services_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_services_operations.py index 44b200f283124..eb9645bdb4011 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_services_operations.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_services_operations.py @@ -80,7 +80,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -108,7 +108,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ServiceResource', pipeline_response) @@ -134,7 +134,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -167,7 +167,7 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -209,8 +209,8 @@ def begin_create_or_update( :type parameters: ~service_fabric_managed_clusters_management_client.models.ServiceResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ServiceResource or the result of cls(response) @@ -302,7 +302,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -335,7 +335,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ServiceResource', pipeline_response) @@ -360,7 +360,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -388,7 +388,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -420,8 +420,8 @@ def begin_delete( :type service_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -503,7 +503,7 @@ def list_by_applications( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-01-01-preview" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -546,7 +546,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorModel, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)