diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/_meta.json b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/_meta.json index eb80da9a8757..a27d1e9a40b2 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/_meta.json +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/_meta.json @@ -1,8 +1,11 @@ { - "autorest": "3.3.0", - "use": "@autorest/python@5.6.6", - "commit": "1b38cd3ccb2224b0c838fd77c870cd72e2a5eff2", + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "edf2ce9083c5f8337af2fcdc729c4b3ba84d2026", "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.6 --version=3.3.0", + "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.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "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 c976efafbcda..8b788e613348 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-05-01" + self.api_version = "2021-07-01-preview" 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 ed3b24fdbc9a..692e3313c823 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-05-01", - "total_api_version_list": ["2021-05-01"], + "chosen_version": "2021-07-01-preview", + "total_api_version_list": ["2021-07-01-preview"], "client": { "name": "ServiceFabricManagedClustersManagementClient", "filename": "_service_fabric_managed_clusters_management_client", @@ -105,6 +105,7 @@ "managed_clusters": "ManagedClustersOperations", "managed_cluster_version": "ManagedClusterVersionOperations", "operations": "Operations", - "node_types": "NodeTypesOperations" + "node_types": "NodeTypesOperations", + "node_type_skus": "NodeTypeSkusOperations" } } \ 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 77a12593eee0..841644d32d01 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 @@ -27,6 +27,7 @@ from .operations import ManagedClusterVersionOperations from .operations import Operations from .operations import NodeTypesOperations +from .operations import NodeTypeSkusOperations from . import models @@ -49,6 +50,8 @@ class ServiceFabricManagedClustersManagementClient(object): :vartype operations: service_fabric_managed_clusters_management_client.operations.Operations :ivar node_types: NodeTypesOperations operations :vartype node_types: service_fabric_managed_clusters_management_client.operations.NodeTypesOperations + :ivar node_type_skus: NodeTypeSkusOperations operations + :vartype node_type_skus: service_fabric_managed_clusters_management_client.operations.NodeTypeSkusOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The customer subscription identifier. @@ -91,6 +94,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.node_types = NodeTypesOperations( self._client, self._config, self._serialize, self._deserialize) + self.node_type_skus = NodeTypeSkusOperations( + self._client, self._config, self._serialize, self._deserialize) def _send_request(self, http_request, **kwargs): # type: (HttpRequest, Any) -> HttpResponse 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 c47f66669f1b..eae7c95b6fbd 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.0" +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 be8b70e0afee..d37e5db7d5b1 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-05-01" + self.api_version = "2021-07-01-preview" 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 51f62426d059..991c01c19236 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 @@ -25,6 +25,7 @@ from .operations import ManagedClusterVersionOperations from .operations import Operations from .operations import NodeTypesOperations +from .operations import NodeTypeSkusOperations from .. import models @@ -47,6 +48,8 @@ class ServiceFabricManagedClustersManagementClient(object): :vartype operations: service_fabric_managed_clusters_management_client.aio.operations.Operations :ivar node_types: NodeTypesOperations operations :vartype node_types: service_fabric_managed_clusters_management_client.aio.operations.NodeTypesOperations + :ivar node_type_skus: NodeTypeSkusOperations operations + :vartype node_type_skus: service_fabric_managed_clusters_management_client.aio.operations.NodeTypeSkusOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The customer subscription identifier. @@ -88,6 +91,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.node_types = NodeTypesOperations( self._client, self._config, self._serialize, self._deserialize) + self.node_type_skus = NodeTypeSkusOperations( + 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. 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 c4e1c9fcc149..c078a5f0ca6d 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 @@ -14,6 +14,7 @@ from ._managed_cluster_version_operations import ManagedClusterVersionOperations from ._operations import Operations from ._node_types_operations import NodeTypesOperations +from ._node_type_skus_operations import NodeTypeSkusOperations __all__ = [ 'ApplicationTypesOperations', @@ -24,4 +25,5 @@ 'ManagedClusterVersionOperations', 'Operations', 'NodeTypesOperations', + 'NodeTypeSkusOperations', ] 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 3d015523d791..95f9e36f0f2e 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 @@ -49,7 +49,7 @@ async def get( cluster_name: str, application_type_name: str, version: str, - **kwargs + **kwargs: Any ) -> "_models.ApplicationTypeVersionResource": """Gets a Service Fabric managed application type version resource. @@ -74,7 +74,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -120,14 +120,14 @@ async def _create_or_update_initial( application_type_name: str, version: str, parameters: "_models.ApplicationTypeVersionResource", - **kwargs + **kwargs: Any ) -> "_models.ApplicationTypeVersionResource": cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationTypeVersionResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -182,7 +182,7 @@ async def begin_create_or_update( application_type_name: str, version: str, parameters: "_models.ApplicationTypeVersionResource", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ApplicationTypeVersionResource"]: """Creates or updates a Service Fabric managed application type version resource. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -266,7 +266,7 @@ async def update( application_type_name: str, version: str, parameters: "_models.ApplicationTypeVersionUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.ApplicationTypeVersionResource": """Updates the tags of an application type version resource of a given managed cluster. @@ -292,7 +292,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -342,14 +342,14 @@ async def _delete_initial( cluster_name: str, application_type_name: str, version: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -391,7 +391,7 @@ async def begin_delete( cluster_name: str, application_type_name: str, version: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a Service Fabric managed application type version resource. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -466,7 +466,7 @@ def list_by_application_types( resource_group_name: str, cluster_name: str, application_type_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApplicationTypeVersionResourceList"]: """Gets the list of application type version resources created in the specified Service Fabric managed application type name resource. @@ -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-05-01" + api_version = "2021-07-01-preview" accept = "application/json" def prepare_request(next_link=None): 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 acabc81ba160..03a93ce265bb 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 @@ -48,7 +48,7 @@ async def get( resource_group_name: str, cluster_name: str, application_type_name: str, - **kwargs + **kwargs: Any ) -> "_models.ApplicationTypeResource": """Gets a Service Fabric managed application type name resource. @@ -71,7 +71,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -115,7 +115,7 @@ async def create_or_update( cluster_name: str, application_type_name: str, parameters: "_models.ApplicationTypeResource", - **kwargs + **kwargs: Any ) -> "_models.ApplicationTypeResource": """Creates or updates a Service Fabric managed application type name resource. @@ -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-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -189,7 +189,7 @@ async def update( cluster_name: str, application_type_name: str, parameters: "_models.ApplicationTypeUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.ApplicationTypeResource": """Updates the tags of an application type resource of a given managed cluster. @@ -213,7 +213,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -261,14 +261,14 @@ async def _delete_initial( resource_group_name: str, cluster_name: str, application_type_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -308,7 +308,7 @@ async def begin_delete( resource_group_name: str, cluster_name: str, application_type_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a Service Fabric managed application type name resource. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -378,7 +378,7 @@ def list( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApplicationTypeResourceList"]: """Gets the list of application type name resources created in the specified Service Fabric managed cluster resource. @@ -399,7 +399,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" def prepare_request(next_link=None): 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 12087dffdcbf..dead96f8d006 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 @@ -48,7 +48,7 @@ async def get( resource_group_name: str, cluster_name: str, application_name: str, - **kwargs + **kwargs: Any ) -> "_models.ApplicationResource": """Gets a Service Fabric managed application resource. @@ -71,7 +71,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -115,14 +115,14 @@ async def _create_or_update_initial( cluster_name: str, application_name: str, parameters: "_models.ApplicationResource", - **kwargs + **kwargs: Any ) -> "_models.ApplicationResource": cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -175,7 +175,7 @@ async def begin_create_or_update( cluster_name: str, application_name: str, parameters: "_models.ApplicationResource", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ApplicationResource"]: """Creates or updates a Service Fabric managed application resource. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -253,7 +253,7 @@ async def update( cluster_name: str, application_name: str, parameters: "_models.ApplicationUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.ApplicationResource": """Updates the tags of an application resource of a given managed cluster. @@ -277,7 +277,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -325,14 +325,14 @@ async def _delete_initial( resource_group_name: str, cluster_name: str, application_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -372,7 +372,7 @@ async def begin_delete( resource_group_name: str, cluster_name: str, application_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a Service Fabric managed application resource. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -442,7 +442,7 @@ def list( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApplicationResourceList"]: """Gets the list of managed application resources created in the specified Service Fabric cluster resource. @@ -463,7 +463,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" def prepare_request(next_link=None): 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 index 8653bea7345b..01df6c59b234 100644 --- 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 @@ -44,7 +44,7 @@ async def get( self, location: str, cluster_version: str, - **kwargs + **kwargs: Any ) -> "_models.ManagedClusterCodeVersionResult": """Gets information about a Service Fabric managed cluster code version available in the specified location. @@ -65,7 +65,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -106,7 +106,7 @@ async def get_by_environment( self, location: str, cluster_version: str, - **kwargs + **kwargs: Any ) -> "_models.ManagedClusterCodeVersionResult": """Gets information about a Service Fabric cluster code version available for the specified environment. @@ -128,7 +128,7 @@ async def get_by_environment( } error_map.update(kwargs.pop('error_map', {})) environment = "Windows" - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -169,7 +169,7 @@ async def get_by_environment( async def list( self, location: str, - **kwargs + **kwargs: Any ) -> List["_models.ManagedClusterCodeVersionResult"]: """Gets the list of Service Fabric cluster code versions available for the specified location. @@ -188,7 +188,7 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -227,7 +227,7 @@ async def list( async def list_by_environment( self, location: str, - **kwargs + **kwargs: Any ) -> List["_models.ManagedClusterCodeVersionResult"]: """Gets the list of Service Fabric cluster code versions available for the specified environment. @@ -247,7 +247,7 @@ async def list_by_environment( } error_map.update(kwargs.pop('error_map', {})) environment = "Windows" - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL 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 38a4dd61cb12..6d9af2950d36 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 @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ManagedClusterListResult"]: """Gets the list of Service Fabric cluster resources created in the specified resource group. @@ -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-05-01" + api_version = "2021-07-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -119,7 +119,7 @@ async def get_next(next_link=None): def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ManagedClusterListResult"]: """Gets the list of Service Fabric cluster resources created in the specified subscription. @@ -136,7 +136,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -191,7 +191,7 @@ async def get( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> "_models.ManagedCluster": """Gets a Service Fabric managed cluster resource. @@ -212,7 +212,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -254,14 +254,14 @@ async def _create_or_update_initial( resource_group_name: str, cluster_name: str, parameters: "_models.ManagedCluster", - **kwargs + **kwargs: Any ) -> "_models.ManagedCluster": cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -312,7 +312,7 @@ async def begin_create_or_update( resource_group_name: str, cluster_name: str, parameters: "_models.ManagedCluster", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ManagedCluster"]: """Creates or updates a Service Fabric managed cluster resource. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -385,7 +385,7 @@ async def update( resource_group_name: str, cluster_name: str, parameters: "_models.ManagedClusterUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.ManagedCluster": """Updates the tags of of a Service Fabric managed cluster resource. @@ -407,7 +407,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -453,14 +453,14 @@ async def _delete_initial( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -498,7 +498,7 @@ async def begin_delete( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a Service Fabric managed cluster resource. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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_type_skus_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_node_type_skus_operations.py new file mode 100644 index 000000000000..da93cde9d072 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_node_type_skus_operations.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NodeTypeSkusOperations: + """NodeTypeSkusOperations 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 + + def list( + self, + resource_group_name: str, + cluster_name: str, + node_type_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NodeTypeListSkuResult"]: + """Gets a Service Fabric node type SKUs. + + Get a Service Fabric node type supported SKUs. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster resource. + :type cluster_name: str + :param node_type_name: The name of the node type. + :type node_type_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NodeTypeListSkuResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~service_fabric_managed_clusters_management_client.models.NodeTypeListSkuResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeTypeListSkuResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'nodeTypeName': self._serialize.url("node_type_name", node_type_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NodeTypeListSkuResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/skus'} # type: ignore 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 b314254e8c17..3de306b21d17 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 @@ -47,7 +47,7 @@ def list_by_managed_clusters( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.NodeTypeListResult"]: """Gets the list of Node types of the specified managed cluster. @@ -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-05-01" + api_version = "2021-07-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -126,14 +126,14 @@ async def _restart_initial( cluster_name: str, node_type_name: str, parameters: "_models.NodeTypeActionParameters", - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -179,7 +179,7 @@ async def begin_restart( cluster_name: str, node_type_name: str, parameters: "_models.NodeTypeActionParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Restarts one or more nodes on the node type. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -255,14 +255,14 @@ async def _reimage_initial( cluster_name: str, node_type_name: str, parameters: "_models.NodeTypeActionParameters", - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -308,7 +308,7 @@ async def begin_reimage( cluster_name: str, node_type_name: str, parameters: "_models.NodeTypeActionParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Reimages one or more nodes on the node type. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -384,14 +384,14 @@ async def _delete_node_initial( cluster_name: str, node_type_name: str, parameters: "_models.NodeTypeActionParameters", - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -437,7 +437,7 @@ async def begin_delete_node( cluster_name: str, node_type_name: str, parameters: "_models.NodeTypeActionParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes one or more nodes on the node type. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -512,7 +512,7 @@ async def get( resource_group_name: str, cluster_name: str, node_type_name: str, - **kwargs + **kwargs: Any ) -> "_models.NodeType": """Gets a Service Fabric node type. @@ -534,7 +534,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -578,14 +578,14 @@ async def _create_or_update_initial( cluster_name: str, node_type_name: str, parameters: "_models.NodeType", - **kwargs + **kwargs: Any ) -> "_models.NodeType": cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeType"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -638,7 +638,7 @@ async def begin_create_or_update( cluster_name: str, node_type_name: str, parameters: "_models.NodeType", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.NodeType"]: """Creates or updates a Service Fabric node type. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -716,7 +716,7 @@ async def update( cluster_name: str, node_type_name: str, parameters: "_models.NodeTypeUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.NodeType": """Update the tags of a node type resource of a given managed cluster. @@ -740,7 +740,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -788,14 +788,14 @@ async def _delete_initial( resource_group_name: str, cluster_name: str, node_type_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -835,7 +835,7 @@ async def begin_delete( resource_group_name: str, cluster_name: str, node_type_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a Service Fabric node type. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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 32c4eaa62e23..a1aed4f11f0a 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 @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: """Lists all of the available Service Fabric resource provider API operations. @@ -59,7 +59,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" def prepare_request(next_link=None): 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 0d06f224a8cc..045291d580d2 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 @@ -49,7 +49,7 @@ async def get( cluster_name: str, application_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.ServiceResource": """Gets a Service Fabric managed service resource. @@ -75,7 +75,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -121,14 +121,14 @@ async def _create_or_update_initial( application_name: str, service_name: str, parameters: "_models.ServiceResource", - **kwargs + **kwargs: Any ) -> "_models.ServiceResource": cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -183,7 +183,7 @@ async def begin_create_or_update( application_name: str, service_name: str, parameters: "_models.ServiceResource", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ServiceResource"]: """Creates or updates a Service Fabric managed service resource. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -267,7 +267,7 @@ async def update( application_name: str, service_name: str, parameters: "_models.ServiceUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.ServiceResource": """Updates the tags of a service resource of a given managed cluster. @@ -294,7 +294,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -344,14 +344,14 @@ async def _delete_initial( cluster_name: str, application_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -393,7 +393,7 @@ async def begin_delete( cluster_name: str, application_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a Service Fabric managed service resource. @@ -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: 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. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in 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) @@ -469,7 +469,7 @@ def list_by_applications( resource_group_name: str, cluster_name: str, application_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ServiceResourceList"]: """Gets the list of service resources created in the specified Service Fabric managed application resource. @@ -492,7 +492,7 @@ def list_by_applications( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" def prepare_request(next_link=None): 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 b6a0d1922623..1cb9ea13d0e6 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 @@ -29,6 +29,8 @@ from ._models_py3 import EndpointRangeDescription from ._models_py3 import ErrorModel from ._models_py3 import ErrorModelError + from ._models_py3 import FrontendConfiguration + from ._models_py3 import IPTag from ._models_py3 import LoadBalancingRule from ._models_py3 import ManagedCluster from ._models_py3 import ManagedClusterCodeVersionResult @@ -40,7 +42,12 @@ from ._models_py3 import NetworkSecurityRule from ._models_py3 import NodeType from ._models_py3 import NodeTypeActionParameters + from ._models_py3 import NodeTypeAvailableSku from ._models_py3 import NodeTypeListResult + from ._models_py3 import NodeTypeListSkuResult + from ._models_py3 import NodeTypeSku + from ._models_py3 import NodeTypeSkuCapacity + from ._models_py3 import NodeTypeSupportedSku from ._models_py3 import NodeTypeUpdateParameters from ._models_py3 import OperationListResult from ._models_py3 import OperationResult @@ -103,6 +110,8 @@ from ._models import EndpointRangeDescription # type: ignore from ._models import ErrorModel # type: ignore from ._models import ErrorModelError # type: ignore + from ._models import FrontendConfiguration # type: ignore + from ._models import IPTag # type: ignore from ._models import LoadBalancingRule # type: ignore from ._models import ManagedCluster # type: ignore from ._models import ManagedClusterCodeVersionResult # type: ignore @@ -114,7 +123,12 @@ from ._models import NetworkSecurityRule # type: ignore from ._models import NodeType # type: ignore from ._models import NodeTypeActionParameters # type: ignore + from ._models import NodeTypeAvailableSku # type: ignore from ._models import NodeTypeListResult # type: ignore + from ._models import NodeTypeListSkuResult # type: ignore + from ._models import NodeTypeSku # type: ignore + from ._models import NodeTypeSkuCapacity # type: ignore + from ._models import NodeTypeSupportedSku # type: ignore from ._models import NodeTypeUpdateParameters # type: ignore from ._models import OperationListResult # type: ignore from ._models import OperationResult # type: ignore @@ -163,10 +177,12 @@ Direction, DiskType, FailureAction, + IPAddressType, ManagedClusterAddOnFeature, ManagedIdentityType, ManagedResourceProvisioningState, MoveCost, + NodeTypeSkuScaleType, NsgProtocol, PartitionScheme, ProbeProtocol, @@ -205,6 +221,8 @@ 'EndpointRangeDescription', 'ErrorModel', 'ErrorModelError', + 'FrontendConfiguration', + 'IPTag', 'LoadBalancingRule', 'ManagedCluster', 'ManagedClusterCodeVersionResult', @@ -216,7 +234,12 @@ 'NetworkSecurityRule', 'NodeType', 'NodeTypeActionParameters', + 'NodeTypeAvailableSku', 'NodeTypeListResult', + 'NodeTypeListSkuResult', + 'NodeTypeSku', + 'NodeTypeSkuCapacity', + 'NodeTypeSupportedSku', 'NodeTypeUpdateParameters', 'OperationListResult', 'OperationResult', @@ -263,10 +286,12 @@ 'Direction', 'DiskType', 'FailureAction', + 'IPAddressType', 'ManagedClusterAddOnFeature', 'ManagedIdentityType', 'ManagedResourceProvisioningState', 'MoveCost', + 'NodeTypeSkuScaleType', 'NsgProtocol', 'PartitionScheme', 'ProbeProtocol', 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 d6983c33db8b..092ec328ab60 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 @@ -933,6 +933,70 @@ def __init__( self.message = kwargs.get('message', None) +class FrontendConfiguration(msrest.serialization.Model): + """Describes the frontend configurations for the node type. + + :param ip_address_type: The IP address type of this frontend configuration. If omitted the + default value is IPv4. Possible values include: "IPv4", "IPv6". Default value: "IPv4". + :type ip_address_type: str or + ~service_fabric_managed_clusters_management_client.models.IPAddressType + :param load_balancer_backend_address_pool_id: The resource Id of the Load Balancer backend + address pool that the VM instances of the node type are associated with. The format of the + resource Id is + '/subscriptions/:code:``/resourceGroups/:code:``/providers/Microsoft.Network/loadBalancers/:code:``/backendAddressPools/:code:``'. + :type load_balancer_backend_address_pool_id: str + :param load_balancer_inbound_nat_pool_id: The resource Id of the Load Balancer inbound NAT pool + that the VM instances of the node type are associated with. The format of the resource Id is + '/subscriptions/:code:``/resourceGroups/:code:``/providers/Microsoft.Network/loadBalancers/:code:``/inboundNatPools/:code:``'. + :type load_balancer_inbound_nat_pool_id: str + """ + + _attribute_map = { + 'ip_address_type': {'key': 'ipAddressType', 'type': 'str'}, + 'load_balancer_backend_address_pool_id': {'key': 'loadBalancerBackendAddressPoolId', 'type': 'str'}, + 'load_balancer_inbound_nat_pool_id': {'key': 'loadBalancerInboundNatPoolId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FrontendConfiguration, self).__init__(**kwargs) + self.ip_address_type = kwargs.get('ip_address_type', "IPv4") + self.load_balancer_backend_address_pool_id = kwargs.get('load_balancer_backend_address_pool_id', None) + self.load_balancer_inbound_nat_pool_id = kwargs.get('load_balancer_inbound_nat_pool_id', None) + + +class IPTag(msrest.serialization.Model): + """IPTag associated with the object. + + All required parameters must be populated in order to send to Azure. + + :param ip_tag_type: Required. The IP tag type. + :type ip_tag_type: str + :param tag: Required. The value of the IP tag. + :type tag: str + """ + + _validation = { + 'ip_tag_type': {'required': True}, + 'tag': {'required': True}, + } + + _attribute_map = { + 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(IPTag, self).__init__(**kwargs) + self.ip_tag_type = kwargs['ip_tag_type'] + self.tag = kwargs['tag'] + + class LoadBalancingRule(msrest.serialization.Model): """Describes a load balancing rule. @@ -1095,11 +1159,11 @@ class ManagedCluster(Resource): :type load_balancing_rules: list[~service_fabric_managed_clusters_management_client.models.LoadBalancingRule] :param allow_rdp_access: Setting this to true enables RDP access to the VM. The default NSG - rule opens RDP port to internet which can be overridden with custom Network Security Rules. The + rule opens RDP port to Internet which can be overridden with custom Network Security Rules. The default value for this setting is false. :type allow_rdp_access: bool - :param network_security_rules: Custom Network Security Rules that are applied to the virtual - network of the cluster. + :param network_security_rules: Custom Network Security Rules that are applied to the Virtual + Network of the cluster. :type network_security_rules: list[~service_fabric_managed_clusters_management_client.models.NetworkSecurityRule] :param clients: Client certificates that are allowed to manage the cluster. @@ -1143,6 +1207,17 @@ class ManagedCluster(Resource): :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 + :param enable_ipv6: Setting this to true creates IPv6 address space for the default VNet used + by the cluster. This setting cannot be changed once the cluster is created. The default value + for this setting is false. + :type enable_ipv6: bool + :param subnet_id: If specified, the node types for the cluster are created in this subnet + instead of the default VNet. The **networkSecurityRules** specified for the cluster are also + applied to this subnet. This setting cannot be changed once the cluster is created. + :type subnet_id: str + :param ip_tags: The list of IP tags associated with the default public IP address of the + cluster. + :type ip_tags: list[~service_fabric_managed_clusters_management_client.models.IPTag] """ _validation = { @@ -1193,6 +1268,9 @@ class ManagedCluster(Resource): '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'}, + 'enable_ipv6': {'key': 'properties.enableIpv6', 'type': 'bool'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[IPTag]'}, } def __init__( @@ -1225,13 +1303,14 @@ def __init__( 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) + self.enable_ipv6 = kwargs.get('enable_ipv6', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.ip_tags = kwargs.get('ip_tags', 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. @@ -1242,14 +1321,11 @@ class ManagedClusterCodeVersionResult(msrest.serialization.Model): :type cluster_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 + :param os_type: Cluster operating system, the default will be Windows. The only acceptable + values to pass in are None and "Windows". The default value is None. + :type os_type: str """ - _validation = { - 'os_type': {'constant': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -1259,8 +1335,6 @@ class ManagedClusterCodeVersionResult(msrest.serialization.Model): 'os_type': {'key': 'properties.osType', 'type': 'str'}, } - os_type = "Windows" - def __init__( self, **kwargs @@ -1271,6 +1345,7 @@ def __init__( self.type = kwargs.get('type', None) self.cluster_code_version = kwargs.get('cluster_code_version', None) self.support_expiry_utc = kwargs.get('support_expiry_utc', None) + self.os_type = kwargs.get('os_type', None) class ManagedClusterListResult(msrest.serialization.Model): @@ -1557,17 +1632,19 @@ class NodeType(ManagedProxyResource): :type tags: dict[str, str] :ivar system_data: Metadata pertaining to creation and last modification of the resource. :vartype system_data: ~service_fabric_managed_clusters_management_client.models.SystemData - :param is_primary: The node type on which system services will run. Only one node type should - be marked as primary. Primary node type cannot be deleted or changed for existing clusters. + :param sku: The node type sku. + :type sku: ~service_fabric_managed_clusters_management_client.models.NodeTypeSku + :param is_primary: Indicates the Service Fabric system services for the cluster will run on + this node type. This setting cannot be changed once the node type is created. :type is_primary: bool - :param vm_instance_count: The number of nodes in the node type. + :param vm_instance_count: The number of nodes in the node type. :code:`
`:code:`
`\ + **Values:** :code:`
`-1 - Use when auto scale rules are configured or sku.capacity is + defined :code:`
` 0 - Not supported :code:`
` >0 - Use for manual scale. :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". + :param data_disk_type: Managed data disk type. 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. @@ -1605,7 +1682,8 @@ class NodeType(ManagedProxyResource): :param vm_extensions: Set of extensions that should be installed onto the virtual machines. :type vm_extensions: list[~service_fabric_managed_clusters_management_client.models.VMSSExtension] - :param vm_managed_identity: Identities for the virtual machine scale set under the node type. + :param vm_managed_identity: Identities to assign to 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. @@ -1613,8 +1691,17 @@ class NodeType(ManagedProxyResource): :param multiple_placement_groups: Indicates if scale set associated with the node type can be composed of multiple placement groups. :type multiple_placement_groups: bool - :ivar provisioning_state: The provisioning state of the managed cluster resource. Possible - values include: "None", "Creating", "Created", "Updating", "Succeeded", "Failed", "Canceled", + :param frontend_configurations: Indicates the node type uses its own frontend configurations + instead of the default one for the cluster. This setting can only be specified for non-primary + node types and can not be added or removed after the node type is created. + :type frontend_configurations: + list[~service_fabric_managed_clusters_management_client.models.FrontendConfiguration] + :param network_security_rules: The Network Security Rules for this node type. This setting can + only be specified for node types that are configured with frontend configurations. + :type network_security_rules: + list[~service_fabric_managed_clusters_management_client.models.NetworkSecurityRule] + :ivar provisioning_state: The provisioning state of the node type resource. Possible values + include: "None", "Creating", "Created", "Updating", "Succeeded", "Failed", "Canceled", "Deleting", "Deleted", "Other". :vartype provisioning_state: str or ~service_fabric_managed_clusters_management_client.models.ManagedResourceProvisioningState @@ -1625,7 +1712,7 @@ class NodeType(ManagedProxyResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'system_data': {'readonly': True}, - 'vm_instance_count': {'maximum': 2147483647, 'minimum': 1}, + 'vm_instance_count': {'maximum': 2147483647, 'minimum': -1}, 'provisioning_state': {'readonly': True}, } @@ -1635,6 +1722,7 @@ class NodeType(ManagedProxyResource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'sku': {'key': 'sku', 'type': 'NodeTypeSku'}, 'is_primary': {'key': 'properties.isPrimary', 'type': 'bool'}, 'vm_instance_count': {'key': 'properties.vmInstanceCount', 'type': 'int'}, 'data_disk_size_gb': {'key': 'properties.dataDiskSizeGB', 'type': 'int'}, @@ -1653,6 +1741,8 @@ class NodeType(ManagedProxyResource): 'vm_managed_identity': {'key': 'properties.vmManagedIdentity', 'type': 'VmManagedIdentity'}, 'is_stateless': {'key': 'properties.isStateless', 'type': 'bool'}, 'multiple_placement_groups': {'key': 'properties.multiplePlacementGroups', 'type': 'bool'}, + 'frontend_configurations': {'key': 'properties.frontendConfigurations', 'type': '[FrontendConfiguration]'}, + 'network_security_rules': {'key': 'properties.networkSecurityRules', 'type': '[NetworkSecurityRule]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -1661,6 +1751,7 @@ def __init__( **kwargs ): super(NodeType, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) 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) @@ -1679,6 +1770,8 @@ def __init__( self.vm_managed_identity = kwargs.get('vm_managed_identity', None) self.is_stateless = kwargs.get('is_stateless', False) self.multiple_placement_groups = kwargs.get('multiple_placement_groups', False) + self.frontend_configurations = kwargs.get('frontend_configurations', None) + self.network_security_rules = kwargs.get('network_security_rules', None) self.provisioning_state = None @@ -1711,6 +1804,43 @@ def __init__( self.force = kwargs.get('force', None) +class NodeTypeAvailableSku(msrest.serialization.Model): + """Defines the type of sku available for a node type. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar resource_type: The type of resource the sku applies to. :code:`
`:code:`
`Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. + :vartype resource_type: str + :ivar sku: The supported SKU for a for node type. + :vartype sku: ~service_fabric_managed_clusters_management_client.models.NodeTypeSupportedSku + :ivar capacity: Provides information about how the node count can be scaled. + :vartype capacity: + ~service_fabric_managed_clusters_management_client.models.NodeTypeSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'NodeTypeSupportedSku'}, + 'capacity': {'key': 'capacity', 'type': 'NodeTypeSkuCapacity'}, + } + + def __init__( + self, + **kwargs + ): + super(NodeTypeAvailableSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + class NodeTypeListResult(msrest.serialization.Model): """Node type list results. @@ -1734,15 +1864,155 @@ def __init__( self.next_link = kwargs.get('next_link', None) +class NodeTypeListSkuResult(msrest.serialization.Model): + """Node type available sku list results. + + :param value: The list of available node type SKUs. + :type value: + list[~service_fabric_managed_clusters_management_client.models.NodeTypeAvailableSku] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NodeTypeAvailableSku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NodeTypeListSkuResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class NodeTypeSku(msrest.serialization.Model): + """Describes a node type sku. + + All required parameters must be populated in order to send to Azure. + + :param name: The sku name. :code:`
`:code:`
`Name is internally generated and is used + in auto-scale scenarios.:code:`
` Property does not allow to be changed to other values + than generated.:code:`
` To avoid deployment errors please omit the property. + :type name: str + :param tier: Specifies the tier of the node type. :code:`
`:code:`
` Possible + Values::code:`
` **Standard**. + :type tier: str + :param capacity: Required. The number of nodes in the node type.:code:`
`:code:`
`If + present in request it will override properties.vmInstanceCount. + :type capacity: int + """ + + _validation = { + 'capacity': {'required': True, 'maximum': 2147483647, 'minimum': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(NodeTypeSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.capacity = kwargs['capacity'] + + +class NodeTypeSkuCapacity(msrest.serialization.Model): + """Provides information about how node type can be scaled. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar minimum: Lowest permitted node count in a node type. + :vartype minimum: int + :ivar maximum: Highest permitted node count in a node type. + :vartype maximum: int + :ivar default: Default node count in a node type. + :vartype default: int + :ivar scale_type: Node type capacity scale type. Possible values include: "None", "Manual", + "Automatic". Default value: "None". + :vartype scale_type: str or + ~service_fabric_managed_clusters_management_client.models.NodeTypeSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NodeTypeSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None + + +class NodeTypeSupportedSku(msrest.serialization.Model): + """Describes a node type supported sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The sku name. + :vartype name: str + :ivar tier: Specifies the tier of the node type. :code:`
`:code:`
` Possible + Values::code:`
` **Standard**. + :vartype tier: str + """ + + _validation = { + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NodeTypeSupportedSku, self).__init__(**kwargs) + self.name = None + self.tier = None + + class NodeTypeUpdateParameters(msrest.serialization.Model): """Node type update request. :param tags: A set of tags. Node type update parameters. - :type tags: dict[str, str] + :type tags: any + :param sku: The node type sku. + :type sku: ~service_fabric_managed_clusters_management_client.models.NodeTypeSku + :param additional_properties: + :type additional_properties: str """ _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'sku': {'key': 'sku', 'type': 'NodeTypeSku'}, + 'additional_properties': {'key': 'additionalProperties', 'type': 'str'}, } def __init__( @@ -1751,6 +2021,8 @@ def __init__( ): super(NodeTypeUpdateParameters, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.additional_properties = kwargs.get('additional_properties', None) class OperationListResult(msrest.serialization.Model): @@ -3132,10 +3404,10 @@ class VMSSExtension(msrest.serialization.Model): upgrade minor versions unless redeployed, even with this property set to true. :type auto_upgrade_minor_version: bool :param settings: Json formatted public settings for the extension. - :type settings: object + :type settings: any :param protected_settings: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. - :type protected_settings: object + :type protected_settings: any :param force_update_tag: If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed. :type force_update_tag: str 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 3e48d8352f3c..1f4b55aad6ab 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 @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization @@ -1023,6 +1023,77 @@ def __init__( self.message = message +class FrontendConfiguration(msrest.serialization.Model): + """Describes the frontend configurations for the node type. + + :param ip_address_type: The IP address type of this frontend configuration. If omitted the + default value is IPv4. Possible values include: "IPv4", "IPv6". Default value: "IPv4". + :type ip_address_type: str or + ~service_fabric_managed_clusters_management_client.models.IPAddressType + :param load_balancer_backend_address_pool_id: The resource Id of the Load Balancer backend + address pool that the VM instances of the node type are associated with. The format of the + resource Id is + '/subscriptions/:code:``/resourceGroups/:code:``/providers/Microsoft.Network/loadBalancers/:code:``/backendAddressPools/:code:``'. + :type load_balancer_backend_address_pool_id: str + :param load_balancer_inbound_nat_pool_id: The resource Id of the Load Balancer inbound NAT pool + that the VM instances of the node type are associated with. The format of the resource Id is + '/subscriptions/:code:``/resourceGroups/:code:``/providers/Microsoft.Network/loadBalancers/:code:``/inboundNatPools/:code:``'. + :type load_balancer_inbound_nat_pool_id: str + """ + + _attribute_map = { + 'ip_address_type': {'key': 'ipAddressType', 'type': 'str'}, + 'load_balancer_backend_address_pool_id': {'key': 'loadBalancerBackendAddressPoolId', 'type': 'str'}, + 'load_balancer_inbound_nat_pool_id': {'key': 'loadBalancerInboundNatPoolId', 'type': 'str'}, + } + + def __init__( + self, + *, + ip_address_type: Optional[Union[str, "IPAddressType"]] = "IPv4", + load_balancer_backend_address_pool_id: Optional[str] = None, + load_balancer_inbound_nat_pool_id: Optional[str] = None, + **kwargs + ): + super(FrontendConfiguration, self).__init__(**kwargs) + self.ip_address_type = ip_address_type + self.load_balancer_backend_address_pool_id = load_balancer_backend_address_pool_id + self.load_balancer_inbound_nat_pool_id = load_balancer_inbound_nat_pool_id + + +class IPTag(msrest.serialization.Model): + """IPTag associated with the object. + + All required parameters must be populated in order to send to Azure. + + :param ip_tag_type: Required. The IP tag type. + :type ip_tag_type: str + :param tag: Required. The value of the IP tag. + :type tag: str + """ + + _validation = { + 'ip_tag_type': {'required': True}, + 'tag': {'required': True}, + } + + _attribute_map = { + 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__( + self, + *, + ip_tag_type: str, + tag: str, + **kwargs + ): + super(IPTag, self).__init__(**kwargs) + self.ip_tag_type = ip_tag_type + self.tag = tag + + class LoadBalancingRule(msrest.serialization.Model): """Describes a load balancing rule. @@ -1195,11 +1266,11 @@ class ManagedCluster(Resource): :type load_balancing_rules: list[~service_fabric_managed_clusters_management_client.models.LoadBalancingRule] :param allow_rdp_access: Setting this to true enables RDP access to the VM. The default NSG - rule opens RDP port to internet which can be overridden with custom Network Security Rules. The + rule opens RDP port to Internet which can be overridden with custom Network Security Rules. The default value for this setting is false. :type allow_rdp_access: bool - :param network_security_rules: Custom Network Security Rules that are applied to the virtual - network of the cluster. + :param network_security_rules: Custom Network Security Rules that are applied to the Virtual + Network of the cluster. :type network_security_rules: list[~service_fabric_managed_clusters_management_client.models.NetworkSecurityRule] :param clients: Client certificates that are allowed to manage the cluster. @@ -1243,6 +1314,17 @@ class ManagedCluster(Resource): :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 + :param enable_ipv6: Setting this to true creates IPv6 address space for the default VNet used + by the cluster. This setting cannot be changed once the cluster is created. The default value + for this setting is false. + :type enable_ipv6: bool + :param subnet_id: If specified, the node types for the cluster are created in this subnet + instead of the default VNet. The **networkSecurityRules** specified for the cluster are also + applied to this subnet. This setting cannot be changed once the cluster is created. + :type subnet_id: str + :param ip_tags: The list of IP tags associated with the default public IP address of the + cluster. + :type ip_tags: list[~service_fabric_managed_clusters_management_client.models.IPTag] """ _validation = { @@ -1293,6 +1375,9 @@ class ManagedCluster(Resource): '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'}, + 'enable_ipv6': {'key': 'properties.enableIpv6', 'type': 'bool'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[IPTag]'}, } def __init__( @@ -1319,6 +1404,9 @@ def __init__( enable_auto_os_upgrade: Optional[bool] = None, zonal_resiliency: Optional[bool] = False, application_type_versions_cleanup_policy: Optional["ApplicationTypeVersionsCleanupPolicy"] = None, + enable_ipv6: Optional[bool] = None, + subnet_id: Optional[str] = None, + ip_tags: Optional[List["IPTag"]] = None, **kwargs ): super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) @@ -1347,13 +1435,14 @@ def __init__( 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 + self.enable_ipv6 = enable_ipv6 + self.subnet_id = subnet_id + self.ip_tags = ip_tags 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. @@ -1364,14 +1453,11 @@ class ManagedClusterCodeVersionResult(msrest.serialization.Model): :type cluster_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 + :param os_type: Cluster operating system, the default will be Windows. The only acceptable + values to pass in are None and "Windows". The default value is None. + :type os_type: str """ - _validation = { - 'os_type': {'constant': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -1381,8 +1467,6 @@ class ManagedClusterCodeVersionResult(msrest.serialization.Model): 'os_type': {'key': 'properties.osType', 'type': 'str'}, } - os_type = "Windows" - def __init__( self, *, @@ -1391,6 +1475,7 @@ def __init__( type: Optional[str] = None, cluster_code_version: Optional[str] = None, support_expiry_utc: Optional[str] = None, + os_type: Optional[str] = None, **kwargs ): super(ManagedClusterCodeVersionResult, self).__init__(**kwargs) @@ -1399,6 +1484,7 @@ def __init__( self.type = type self.cluster_code_version = cluster_code_version self.support_expiry_utc = support_expiry_utc + self.os_type = os_type class ManagedClusterListResult(msrest.serialization.Model): @@ -1708,17 +1794,19 @@ class NodeType(ManagedProxyResource): :type tags: dict[str, str] :ivar system_data: Metadata pertaining to creation and last modification of the resource. :vartype system_data: ~service_fabric_managed_clusters_management_client.models.SystemData - :param is_primary: The node type on which system services will run. Only one node type should - be marked as primary. Primary node type cannot be deleted or changed for existing clusters. + :param sku: The node type sku. + :type sku: ~service_fabric_managed_clusters_management_client.models.NodeTypeSku + :param is_primary: Indicates the Service Fabric system services for the cluster will run on + this node type. This setting cannot be changed once the node type is created. :type is_primary: bool - :param vm_instance_count: The number of nodes in the node type. + :param vm_instance_count: The number of nodes in the node type. :code:`
`:code:`
`\ + **Values:** :code:`
`-1 - Use when auto scale rules are configured or sku.capacity is + defined :code:`
` 0 - Not supported :code:`
` >0 - Use for manual scale. :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". + :param data_disk_type: Managed data disk type. 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. @@ -1756,7 +1844,8 @@ class NodeType(ManagedProxyResource): :param vm_extensions: Set of extensions that should be installed onto the virtual machines. :type vm_extensions: list[~service_fabric_managed_clusters_management_client.models.VMSSExtension] - :param vm_managed_identity: Identities for the virtual machine scale set under the node type. + :param vm_managed_identity: Identities to assign to 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. @@ -1764,8 +1853,17 @@ class NodeType(ManagedProxyResource): :param multiple_placement_groups: Indicates if scale set associated with the node type can be composed of multiple placement groups. :type multiple_placement_groups: bool - :ivar provisioning_state: The provisioning state of the managed cluster resource. Possible - values include: "None", "Creating", "Created", "Updating", "Succeeded", "Failed", "Canceled", + :param frontend_configurations: Indicates the node type uses its own frontend configurations + instead of the default one for the cluster. This setting can only be specified for non-primary + node types and can not be added or removed after the node type is created. + :type frontend_configurations: + list[~service_fabric_managed_clusters_management_client.models.FrontendConfiguration] + :param network_security_rules: The Network Security Rules for this node type. This setting can + only be specified for node types that are configured with frontend configurations. + :type network_security_rules: + list[~service_fabric_managed_clusters_management_client.models.NetworkSecurityRule] + :ivar provisioning_state: The provisioning state of the node type resource. Possible values + include: "None", "Creating", "Created", "Updating", "Succeeded", "Failed", "Canceled", "Deleting", "Deleted", "Other". :vartype provisioning_state: str or ~service_fabric_managed_clusters_management_client.models.ManagedResourceProvisioningState @@ -1776,7 +1874,7 @@ class NodeType(ManagedProxyResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'system_data': {'readonly': True}, - 'vm_instance_count': {'maximum': 2147483647, 'minimum': 1}, + 'vm_instance_count': {'maximum': 2147483647, 'minimum': -1}, 'provisioning_state': {'readonly': True}, } @@ -1786,6 +1884,7 @@ class NodeType(ManagedProxyResource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'sku': {'key': 'sku', 'type': 'NodeTypeSku'}, 'is_primary': {'key': 'properties.isPrimary', 'type': 'bool'}, 'vm_instance_count': {'key': 'properties.vmInstanceCount', 'type': 'int'}, 'data_disk_size_gb': {'key': 'properties.dataDiskSizeGB', 'type': 'int'}, @@ -1804,6 +1903,8 @@ class NodeType(ManagedProxyResource): 'vm_managed_identity': {'key': 'properties.vmManagedIdentity', 'type': 'VmManagedIdentity'}, 'is_stateless': {'key': 'properties.isStateless', 'type': 'bool'}, 'multiple_placement_groups': {'key': 'properties.multiplePlacementGroups', 'type': 'bool'}, + 'frontend_configurations': {'key': 'properties.frontendConfigurations', 'type': '[FrontendConfiguration]'}, + 'network_security_rules': {'key': 'properties.networkSecurityRules', 'type': '[NetworkSecurityRule]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -1811,6 +1912,7 @@ def __init__( self, *, tags: Optional[Dict[str, str]] = None, + sku: Optional["NodeTypeSku"] = None, is_primary: Optional[bool] = None, vm_instance_count: Optional[int] = None, data_disk_size_gb: Optional[int] = None, @@ -1829,9 +1931,12 @@ def __init__( vm_managed_identity: Optional["VmManagedIdentity"] = None, is_stateless: Optional[bool] = False, multiple_placement_groups: Optional[bool] = False, + frontend_configurations: Optional[List["FrontendConfiguration"]] = None, + network_security_rules: Optional[List["NetworkSecurityRule"]] = None, **kwargs ): super(NodeType, self).__init__(tags=tags, **kwargs) + self.sku = sku self.is_primary = is_primary self.vm_instance_count = vm_instance_count self.data_disk_size_gb = data_disk_size_gb @@ -1850,6 +1955,8 @@ def __init__( self.vm_managed_identity = vm_managed_identity self.is_stateless = is_stateless self.multiple_placement_groups = multiple_placement_groups + self.frontend_configurations = frontend_configurations + self.network_security_rules = network_security_rules self.provisioning_state = None @@ -1885,6 +1992,43 @@ def __init__( self.force = force +class NodeTypeAvailableSku(msrest.serialization.Model): + """Defines the type of sku available for a node type. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar resource_type: The type of resource the sku applies to. :code:`
`:code:`
`Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. + :vartype resource_type: str + :ivar sku: The supported SKU for a for node type. + :vartype sku: ~service_fabric_managed_clusters_management_client.models.NodeTypeSupportedSku + :ivar capacity: Provides information about how the node count can be scaled. + :vartype capacity: + ~service_fabric_managed_clusters_management_client.models.NodeTypeSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'NodeTypeSupportedSku'}, + 'capacity': {'key': 'capacity', 'type': 'NodeTypeSkuCapacity'}, + } + + def __init__( + self, + **kwargs + ): + super(NodeTypeAvailableSku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + class NodeTypeListResult(msrest.serialization.Model): """Node type list results. @@ -1911,25 +2055,176 @@ def __init__( self.next_link = next_link +class NodeTypeListSkuResult(msrest.serialization.Model): + """Node type available sku list results. + + :param value: The list of available node type SKUs. + :type value: + list[~service_fabric_managed_clusters_management_client.models.NodeTypeAvailableSku] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NodeTypeAvailableSku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NodeTypeAvailableSku"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(NodeTypeListSkuResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class NodeTypeSku(msrest.serialization.Model): + """Describes a node type sku. + + All required parameters must be populated in order to send to Azure. + + :param name: The sku name. :code:`
`:code:`
`Name is internally generated and is used + in auto-scale scenarios.:code:`
` Property does not allow to be changed to other values + than generated.:code:`
` To avoid deployment errors please omit the property. + :type name: str + :param tier: Specifies the tier of the node type. :code:`
`:code:`
` Possible + Values::code:`
` **Standard**. + :type tier: str + :param capacity: Required. The number of nodes in the node type.:code:`
`:code:`
`If + present in request it will override properties.vmInstanceCount. + :type capacity: int + """ + + _validation = { + 'capacity': {'required': True, 'maximum': 2147483647, 'minimum': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + *, + capacity: int, + name: Optional[str] = None, + tier: Optional[str] = None, + **kwargs + ): + super(NodeTypeSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity + + +class NodeTypeSkuCapacity(msrest.serialization.Model): + """Provides information about how node type can be scaled. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar minimum: Lowest permitted node count in a node type. + :vartype minimum: int + :ivar maximum: Highest permitted node count in a node type. + :vartype maximum: int + :ivar default: Default node count in a node type. + :vartype default: int + :ivar scale_type: Node type capacity scale type. Possible values include: "None", "Manual", + "Automatic". Default value: "None". + :vartype scale_type: str or + ~service_fabric_managed_clusters_management_client.models.NodeTypeSkuScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NodeTypeSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None + + +class NodeTypeSupportedSku(msrest.serialization.Model): + """Describes a node type supported sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The sku name. + :vartype name: str + :ivar tier: Specifies the tier of the node type. :code:`
`:code:`
` Possible + Values::code:`
` **Standard**. + :vartype tier: str + """ + + _validation = { + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NodeTypeSupportedSku, self).__init__(**kwargs) + self.name = None + self.tier = None + + class NodeTypeUpdateParameters(msrest.serialization.Model): """Node type update request. :param tags: A set of tags. Node type update parameters. - :type tags: dict[str, str] + :type tags: any + :param sku: The node type sku. + :type sku: ~service_fabric_managed_clusters_management_client.models.NodeTypeSku + :param additional_properties: + :type additional_properties: str """ _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'sku': {'key': 'sku', 'type': 'NodeTypeSku'}, + 'additional_properties': {'key': 'additionalProperties', 'type': 'str'}, } def __init__( self, *, - tags: Optional[Dict[str, str]] = None, + tags: Optional[Any] = None, + sku: Optional["NodeTypeSku"] = None, + additional_properties: Optional[str] = None, **kwargs ): super(NodeTypeUpdateParameters, self).__init__(**kwargs) self.tags = tags + self.sku = sku + self.additional_properties = additional_properties class OperationListResult(msrest.serialization.Model): @@ -3438,10 +3733,10 @@ class VMSSExtension(msrest.serialization.Model): upgrade minor versions unless redeployed, even with this property set to true. :type auto_upgrade_minor_version: bool :param settings: Json formatted public settings for the extension. - :type settings: object + :type settings: any :param protected_settings: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. - :type protected_settings: object + :type protected_settings: any :param force_update_tag: If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed. :type force_update_tag: str @@ -3481,8 +3776,8 @@ def __init__( type: str, type_handler_version: str, auto_upgrade_minor_version: Optional[bool] = None, - settings: Optional[object] = None, - protected_settings: Optional[object] = None, + settings: Optional[Any] = None, + protected_settings: Optional[Any] = None, force_update_tag: Optional[str] = None, provision_after_extensions: Optional[List[str]] = None, **kwargs 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 b69adbbae5ff..9eb8b7125dc6 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 @@ -114,6 +114,15 @@ class FailureAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: fails. Service Fabric will not proceed to the next upgrade domain automatically. MANUAL = "Manual" +class IPAddressType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The IP address type. + """ + + #: IPv4 address type. + I_PV4 = "IPv4" + #: IPv6 address type. + I_PV6 = "IPv6" + class ManagedClusterAddOnFeature(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Available cluster add-on features """ @@ -164,6 +173,17 @@ class MoveCost(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Specifies the move cost of the service as High. The value is 3. HIGH = "High" +class NodeTypeSkuScaleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Node type capacity scale type. + """ + + #: Node count is not adjustable in any way (e.g. it is fixed). + NONE = "None" + #: The user must manually scale out/in. + MANUAL = "Manual" + #: Automatic scale is allowed. + AUTOMATIC = "Automatic" + class NsgProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Network protocol this rule applies to. """ 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 c4e1c9fcc149..c078a5f0ca6d 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 @@ -14,6 +14,7 @@ from ._managed_cluster_version_operations import ManagedClusterVersionOperations from ._operations import Operations from ._node_types_operations import NodeTypesOperations +from ._node_type_skus_operations import NodeTypeSkusOperations __all__ = [ 'ApplicationTypesOperations', @@ -24,4 +25,5 @@ 'ManagedClusterVersionOperations', 'Operations', 'NodeTypesOperations', + 'NodeTypeSkusOperations', ] 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 96d08e8c530e..8a03525284da 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-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -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-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -358,7 +358,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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-05-01" + api_version = "2021-07-01-preview" accept = "application/json" def prepare_request(next_link=None): 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 75cd55c81f5e..a80853b946ca 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-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -146,7 +146,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -220,7 +220,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -276,7 +276,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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-05-01" + api_version = "2021-07-01-preview" accept = "application/json" def prepare_request(next_link=None): 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 86016af8a49d..f54969302d81 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-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -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-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -341,7 +341,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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-05-01" + api_version = "2021-07-01-preview" accept = "application/json" def prepare_request(next_link=None): 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 index 5a6618102938..3296685c253d 100644 --- 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 @@ -70,7 +70,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -134,7 +134,7 @@ def get_by_environment( } error_map.update(kwargs.pop('error_map', {})) environment = "Windows" - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -195,7 +195,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -255,7 +255,7 @@ def list_by_environment( } error_map.update(kwargs.pop('error_map', {})) environment = "Windows" - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL 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 b51fdd547e97..2afd856f8857 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-05-01" + api_version = "2021-07-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -142,7 +142,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -219,7 +219,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -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-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -471,7 +471,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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_type_skus_operations.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_node_type_skus_operations.py new file mode 100644 index 000000000000..abfdaf93e99a --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_node_type_skus_operations.py @@ -0,0 +1,128 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NodeTypeSkusOperations(object): + """NodeTypeSkusOperations 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 list( + self, + resource_group_name, # type: str + cluster_name, # type: str + node_type_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NodeTypeListSkuResult"] + """Gets a Service Fabric node type SKUs. + + Get a Service Fabric node type supported SKUs. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster resource. + :type cluster_name: str + :param node_type_name: The name of the node type. + :type node_type_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NodeTypeListSkuResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~service_fabric_managed_clusters_management_client.models.NodeTypeListSkuResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeTypeListSkuResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'nodeTypeName': self._serialize.url("node_type_name", node_type_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NodeTypeListSkuResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorModel, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/skus'} # type: ignore 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 337b2f27e979..58fdf96c4c44 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-05-01" + api_version = "2021-07-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -139,7 +139,7 @@ def _restart_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -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-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -811,7 +811,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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 96b28db7ca72..2ebe63ba8d94 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-05-01" + api_version = "2021-07-01-preview" accept = "application/json" def prepare_request(next_link=None): 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 eb9645bdb401..1f50d625fd01 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-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -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-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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-05-01" + api_version = "2021-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -360,7 +360,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01" + api_version = "2021-07-01-preview" accept = "application/json" # Construct URL @@ -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: 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. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in 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-05-01" + api_version = "2021-07-01-preview" accept = "application/json" def prepare_request(next_link=None):