diff --git a/customSDK/__init__.py b/customSDK/__init__.py index 69e3be5..de40ea7 100644 --- a/customSDK/__init__.py +++ b/customSDK/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__import__('pkg_resources').declare_namespace(__name__) diff --git a/customSDK/servicefabric/__init__.py b/customSDK/servicefabric/__init__.py index 4fb9457..cbf78a5 100644 --- a/customSDK/servicefabric/__init__.py +++ b/customSDK/servicefabric/__init__.py @@ -9,11 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import ServiceFabricClientAPIsConfiguration -from ._service_fabric_client_ap_is import ServiceFabricClientAPIs -__all__ = ['ServiceFabricClientAPIs', 'ServiceFabricClientAPIsConfiguration'] - +from .service_fabric_client_ap_is import ServiceFabricClientAPIs from .version import VERSION +__all__ = ['ServiceFabricClientAPIs'] + __version__ = VERSION diff --git a/customSDK/servicefabric/_configuration.py b/customSDK/servicefabric/_configuration.py deleted file mode 100644 index 2e04c5d..0000000 --- a/customSDK/servicefabric/_configuration.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class ServiceFabricClientAPIsConfiguration(AzureConfiguration): - """Configuration for ServiceFabricClientAPIs - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param str base_url: Service URL - """ - - def __init__( - self, credentials, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if not base_url: - base_url = 'http://localhost:19080' - - super(ServiceFabricClientAPIsConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-servicefabric/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials diff --git a/customSDK/servicefabric/_service_fabric_client_ap_is.py b/customSDK/servicefabric/_service_fabric_client_ap_is.py deleted file mode 100644 index cc509b8..0000000 --- a/customSDK/servicefabric/_service_fabric_client_ap_is.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import ServiceFabricClientAPIsConfiguration -from .operations import ServiceFabricClientAPIsOperationsMixin -from .operations import MeshSecretOperations -from .operations import MeshSecretValueOperations -from .operations import MeshVolumeOperations -from .operations import MeshNetworkOperations -from .operations import MeshApplicationOperations -from .operations import MeshServiceOperations -from .operations import MeshCodePackageOperations -from .operations import MeshServiceReplicaOperations -from .operations import MeshGatewayOperations -from . import models - - -class ServiceFabricClientAPIs(ServiceFabricClientAPIsOperationsMixin, SDKClient): - """Service Fabric REST Client APIs allows management of Service Fabric clusters, applications and services. - - :ivar config: Configuration for client. - :vartype config: ServiceFabricClientAPIsConfiguration - - :ivar mesh_secret: MeshSecret operations - :vartype mesh_secret: azure.servicefabric.operations.MeshSecretOperations - :ivar mesh_secret_value: MeshSecretValue operations - :vartype mesh_secret_value: azure.servicefabric.operations.MeshSecretValueOperations - :ivar mesh_volume: MeshVolume operations - :vartype mesh_volume: azure.servicefabric.operations.MeshVolumeOperations - :ivar mesh_network: MeshNetwork operations - :vartype mesh_network: azure.servicefabric.operations.MeshNetworkOperations - :ivar mesh_application: MeshApplication operations - :vartype mesh_application: azure.servicefabric.operations.MeshApplicationOperations - :ivar mesh_service: MeshService operations - :vartype mesh_service: azure.servicefabric.operations.MeshServiceOperations - :ivar mesh_code_package: MeshCodePackage operations - :vartype mesh_code_package: azure.servicefabric.operations.MeshCodePackageOperations - :ivar mesh_service_replica: MeshServiceReplica operations - :vartype mesh_service_replica: azure.servicefabric.operations.MeshServiceReplicaOperations - :ivar mesh_gateway: MeshGateway operations - :vartype mesh_gateway: azure.servicefabric.operations.MeshGatewayOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param str base_url: Service URL - """ - - def __init__( - self, credentials, base_url=None): - - self.config = ServiceFabricClientAPIsConfiguration(credentials, base_url) - super(ServiceFabricClientAPIs, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '8.0.0.46' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.mesh_secret = MeshSecretOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_secret_value = MeshSecretValueOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_volume = MeshVolumeOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_network = MeshNetworkOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_application = MeshApplicationOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_service = MeshServiceOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_code_package = MeshCodePackageOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_service_replica = MeshServiceReplicaOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_gateway = MeshGatewayOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/customSDK/servicefabric/aio/_service_fabric_client_ap_is_async.py b/customSDK/servicefabric/aio/_service_fabric_client_ap_is_async.py deleted file mode 100644 index 1548c2a..0000000 --- a/customSDK/servicefabric/aio/_service_fabric_client_ap_is_async.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.async_client import SDKClientAsync -from msrest import Serializer, Deserializer - -from .._configuration import ServiceFabricClientAPIsConfiguration -from .operations_async import ServiceFabricClientAPIsOperationsMixin -from .operations_async import MeshSecretOperations -from .operations_async import MeshSecretValueOperations -from .operations_async import MeshVolumeOperations -from .operations_async import MeshNetworkOperations -from .operations_async import MeshApplicationOperations -from .operations_async import MeshServiceOperations -from .operations_async import MeshCodePackageOperations -from .operations_async import MeshServiceReplicaOperations -from .operations_async import MeshGatewayOperations -from .. import models - - -class ServiceFabricClientAPIs(ServiceFabricClientAPIsOperationsMixin, SDKClientAsync): - """Service Fabric REST Client APIs allows management of Service Fabric clusters, applications and services. - - :ivar config: Configuration for client. - :vartype config: ServiceFabricClientAPIsConfiguration - - :ivar mesh_secret: MeshSecret operations - :vartype mesh_secret: azure.servicefabric.operations.MeshSecretOperations - :ivar mesh_secret_value: MeshSecretValue operations - :vartype mesh_secret_value: azure.servicefabric.operations.MeshSecretValueOperations - :ivar mesh_volume: MeshVolume operations - :vartype mesh_volume: azure.servicefabric.operations.MeshVolumeOperations - :ivar mesh_network: MeshNetwork operations - :vartype mesh_network: azure.servicefabric.operations.MeshNetworkOperations - :ivar mesh_application: MeshApplication operations - :vartype mesh_application: azure.servicefabric.operations.MeshApplicationOperations - :ivar mesh_service: MeshService operations - :vartype mesh_service: azure.servicefabric.operations.MeshServiceOperations - :ivar mesh_code_package: MeshCodePackage operations - :vartype mesh_code_package: azure.servicefabric.operations.MeshCodePackageOperations - :ivar mesh_service_replica: MeshServiceReplica operations - :vartype mesh_service_replica: azure.servicefabric.operations.MeshServiceReplicaOperations - :ivar mesh_gateway: MeshGateway operations - :vartype mesh_gateway: azure.servicefabric.operations.MeshGatewayOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param str base_url: Service URL - """ - - def __init__( - self, credentials, base_url=None): - - self.config = ServiceFabricClientAPIsConfiguration(credentials, base_url) - super(ServiceFabricClientAPIs, self).__init__(self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '8.0.0.46' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.mesh_secret = MeshSecretOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_secret_value = MeshSecretValueOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_volume = MeshVolumeOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_network = MeshNetworkOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_application = MeshApplicationOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_service = MeshServiceOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_code_package = MeshCodePackageOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_service_replica = MeshServiceReplicaOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_gateway = MeshGatewayOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/customSDK/servicefabric/aio/operations_async/__init__.py b/customSDK/servicefabric/aio/operations_async/__init__.py deleted file mode 100644 index aeaff96..0000000 --- a/customSDK/servicefabric/aio/operations_async/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._mesh_secret_operations_async import MeshSecretOperations -from ._mesh_secret_value_operations_async import MeshSecretValueOperations -from ._mesh_volume_operations_async import MeshVolumeOperations -from ._mesh_network_operations_async import MeshNetworkOperations -from ._mesh_application_operations_async import MeshApplicationOperations -from ._mesh_service_operations_async import MeshServiceOperations -from ._mesh_code_package_operations_async import MeshCodePackageOperations -from ._mesh_service_replica_operations_async import MeshServiceReplicaOperations -from ._mesh_gateway_operations_async import MeshGatewayOperations -from ._service_fabric_client_ap_is_operations_async import ServiceFabricClientAPIsOperationsMixin - -__all__ = [ - 'MeshSecretOperations', - 'MeshSecretValueOperations', - 'MeshVolumeOperations', - 'MeshNetworkOperations', - 'MeshApplicationOperations', - 'MeshServiceOperations', - 'MeshCodePackageOperations', - 'MeshServiceReplicaOperations', - 'MeshGatewayOperations', - 'ServiceFabricClientAPIsOperationsMixin', -] diff --git a/customSDK/servicefabric/aio/operations_async/_mesh_application_operations_async.py b/customSDK/servicefabric/aio/operations_async/_mesh_application_operations_async.py deleted file mode 100644 index 16d09e6..0000000 --- a/customSDK/servicefabric/aio/operations_async/_mesh_application_operations_async.py +++ /dev/null @@ -1,348 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from ... import models - - -class MeshApplicationOperations: - """MeshApplicationOperations async operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - async def create_or_update( - self, application_resource_name, application_resource_description, *, custom_headers=None, raw=False, **operation_config): - """Creates or updates a Application resource. - - Creates a Application resource with the specified name, description and - properties. If Application resource with the same name exists, then it - is updated with the specified description and properties. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param application_resource_description: Description for creating a - Application resource. - :type application_resource_description: - ~azure.servicefabric.models.ApplicationResourceDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationResourceDescription or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.ApplicationResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4-preview" - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(application_resource_description, 'ApplicationResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApplicationResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('ApplicationResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/Resources/Applications/{applicationResourceName}'} - - async def get( - self, application_resource_name, *, custom_headers=None, raw=False, **operation_config): - """Gets the Application resource with the given name. - - Gets the information about the Application resource with the given - name. The information include the description and other properties of - the Application. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationResourceDescription or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.ApplicationResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4-preview" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApplicationResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/Resources/Applications/{applicationResourceName}'} - - async def delete( - self, application_resource_name, *, custom_headers=None, raw=False, **operation_config): - """Deletes the Application resource. - - Deletes the Application resource identified by the name. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4-preview" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/Resources/Applications/{applicationResourceName}'} - - async def list( - self, *, custom_headers=None, raw=False, **operation_config): - """Lists all the application resources. - - Gets the information about all application resources in a given - resource group. The information include the description and other - properties of the Application. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedApplicationResourceDescriptionList or ClientRawResponse - if raw=true - :rtype: - ~azure.servicefabric.models.PagedApplicationResourceDescriptionList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4-preview" - - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedApplicationResourceDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/Resources/Applications'} - - async def get_upgrade_progress( - self, application_resource_name, *, custom_headers=None, raw=False, **operation_config): - """Gets the progress of the latest upgrade performed on this application - resource. - - Gets the upgrade progress information about the Application resource - with the given name. The information include percentage of completion - and other upgrade state information of the Application resource. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationResourceUpgradeProgressInfo or ClientRawResponse - if raw=true - :rtype: - ~azure.servicefabric.models.ApplicationResourceUpgradeProgressInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "7.0" - - # Construct URL - url = self.get_upgrade_progress.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApplicationResourceUpgradeProgressInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_progress.metadata = {'url': '/Resources/Applications/{applicationResourceName}/$/GetUpgradeProgress'} diff --git a/customSDK/servicefabric/aio/operations_async/_mesh_code_package_operations_async.py b/customSDK/servicefabric/aio/operations_async/_mesh_code_package_operations_async.py deleted file mode 100644 index 71589dd..0000000 --- a/customSDK/servicefabric/aio/operations_async/_mesh_code_package_operations_async.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from ... import models - - -class MeshCodePackageOperations: - """MeshCodePackageOperations async operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "6.4-preview" - - self.config = config - - async def get_container_logs( - self, application_resource_name, service_resource_name, replica_name, code_package_name, tail=None, *, custom_headers=None, raw=False, **operation_config): - """Gets the logs from the container. - - Gets the logs for the container of the specified code package of the - service replica. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :param replica_name: Service Fabric replica name. - :type replica_name: str - :param code_package_name: The name of code package of the service. - :type code_package_name: str - :param tail: Number of lines to show from the end of the logs. Default - is 100. 'all' to show the complete logs. - :type tail: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContainerLogs or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ContainerLogs or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.get_container_logs.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True), - 'replicaName': self._serialize.url("replica_name", replica_name, 'str', skip_quote=True), - 'codePackageName': self._serialize.url("code_package_name", code_package_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if tail is not None: - query_parameters['Tail'] = self._serialize.query("tail", tail, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ContainerLogs', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_container_logs.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}/CodePackages/{codePackageName}/Logs'} diff --git a/customSDK/servicefabric/aio/operations_async/_mesh_gateway_operations_async.py b/customSDK/servicefabric/aio/operations_async/_mesh_gateway_operations_async.py deleted file mode 100644 index ec18f40..0000000 --- a/customSDK/servicefabric/aio/operations_async/_mesh_gateway_operations_async.py +++ /dev/null @@ -1,276 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from ... import models - - -class MeshGatewayOperations: - """MeshGatewayOperations async operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "6.4-preview" - - self.config = config - - async def create_or_update( - self, gateway_resource_name, gateway_resource_description, *, custom_headers=None, raw=False, **operation_config): - """Creates or updates a Gateway resource. - - Creates a Gateway resource with the specified name, description and - properties. If Gateway resource with the same name exists, then it is - updated with the specified description and properties. Use Gateway - resource to provide public connectivity to application services. - - :param gateway_resource_name: The identity of the gateway. - :type gateway_resource_name: str - :param gateway_resource_description: Description for creating a - Gateway resource. - :type gateway_resource_description: - ~azure.servicefabric.models.GatewayResourceDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: GatewayResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.GatewayResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(gateway_resource_description, 'GatewayResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('GatewayResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('GatewayResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/Resources/Gateways/{gatewayResourceName}'} - - async def get( - self, gateway_resource_name, *, custom_headers=None, raw=False, **operation_config): - """Gets the Gateway resource with the given name. - - Gets the information about the Gateway resource with the given name. - The information include the description and other properties of the - Gateway. - - :param gateway_resource_name: The identity of the gateway. - :type gateway_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: GatewayResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.GatewayResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('GatewayResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/Resources/Gateways/{gatewayResourceName}'} - - async def delete( - self, gateway_resource_name, *, custom_headers=None, raw=False, **operation_config): - """Deletes the Gateway resource. - - Deletes the Gateway resource identified by the name. - - :param gateway_resource_name: The identity of the gateway. - :type gateway_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/Resources/Gateways/{gatewayResourceName}'} - - async def list( - self, *, custom_headers=None, raw=False, **operation_config): - """Lists all the gateway resources. - - Gets the information about all gateway resources in a given resource - group. The information include the description and other properties of - the Gateway. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedGatewayResourceDescriptionList or ClientRawResponse if - raw=true - :rtype: - ~azure.servicefabric.models.PagedGatewayResourceDescriptionList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedGatewayResourceDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/Resources/Gateways'} diff --git a/customSDK/servicefabric/aio/operations_async/_mesh_network_operations_async.py b/customSDK/servicefabric/aio/operations_async/_mesh_network_operations_async.py deleted file mode 100644 index c2ceeaa..0000000 --- a/customSDK/servicefabric/aio/operations_async/_mesh_network_operations_async.py +++ /dev/null @@ -1,279 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from ... import models - - -class MeshNetworkOperations: - """MeshNetworkOperations async operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "6.4-preview" - - self.config = config - - async def create_or_update( - self, network_resource_name, name, properties, *, custom_headers=None, raw=False, **operation_config): - """Creates or updates a Network resource. - - Creates a Network resource with the specified name, description and - properties. If Network resource with the same name exists, then it is - updated with the specified description and properties. Network resource - provides connectivity between application services. - - :param network_resource_name: The identity of the network. - :type network_resource_name: str - :param name: Name of the Network resource. - :type name: str - :param properties: Describes properties of a network resource. - :type properties: - ~azure.servicefabric.models.NetworkResourceProperties - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.NetworkResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - network_resource_description = models.NetworkResourceDescription(name=name, properties=properties) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(network_resource_description, 'NetworkResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NetworkResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('NetworkResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/Resources/Networks/{networkResourceName}'} - - async def get( - self, network_resource_name, *, custom_headers=None, raw=False, **operation_config): - """Gets the Network resource with the given name. - - Gets the information about the Network resource with the given name. - The information include the description and other properties of the - Network. - - :param network_resource_name: The identity of the network. - :type network_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.NetworkResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NetworkResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/Resources/Networks/{networkResourceName}'} - - async def delete( - self, network_resource_name, *, custom_headers=None, raw=False, **operation_config): - """Deletes the Network resource. - - Deletes the Network resource identified by the name. - - :param network_resource_name: The identity of the network. - :type network_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/Resources/Networks/{networkResourceName}'} - - async def list( - self, *, custom_headers=None, raw=False, **operation_config): - """Lists all the network resources. - - Gets the information about all network resources in a given resource - group. The information include the description and other properties of - the Network. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedNetworkResourceDescriptionList or ClientRawResponse if - raw=true - :rtype: - ~azure.servicefabric.models.PagedNetworkResourceDescriptionList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedNetworkResourceDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/Resources/Networks'} diff --git a/customSDK/servicefabric/aio/operations_async/_mesh_secret_operations_async.py b/customSDK/servicefabric/aio/operations_async/_mesh_secret_operations_async.py deleted file mode 100644 index 01b2699..0000000 --- a/customSDK/servicefabric/aio/operations_async/_mesh_secret_operations_async.py +++ /dev/null @@ -1,276 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from ... import models - - -class MeshSecretOperations: - """MeshSecretOperations async operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "6.4-preview" - - self.config = config - - async def create_or_update( - self, secret_resource_name, properties, name, *, custom_headers=None, raw=False, **operation_config): - """Creates or updates a Secret resource. - - Creates a Secret resource with the specified name, description and - properties. If Secret resource with the same name exists, then it is - updated with the specified description and properties. Once created, - the kind and contentType of a secret resource cannot be updated. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param properties: Describes the properties of a secret resource. - :type properties: ~azure.servicefabric.models.SecretResourceProperties - :param name: Name of the Secret resource. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecretResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.SecretResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - secret_resource_description = models.SecretResourceDescription(properties=properties, name=name) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(secret_resource_description, 'SecretResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SecretResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('SecretResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/Resources/Secrets/{secretResourceName}'} - - async def get( - self, secret_resource_name, *, custom_headers=None, raw=False, **operation_config): - """Gets the Secret resource with the given name. - - Gets the information about the Secret resource with the given name. The - information include the description and other properties of the Secret. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecretResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.SecretResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SecretResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/Resources/Secrets/{secretResourceName}'} - - async def delete( - self, secret_resource_name, *, custom_headers=None, raw=False, **operation_config): - """Deletes the Secret resource. - - Deletes the specified Secret resource and all of its named values. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/Resources/Secrets/{secretResourceName}'} - - async def list( - self, *, custom_headers=None, raw=False, **operation_config): - """Lists all the secret resources. - - Gets the information about all secret resources in a given resource - group. The information include the description and other properties of - the Secret. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedSecretResourceDescriptionList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedSecretResourceDescriptionList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedSecretResourceDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/Resources/Secrets'} diff --git a/customSDK/servicefabric/aio/operations_async/_mesh_secret_value_operations_async.py b/customSDK/servicefabric/aio/operations_async/_mesh_secret_value_operations_async.py deleted file mode 100644 index 31c99cd..0000000 --- a/customSDK/servicefabric/aio/operations_async/_mesh_secret_value_operations_async.py +++ /dev/null @@ -1,362 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from ... import models - - -class MeshSecretValueOperations: - """MeshSecretValueOperations async operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "6.4-preview" - - self.config = config - - async def add_value( - self, secret_resource_name, secret_value_resource_name, name, value=None, *, custom_headers=None, raw=False, **operation_config): - """Adds the specified value as a new version of the specified secret - resource. - - Creates a new value of the specified secret resource. The name of the - value is typically the version identifier. Once created the value - cannot be changed. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource - value which is typically the version identifier for the value. - :type secret_value_resource_name: str - :param name: Version identifier of the secret value. - :type name: str - :param value: The actual value of the secret. - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecretValueResourceDescription or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.SecretValueResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - secret_value_resource_description = models.SecretValueResourceDescription(name=name, value=value) - - # Construct URL - url = self.add_value.metadata['url'] - path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(secret_value_resource_description, 'SecretValueResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SecretValueResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('SecretValueResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - add_value.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'} - - async def get( - self, secret_resource_name, secret_value_resource_name, *, custom_headers=None, raw=False, **operation_config): - """Gets the specified secret value resource. - - Get the information about the specified named secret value resources. - The information does not include the actual value of the secret. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource - value which is typically the version identifier for the value. - :type secret_value_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecretValueResourceDescription or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.SecretValueResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SecretValueResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'} - - async def delete( - self, secret_resource_name, secret_value_resource_name, *, custom_headers=None, raw=False, **operation_config): - """Deletes the specified value of the named secret resource. - - Deletes the secret value resource identified by the name. The name of - the resource is typically the version associated with that value. - Deletion will fail if the specified value is in use. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource - value which is typically the version identifier for the value. - :type secret_value_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'} - - async def list( - self, secret_resource_name, *, custom_headers=None, raw=False, **operation_config): - """List names of all values of the specified secret resource. - - Gets information about all secret value resources of the specified - secret resource. The information includes the names of the secret value - resources, but not the actual values. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedSecretValueResourceDescriptionList or ClientRawResponse - if raw=true - :rtype: - ~azure.servicefabric.models.PagedSecretValueResourceDescriptionList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedSecretValueResourceDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values'} - - async def show( - self, secret_resource_name, secret_value_resource_name, *, custom_headers=None, raw=False, **operation_config): - """Lists the specified value of the secret resource. - - Lists the decrypted value of the specified named value of the secret - resource. This is a privileged operation. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource - value which is typically the version identifier for the value. - :type secret_value_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecretValue or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.SecretValue or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.show.metadata['url'] - path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SecretValue', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - show.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}/list_value'} diff --git a/customSDK/servicefabric/aio/operations_async/_mesh_service_operations_async.py b/customSDK/servicefabric/aio/operations_async/_mesh_service_operations_async.py deleted file mode 100644 index 1684750..0000000 --- a/customSDK/servicefabric/aio/operations_async/_mesh_service_operations_async.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from ... import models - - -class MeshServiceOperations: - """MeshServiceOperations async operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "6.4-preview" - - self.config = config - - async def get( - self, application_resource_name, service_resource_name, *, custom_headers=None, raw=False, **operation_config): - """Gets the Service resource with the given name. - - Gets the information about the Service resource with the given name. - The information include the description and other properties of the - Service. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServiceResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}'} - - async def list( - self, application_resource_name, *, custom_headers=None, raw=False, **operation_config): - """Lists all the service resources. - - Gets the information about all services of an application resource. The - information include the description and other properties of the - Service. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedServiceResourceDescriptionList or ClientRawResponse if - raw=true - :rtype: - ~azure.servicefabric.models.PagedServiceResourceDescriptionList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedServiceResourceDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services'} diff --git a/customSDK/servicefabric/aio/operations_async/_mesh_service_replica_operations_async.py b/customSDK/servicefabric/aio/operations_async/_mesh_service_replica_operations_async.py deleted file mode 100644 index e49bb21..0000000 --- a/customSDK/servicefabric/aio/operations_async/_mesh_service_replica_operations_async.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from ... import models - - -class MeshServiceReplicaOperations: - """MeshServiceReplicaOperations async operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "6.4-preview" - - self.config = config - - async def get( - self, application_resource_name, service_resource_name, replica_name, *, custom_headers=None, raw=False, **operation_config): - """Gets the given replica of the service of an application. - - Gets the information about the service replica with the given name. The - information include the description and other properties of the service - replica. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :param replica_name: Service Fabric replica name. - :type replica_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceReplicaDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceReplicaDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True), - 'replicaName': self._serialize.url("replica_name", replica_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServiceReplicaDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}'} - - async def list( - self, application_resource_name, service_resource_name, *, custom_headers=None, raw=False, **operation_config): - """Lists all the replicas of a service. - - Gets the information about all replicas of a service. The information - include the description and other properties of the service replica. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedServiceReplicaDescriptionList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedServiceReplicaDescriptionList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedServiceReplicaDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas'} diff --git a/customSDK/servicefabric/aio/operations_async/_mesh_volume_operations_async.py b/customSDK/servicefabric/aio/operations_async/_mesh_volume_operations_async.py deleted file mode 100644 index f55a35a..0000000 --- a/customSDK/servicefabric/aio/operations_async/_mesh_volume_operations_async.py +++ /dev/null @@ -1,273 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from ... import models - - -class MeshVolumeOperations: - """MeshVolumeOperations async operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "6.4-preview" - - self.config = config - - async def create_or_update( - self, volume_resource_name, volume_resource_description, *, custom_headers=None, raw=False, **operation_config): - """Creates or updates a Volume resource. - - Creates a Volume resource with the specified name, description and - properties. If Volume resource with the same name exists, then it is - updated with the specified description and properties. - - :param volume_resource_name: The identity of the volume. - :type volume_resource_name: str - :param volume_resource_description: Description for creating a Volume - resource. - :type volume_resource_description: - ~azure.servicefabric.models.VolumeResourceDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VolumeResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.VolumeResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(volume_resource_description, 'VolumeResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VolumeResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('VolumeResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'} - - async def get( - self, volume_resource_name, *, custom_headers=None, raw=False, **operation_config): - """Gets the Volume resource with the given name. - - Gets the information about the Volume resource with the given name. The - information include the description and other properties of the Volume. - - :param volume_resource_name: The identity of the volume. - :type volume_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VolumeResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.VolumeResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VolumeResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'} - - async def delete( - self, volume_resource_name, *, custom_headers=None, raw=False, **operation_config): - """Deletes the Volume resource. - - Deletes the Volume resource identified by the name. - - :param volume_resource_name: The identity of the volume. - :type volume_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'} - - async def list( - self, *, custom_headers=None, raw=False, **operation_config): - """Lists all the volume resources. - - Gets the information about all volume resources in a given resource - group. The information include the description and other properties of - the Volume. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedVolumeResourceDescriptionList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedVolumeResourceDescriptionList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedVolumeResourceDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/Resources/Volumes'} diff --git a/customSDK/servicefabric/aio/operations_async/_service_fabric_client_ap_is_operations_async.py b/customSDK/servicefabric/aio/operations_async/_service_fabric_client_ap_is_operations_async.py deleted file mode 100644 index b39ac04..0000000 --- a/customSDK/servicefabric/aio/operations_async/_service_fabric_client_ap_is_operations_async.py +++ /dev/null @@ -1,17585 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from ... import models -import uuid - - -class ServiceFabricClientAPIsOperationsMixin: - - async def get_cluster_manifest( - self, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Get the Service Fabric cluster manifest. - - Get the Service Fabric cluster manifest. The cluster manifest contains - properties of the cluster that include different node types on the - cluster, - security configurations, fault, and upgrade domain topologies, etc. - These properties are specified as part of the ClusterConfig.JSON file - while deploying a stand-alone cluster. However, most of the information - in the cluster manifest - is generated internally by service fabric during cluster deployment in - other deployment scenarios (e.g. when using Azure portal). - The contents of the cluster manifest are for informational purposes - only and users are not expected to take a dependency on the format of - the file contents or its interpretation. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterManifest or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterManifest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_cluster_manifest.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ClusterManifest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_manifest.metadata = {'url': '/$/GetClusterManifest'} - - async def get_cluster_health( - self, nodes_health_state_filter=0, applications_health_state_filter=0, events_health_state_filter=0, exclude_health_statistics=False, include_system_application_health_statistics=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric cluster. - - Use EventsHealthStateFilter to filter the collection of health events - reported on the cluster based on the health state. - Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter - to filter the collection of nodes and applications returned based on - their aggregated health state. - - :param nodes_health_state_filter: Allows filtering of the node health - state objects returned in the result of cluster health query - based on their health state. The possible values for this parameter - include integer value of one of the - following health states. Only nodes that match the filter are - returned. All nodes are used to evaluate the aggregated health state. - If not specified, all entries are returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of nodes - with HealthState value of OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type nodes_health_state_filter: int - :param applications_health_state_filter: Allows filtering of the - application health state objects returned in the result of cluster - health - query based on their health state. - The possible values for this parameter include integer value obtained - from members or bitwise operations - on members of HealthStateFilter enumeration. Only applications that - match the filter are returned. - All applications are used to evaluate the aggregated health state. If - not specified, all entries are returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of - applications with HealthState value of OK (2) and Warning (4) are - returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type applications_health_state_filter: int - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param include_system_application_health_statistics: Indicates whether - the health statistics should include the fabric:/System application - health statistics. False by default. - If IncludeSystemApplicationHealthStatistics is set to true, the health - statistics include the entities that belong to the fabric:/System - application. - Otherwise, the query result includes health statistics only for user - applications. - The health statistics must be included in the query result for this - parameter to be applied. - :type include_system_application_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_cluster_health.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if nodes_health_state_filter is not None: - query_parameters['NodesHealthStateFilter'] = self._serialize.query("nodes_health_state_filter", nodes_health_state_filter, 'int') - if applications_health_state_filter is not None: - query_parameters['ApplicationsHealthStateFilter'] = self._serialize.query("applications_health_state_filter", applications_health_state_filter, 'int') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if include_system_application_health_statistics is not None: - query_parameters['IncludeSystemApplicationHealthStatistics'] = self._serialize.query("include_system_application_health_statistics", include_system_application_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ClusterHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_health.metadata = {'url': '/$/GetClusterHealth'} - - async def get_cluster_health_using_policy( - self, nodes_health_state_filter=0, applications_health_state_filter=0, events_health_state_filter=0, exclude_health_statistics=False, include_system_application_health_statistics=False, timeout=60, application_health_policy_map=None, cluster_health_policy=None, *, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric cluster using the specified policy. - - Use EventsHealthStateFilter to filter the collection of health events - reported on the cluster based on the health state. - Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter - to filter the collection of nodes and applications returned based on - their aggregated health state. - Use ClusterHealthPolicies to override the health policies used to - evaluate the health. - - :param nodes_health_state_filter: Allows filtering of the node health - state objects returned in the result of cluster health query - based on their health state. The possible values for this parameter - include integer value of one of the - following health states. Only nodes that match the filter are - returned. All nodes are used to evaluate the aggregated health state. - If not specified, all entries are returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of nodes - with HealthState value of OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type nodes_health_state_filter: int - :param applications_health_state_filter: Allows filtering of the - application health state objects returned in the result of cluster - health - query based on their health state. - The possible values for this parameter include integer value obtained - from members or bitwise operations - on members of HealthStateFilter enumeration. Only applications that - match the filter are returned. - All applications are used to evaluate the aggregated health state. If - not specified, all entries are returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of - applications with HealthState value of OK (2) and Warning (4) are - returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type applications_health_state_filter: int - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param include_system_application_health_statistics: Indicates whether - the health statistics should include the fabric:/System application - health statistics. False by default. - If IncludeSystemApplicationHealthStatistics is set to true, the health - statistics include the entities that belong to the fabric:/System - application. - Otherwise, the query result includes health statistics only for user - applications. - The health statistics must be included in the query result for this - parameter to be applied. - :type include_system_application_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param application_health_policy_map: Defines a map that contains - specific application health policies for different applications. - Each entry specifies as key the application name and as value an - ApplicationHealthPolicy used to evaluate the application health. - If an application is not specified in the map, the application health - evaluation uses the ApplicationHealthPolicy found in its application - manifest or the default application health policy (if no health policy - is defined in the manifest). - The map is empty by default. - :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - :param cluster_health_policy: Defines a health policy used to evaluate - the health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - cluster_health_policies = None - if application_health_policy_map is not None or cluster_health_policy is not None: - cluster_health_policies = models.ClusterHealthPolicies(application_health_policy_map=application_health_policy_map, cluster_health_policy=cluster_health_policy) - - api_version = "6.0" - - # Construct URL - url = self.get_cluster_health_using_policy.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if nodes_health_state_filter is not None: - query_parameters['NodesHealthStateFilter'] = self._serialize.query("nodes_health_state_filter", nodes_health_state_filter, 'int') - if applications_health_state_filter is not None: - query_parameters['ApplicationsHealthStateFilter'] = self._serialize.query("applications_health_state_filter", applications_health_state_filter, 'int') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if include_system_application_health_statistics is not None: - query_parameters['IncludeSystemApplicationHealthStatistics'] = self._serialize.query("include_system_application_health_statistics", include_system_application_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if cluster_health_policies is not None: - body_content = self._serialize.body(cluster_health_policies, 'ClusterHealthPolicies') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ClusterHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_health_using_policy.metadata = {'url': '/$/GetClusterHealth'} - - async def get_cluster_health_chunk( - self, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric cluster using health chunks. - - Gets the health of a Service Fabric cluster using health chunks. - Includes the aggregated health state of the cluster, but none of the - cluster entities. - To expand the cluster health and get the health state of all or some of - the entities, use the POST URI and specify the cluster health chunk - query description. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterHealthChunk or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterHealthChunk or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_cluster_health_chunk.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ClusterHealthChunk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_health_chunk.metadata = {'url': '/$/GetClusterHealthChunk'} - - async def get_cluster_health_chunk_using_policy_and_advanced_filters( - self, cluster_health_chunk_query_description=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric cluster using health chunks. - - Gets the health of a Service Fabric cluster using health chunks. The - health evaluation is done based on the input cluster health chunk query - description. - The query description allows users to specify health policies for - evaluating the cluster and its children. - Users can specify very flexible filters to select which cluster - entities to return. The selection can be done based on the entities - health state and based on the hierarchy. - The query can return multi-level children of the entities based on the - specified filters. For example, it can return one application with a - specified name, and for this application, return - only services that are in Error or Warning, and all partitions and - replicas for one of these services. - - :param cluster_health_chunk_query_description: Describes the cluster - and application health policies used to evaluate the cluster health - and the filters to select which cluster entities to be returned. - If the cluster health policy is present, it is used to evaluate the - cluster events and the cluster nodes. If not present, the health - evaluation uses the cluster health policy defined in the cluster - manifest or the default cluster health policy. - By default, each application is evaluated using its specific - application health policy, defined in the application manifest, or the - default health policy, if no policy is defined in manifest. - If the application health policy map is specified, and it has an entry - for an application, the specified application health policy - is used to evaluate the application health. - Users can specify very flexible filters to select which cluster - entities to include in response. The selection can be done based on - the entities health state and based on the hierarchy. - The query can return multi-level children of the entities based on the - specified filters. For example, it can return one application with a - specified name, and for this application, return - only services that are in Error or Warning, and all partitions and - replicas for one of these services. - :type cluster_health_chunk_query_description: - ~azure.servicefabric.models.ClusterHealthChunkQueryDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterHealthChunk or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterHealthChunk or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_cluster_health_chunk_using_policy_and_advanced_filters.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if cluster_health_chunk_query_description is not None: - body_content = self._serialize.body(cluster_health_chunk_query_description, 'ClusterHealthChunkQueryDescription') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ClusterHealthChunk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_health_chunk_using_policy_and_advanced_filters.metadata = {'url': '/$/GetClusterHealthChunk'} - - async def report_cluster_health( - self, health_information, immediate=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Sends a health report on the Service Fabric cluster. - - Sends a health report on a Service Fabric cluster. The report must - contain the information about the source of the health report and - property on which it is reported. - The report is sent to a Service Fabric gateway node, which forwards to - the health store. - The report may be accepted by the gateway, but rejected by the health - store after extra validation. - For example, the health store may reject the report because of an - invalid parameter, like a stale sequence number. - To see whether the report was applied in the health store, run - GetClusterHealth and check that the report appears in the HealthEvents - section. - - :param health_information: Describes the health information for the - health report. This information needs to be present in all of the - health reports sent to the health manager. - :type health_information: - ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be - sent immediately. - A health report is sent to a Service Fabric gateway Application, which - forwards to the health store. - If Immediate is set to true, the report is sent immediately from HTTP - Gateway to the health store, regardless of the fabric client settings - that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as - possible. - Depending on timing and other conditions, sending the report may still - fail, for example if the HTTP Gateway is closed or the message doesn't - reach the Gateway. - If Immediate is set to false, the report is sent based on the health - client settings from the HTTP Gateway. Therefore, it will be batched - according to the HealthReportSendInterval configuration. - This is the recommended setting because it allows the health client to - optimize health reporting messages to health store as well as health - report processing. - By default, reports are not sent immediately. - :type immediate: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.report_cluster_health.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - report_cluster_health.metadata = {'url': '/$/ReportClusterHealth'} - - async def get_provisioned_fabric_code_version_info_list( - self, code_version=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets a list of fabric code versions that are provisioned in a Service - Fabric cluster. - - Gets a list of information about fabric code versions that are - provisioned in the cluster. The parameter CodeVersion can be used to - optionally filter the output to only that particular version. - - :param code_version: The product version of Service Fabric. - :type code_version: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.FabricCodeVersionInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_provisioned_fabric_code_version_info_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if code_version is not None: - query_parameters['CodeVersion'] = self._serialize.query("code_version", code_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[FabricCodeVersionInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_provisioned_fabric_code_version_info_list.metadata = {'url': '/$/GetProvisionedCodeVersions'} - - async def get_provisioned_fabric_config_version_info_list( - self, config_version=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets a list of fabric config versions that are provisioned in a Service - Fabric cluster. - - Gets a list of information about fabric config versions that are - provisioned in the cluster. The parameter ConfigVersion can be used to - optionally filter the output to only that particular version. - - :param config_version: The config version of Service Fabric. - :type config_version: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.FabricConfigVersionInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_provisioned_fabric_config_version_info_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if config_version is not None: - query_parameters['ConfigVersion'] = self._serialize.query("config_version", config_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[FabricConfigVersionInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_provisioned_fabric_config_version_info_list.metadata = {'url': '/$/GetProvisionedConfigVersions'} - - async def get_cluster_upgrade_progress( - self, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the progress of the current cluster upgrade. - - Gets the current progress of the ongoing cluster upgrade. If no upgrade - is currently in progress, get the last state of the previous cluster - upgrade. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterUpgradeProgressObject or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterUpgradeProgressObject or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_cluster_upgrade_progress.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ClusterUpgradeProgressObject', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_upgrade_progress.metadata = {'url': '/$/GetUpgradeProgress'} - - async def get_cluster_configuration( - self, configuration_api_version, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Get the Service Fabric standalone cluster configuration. - - The cluster configuration contains properties of the cluster that - include different node types on the cluster, - security configurations, fault, and upgrade domain topologies, etc. - - :param configuration_api_version: The API version of the Standalone - cluster json configuration. - :type configuration_api_version: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterConfiguration or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterConfiguration or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_cluster_configuration.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ConfigurationApiVersion'] = self._serialize.query("configuration_api_version", configuration_api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ClusterConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_configuration.metadata = {'url': '/$/GetClusterConfiguration'} - - async def get_cluster_configuration_upgrade_status( - self, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Get the cluster configuration upgrade status of a Service Fabric - standalone cluster. - - Get the cluster configuration upgrade status details of a Service - Fabric standalone cluster. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterConfigurationUpgradeStatusInfo or ClientRawResponse if - raw=true - :rtype: - ~azure.servicefabric.models.ClusterConfigurationUpgradeStatusInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_cluster_configuration_upgrade_status.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ClusterConfigurationUpgradeStatusInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_configuration_upgrade_status.metadata = {'url': '/$/GetClusterConfigurationUpgradeStatus'} - - async def get_upgrade_orchestration_service_state( - self, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Get the service state of Service Fabric Upgrade Orchestration Service. - - Get the service state of Service Fabric Upgrade Orchestration Service. - This API is internally used for support purposes. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: UpgradeOrchestrationServiceState or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.UpgradeOrchestrationServiceState - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_upgrade_orchestration_service_state.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('UpgradeOrchestrationServiceState', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_orchestration_service_state.metadata = {'url': '/$/GetUpgradeOrchestrationServiceState'} - - async def set_upgrade_orchestration_service_state( - self, timeout=60, service_state=None, *, custom_headers=None, raw=False, **operation_config): - """Update the service state of Service Fabric Upgrade Orchestration - Service. - - Update the service state of Service Fabric Upgrade Orchestration - Service. This API is internally used for support purposes. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param service_state: The state of Service Fabric Upgrade - Orchestration Service. - :type service_state: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: UpgradeOrchestrationServiceStateSummary or ClientRawResponse - if raw=true - :rtype: - ~azure.servicefabric.models.UpgradeOrchestrationServiceStateSummary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - upgrade_orchestration_service_state = models.UpgradeOrchestrationServiceState(service_state=service_state) - - api_version = "6.0" - - # Construct URL - url = self.set_upgrade_orchestration_service_state.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(upgrade_orchestration_service_state, 'UpgradeOrchestrationServiceState') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('UpgradeOrchestrationServiceStateSummary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - set_upgrade_orchestration_service_state.metadata = {'url': '/$/SetUpgradeOrchestrationServiceState'} - - async def provision_cluster( - self, timeout=60, code_file_path=None, cluster_manifest_file_path=None, *, custom_headers=None, raw=False, **operation_config): - """Provision the code or configuration packages of a Service Fabric - cluster. - - Validate and provision the code or configuration packages of a Service - Fabric cluster. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param code_file_path: The cluster code package file path. - :type code_file_path: str - :param cluster_manifest_file_path: The cluster manifest file path. - :type cluster_manifest_file_path: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - provision_fabric_description = models.ProvisionFabricDescription(code_file_path=code_file_path, cluster_manifest_file_path=cluster_manifest_file_path) - - api_version = "6.0" - - # Construct URL - url = self.provision_cluster.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(provision_fabric_description, 'ProvisionFabricDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - provision_cluster.metadata = {'url': '/$/Provision'} - - async def unprovision_cluster( - self, timeout=60, code_version=None, config_version=None, *, custom_headers=None, raw=False, **operation_config): - """Unprovision the code or configuration packages of a Service Fabric - cluster. - - It is supported to unprovision code and configuration separately. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param code_version: The cluster code package version. - :type code_version: str - :param config_version: The cluster manifest version. - :type config_version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - unprovision_fabric_description = models.UnprovisionFabricDescription(code_version=code_version, config_version=config_version) - - api_version = "6.0" - - # Construct URL - url = self.unprovision_cluster.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(unprovision_fabric_description, 'UnprovisionFabricDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - unprovision_cluster.metadata = {'url': '/$/Unprovision'} - - async def rollback_cluster_upgrade( - self, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Roll back the upgrade of a Service Fabric cluster. - - Roll back the code or configuration upgrade of a Service Fabric - cluster. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.rollback_cluster_upgrade.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - rollback_cluster_upgrade.metadata = {'url': '/$/RollbackUpgrade'} - - async def resume_cluster_upgrade( - self, upgrade_domain, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Make the cluster upgrade move on to the next upgrade domain. - - Make the cluster code or configuration upgrade move on to the next - upgrade domain if appropriate. - - :param upgrade_domain: The next upgrade domain for this cluster - upgrade. - :type upgrade_domain: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - resume_cluster_upgrade_description = models.ResumeClusterUpgradeDescription(upgrade_domain=upgrade_domain) - - api_version = "6.0" - - # Construct URL - url = self.resume_cluster_upgrade.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(resume_cluster_upgrade_description, 'ResumeClusterUpgradeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resume_cluster_upgrade.metadata = {'url': '/$/MoveToNextUpgradeDomain'} - - async def start_cluster_upgrade( - self, start_cluster_upgrade_description, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Start upgrading the code or configuration version of a Service Fabric - cluster. - - Validate the supplied upgrade parameters and start upgrading the code - or configuration version of a Service Fabric cluster if the parameters - are valid. - - :param start_cluster_upgrade_description: Describes the parameters for - starting a cluster upgrade. - :type start_cluster_upgrade_description: - ~azure.servicefabric.models.StartClusterUpgradeDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.start_cluster_upgrade.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_cluster_upgrade.metadata = {'url': '/$/Upgrade'} - - async def start_cluster_configuration_upgrade( - self, cluster_configuration_upgrade_description, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Start upgrading the configuration of a Service Fabric standalone - cluster. - - Validate the supplied configuration upgrade parameters and start - upgrading the cluster configuration if the parameters are valid. - - :param cluster_configuration_upgrade_description: Parameters for a - standalone cluster configuration upgrade. - :type cluster_configuration_upgrade_description: - ~azure.servicefabric.models.ClusterConfigurationUpgradeDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.start_cluster_configuration_upgrade.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(cluster_configuration_upgrade_description, 'ClusterConfigurationUpgradeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_cluster_configuration_upgrade.metadata = {'url': '/$/StartClusterConfigurationUpgrade'} - - async def update_cluster_upgrade( - self, update_cluster_upgrade_description, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Update the upgrade parameters of a Service Fabric cluster upgrade. - - Update the upgrade parameters used during a Service Fabric cluster - upgrade. - - :param update_cluster_upgrade_description: Parameters for updating a - cluster upgrade. - :type update_cluster_upgrade_description: - ~azure.servicefabric.models.UpdateClusterUpgradeDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.update_cluster_upgrade.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(update_cluster_upgrade_description, 'UpdateClusterUpgradeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update_cluster_upgrade.metadata = {'url': '/$/UpdateUpgrade'} - - async def get_aad_metadata( - self, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the Azure Active Directory metadata used for secured connection to - cluster. - - Gets the Azure Active Directory metadata used for secured connection to - cluster. - This API is not supposed to be called separately. It provides - information needed to set up an Azure Active Directory secured - connection with a Service Fabric cluster. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AadMetadataObject or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.AadMetadataObject or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_aad_metadata.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AadMetadataObject', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_aad_metadata.metadata = {'url': '/$/GetAadMetadata'} - - async def get_cluster_version( - self, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Get the current Service Fabric cluster version. - - If a cluster upgrade is happening, then this API will return the lowest - (older) version of the current and target cluster runtime versions. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterVersion or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterVersion or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_cluster_version.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ClusterVersion', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_version.metadata = {'url': '/$/GetClusterVersion'} - - async def get_cluster_load( - self, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the load of a Service Fabric cluster. - - Retrieves the load information of a Service Fabric cluster for all the - metrics that have load or capacity defined. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterLoadInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterLoadInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_cluster_load.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ClusterLoadInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_load.metadata = {'url': '/$/GetLoadInformation'} - - async def toggle_verbose_service_placement_health_reporting( - self, enabled, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Changes the verbosity of service placement health reporting. - - If verbosity is set to true, then detailed health reports will be - generated when replicas cannot be placed or dropped. - If verbosity is set to false, then no health reports will be generated - when replicas cannot be placed or dropped. - - :param enabled: The verbosity of service placement health reporting. - :type enabled: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.toggle_verbose_service_placement_health_reporting.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['Enabled'] = self._serialize.query("enabled", enabled, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - toggle_verbose_service_placement_health_reporting.metadata = {'url': '/$/ToggleVerboseServicePlacementHealthReporting'} - - async def get_node_info_list( - self, continuation_token=None, node_status_filter="default", max_results=0, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the list of nodes in the Service Fabric cluster. - - The response includes the name, status, ID, health, uptime, and other - details about the nodes. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param node_status_filter: Allows filtering the nodes based on the - NodeStatus. Only the nodes that are matching the specified filter - value will be returned. The filter value can be one of the following. - Possible values include: 'default', 'all', 'up', 'down', 'enabling', - 'disabling', 'disabled', 'unknown', 'removed' - :type node_status_filter: str or - ~azure.servicefabric.models.NodeStatusFilter - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedNodeInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedNodeInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.3" - - # Construct URL - url = self.get_node_info_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if node_status_filter is not None: - query_parameters['NodeStatusFilter'] = self._serialize.query("node_status_filter", node_status_filter, 'str') - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedNodeInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_node_info_list.metadata = {'url': '/Nodes'} - - async def get_node_info( - self, node_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the information about a specific node in the Service Fabric - cluster. - - The response includes the name, status, ID, health, uptime, and other - details about the node. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NodeInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.NodeInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_node_info.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NodeInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_node_info.metadata = {'url': '/Nodes/{nodeName}'} - - async def get_node_health( - self, node_name, events_health_state_filter=0, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric node. - - Gets the health of a Service Fabric node. Use EventsHealthStateFilter - to filter the collection of health events reported on the node based on - the health state. If the node that you specify by name does not exist - in the health store, this returns an error. - - :param node_name: The name of the node. - :type node_name: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NodeHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.NodeHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_node_health.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NodeHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_node_health.metadata = {'url': '/Nodes/{nodeName}/$/GetHealth'} - - async def get_node_health_using_policy( - self, node_name, events_health_state_filter=0, cluster_health_policy=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric node, by using the specified health - policy. - - Gets the health of a Service Fabric node. Use EventsHealthStateFilter - to filter the collection of health events reported on the node based on - the health state. Use ClusterHealthPolicy in the POST body to override - the health policies used to evaluate the health. If the node that you - specify by name does not exist in the health store, this returns an - error. - - :param node_name: The name of the node. - :type node_name: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param cluster_health_policy: Describes the health policies used to - evaluate the health of a cluster or node. If not present, the health - evaluation uses the health policy from cluster manifest or the default - health policy. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NodeHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.NodeHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_node_health_using_policy.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if cluster_health_policy is not None: - body_content = self._serialize.body(cluster_health_policy, 'ClusterHealthPolicy') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NodeHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_node_health_using_policy.metadata = {'url': '/Nodes/{nodeName}/$/GetHealth'} - - async def report_node_health( - self, node_name, health_information, immediate=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Sends a health report on the Service Fabric node. - - Reports health state of the specified Service Fabric node. The report - must contain the information about the source of the health report and - property on which it is reported. - The report is sent to a Service Fabric gateway node, which forwards to - the health store. - The report may be accepted by the gateway, but rejected by the health - store after extra validation. - For example, the health store may reject the report because of an - invalid parameter, like a stale sequence number. - To see whether the report was applied in the health store, run - GetNodeHealth and check that the report appears in the HealthEvents - section. - - :param node_name: The name of the node. - :type node_name: str - :param health_information: Describes the health information for the - health report. This information needs to be present in all of the - health reports sent to the health manager. - :type health_information: - ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be - sent immediately. - A health report is sent to a Service Fabric gateway Application, which - forwards to the health store. - If Immediate is set to true, the report is sent immediately from HTTP - Gateway to the health store, regardless of the fabric client settings - that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as - possible. - Depending on timing and other conditions, sending the report may still - fail, for example if the HTTP Gateway is closed or the message doesn't - reach the Gateway. - If Immediate is set to false, the report is sent based on the health - client settings from the HTTP Gateway. Therefore, it will be batched - according to the HealthReportSendInterval configuration. - This is the recommended setting because it allows the health client to - optimize health reporting messages to health store as well as health - report processing. - By default, reports are not sent immediately. - :type immediate: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.report_node_health.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - report_node_health.metadata = {'url': '/Nodes/{nodeName}/$/ReportHealth'} - - async def get_node_load_info( - self, node_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the load information of a Service Fabric node. - - Retrieves the load information of a Service Fabric node for all the - metrics that have load or capacity defined. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NodeLoadInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.NodeLoadInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_node_load_info.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NodeLoadInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_node_load_info.metadata = {'url': '/Nodes/{nodeName}/$/GetLoadInformation'} - - async def disable_node( - self, node_name, timeout=60, deactivation_intent=None, *, custom_headers=None, raw=False, **operation_config): - """Deactivate a Service Fabric cluster node with the specified - deactivation intent. - - Deactivate a Service Fabric cluster node with the specified - deactivation intent. Once the deactivation is in progress, the - deactivation intent can be increased, but not decreased (for example, a - node that is deactivated with the Pause intent can be deactivated - further with Restart, but not the other way around. Nodes may be - reactivated using the Activate a node operation any time after they are - deactivated. If the deactivation is not complete, this will cancel the - deactivation. A node that goes down and comes back up while deactivated - will still need to be reactivated before services will be placed on - that node. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param deactivation_intent: Describes the intent or reason for - deactivating the node. The possible values are following. Possible - values include: 'Pause', 'Restart', 'RemoveData' - :type deactivation_intent: str or - ~azure.servicefabric.models.DeactivationIntent - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - deactivation_intent_description = models.DeactivationIntentDescription(deactivation_intent=deactivation_intent) - - api_version = "6.0" - - # Construct URL - url = self.disable_node.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(deactivation_intent_description, 'DeactivationIntentDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_node.metadata = {'url': '/Nodes/{nodeName}/$/Deactivate'} - - async def enable_node( - self, node_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Activate a Service Fabric cluster node that is currently deactivated. - - Activates a Service Fabric cluster node that is currently deactivated. - Once activated, the node will again become a viable target for placing - new replicas, and any deactivated replicas remaining on the node will - be reactivated. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.enable_node.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - enable_node.metadata = {'url': '/Nodes/{nodeName}/$/Activate'} - - async def remove_node_state( - self, node_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Notifies Service Fabric that the persisted state on a node has been - permanently removed or lost. - - This implies that it is not possible to recover the persisted state of - that node. This generally happens if a hard disk has been wiped clean, - or if a hard disk crashes. The node has to be down for this operation - to be successful. This operation lets Service Fabric know that the - replicas on that node no longer exist, and that Service Fabric should - stop waiting for those replicas to come back up. Do not run this cmdlet - if the state on the node has not been removed and the node can come - back up with its state intact. Starting from Service Fabric 6.5, in - order to use this API for seed nodes, please change the seed nodes to - regular (non-seed) nodes and then invoke this API to remove the node - state. If the cluster is running on Azure, after the seed node goes - down, Service Fabric will try to change it to a non-seed node - automatically. To make this happen, make sure the number of non-seed - nodes in the primary node type is no less than the number of Down seed - nodes. If necessary, add more nodes to the primary node type to achieve - this. For standalone cluster, if the Down seed node is not expected to - come back up with its state intact, please remove the node from the - cluster, see - https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-windows-server-add-remove-nodes. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.remove_node_state.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - remove_node_state.metadata = {'url': '/Nodes/{nodeName}/$/RemoveNodeState'} - - async def restart_node( - self, node_name, node_instance_id="0", timeout=60, create_fabric_dump="False", *, custom_headers=None, raw=False, **operation_config): - """Restarts a Service Fabric cluster node. - - Restarts a Service Fabric cluster node that is already started. - - :param node_name: The name of the node. - :type node_name: str - :param node_instance_id: The instance ID of the target node. If - instance ID is specified the node is restarted only if it matches with - the current instance of the node. A default value of "0" would match - any instance ID. The instance ID can be obtained using get node query. - :type node_instance_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param create_fabric_dump: Specify True to create a dump of the fabric - node process. This is case-sensitive. Possible values include: - 'False', 'True' - :type create_fabric_dump: str or - ~azure.servicefabric.models.CreateFabricDump - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - restart_node_description = models.RestartNodeDescription(node_instance_id=node_instance_id, create_fabric_dump=create_fabric_dump) - - api_version = "6.0" - - # Construct URL - url = self.restart_node.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restart_node_description, 'RestartNodeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_node.metadata = {'url': '/Nodes/{nodeName}/$/Restart'} - - async def remove_configuration_overrides( - self, node_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Removes configuration overrides on the specified node. - - This api allows removing all existing configuration overrides on - specified node. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "7.0" - - # Construct URL - url = self.remove_configuration_overrides.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - remove_configuration_overrides.metadata = {'url': '/Nodes/{nodeName}/$/RemoveConfigurationOverrides'} - - async def get_configuration_overrides( - self, node_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the list of configuration overrides on the specified node. - - This api allows getting all existing configuration overrides on the - specified node. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ConfigParameterOverride] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "7.0" - - # Construct URL - url = self.get_configuration_overrides.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[ConfigParameterOverride]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_overrides.metadata = {'url': '/Nodes/{nodeName}/$/GetConfigurationOverrides'} - - async def add_configuration_parameter_overrides( - self, node_name, config_parameter_override_list, force=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Adds the list of configuration overrides on the specified node. - - This api allows adding all existing configuration overrides on the - specified node. - - :param node_name: The name of the node. - :type node_name: str - :param config_parameter_override_list: Description for adding list of - configuration overrides. - :type config_parameter_override_list: - list[~azure.servicefabric.models.ConfigParameterOverride] - :param force: Force adding configuration overrides on specified nodes. - :type force: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "7.0" - - # Construct URL - url = self.add_configuration_parameter_overrides.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if force is not None: - query_parameters['Force'] = self._serialize.query("force", force, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(config_parameter_override_list, '[ConfigParameterOverride]') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - add_configuration_parameter_overrides.metadata = {'url': '/Nodes/{nodeName}/$/AddConfigurationParameterOverrides'} - - async def remove_node_tags( - self, node_name, node_tags, *, custom_headers=None, raw=False, **operation_config): - """Removes the list of tags from the specified node. - - This api allows removing set of tags from the specified node. - - :param node_name: The name of the node. - :type node_name: str - :param node_tags: Description for adding list of node tags. - :type node_tags: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "7.0" - - # Construct URL - url = self.remove_node_tags.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(node_tags, '[str]') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - remove_node_tags.metadata = {'url': '/Nodes/{nodeName}/$/RemoveNodeTags'} - - async def add_node_tags( - self, node_name, node_tags, *, custom_headers=None, raw=False, **operation_config): - """Adds the list of tags on the specified node. - - This api allows adding tags to the specified node. - - :param node_name: The name of the node. - :type node_name: str - :param node_tags: Description for adding list of node tags. - :type node_tags: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "7.2" - - # Construct URL - url = self.add_node_tags.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(node_tags, '[str]') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - add_node_tags.metadata = {'url': '/Nodes/{nodeName}/$/AddNodeTags'} - - async def get_application_type_info_list( - self, application_type_definition_kind_filter=0, exclude_application_parameters=False, continuation_token=None, max_results=0, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the list of application types in the Service Fabric cluster. - - Returns the information about the application types that are - provisioned or in the process of being provisioned in the Service - Fabric cluster. Each version of an application type is returned as one - application type. The response includes the name, version, status, and - other details about the application type. This is a paged query, - meaning that if not all of the application types fit in a page, one - page of results is returned as well as a continuation token, which can - be used to get the next page. For example, if there are 10 application - types but a page only fits the first three application types, or if max - results is set to 3, then three is returned. To access the rest of the - results, retrieve subsequent pages by using the returned continuation - token in the next query. An empty continuation token is returned if - there are no subsequent pages. - - :param application_type_definition_kind_filter: Used to filter on - ApplicationTypeDefinitionKind which is the mechanism used to define a - Service Fabric application type. - - Default - Default value, which performs the same function as - selecting "All". The value is 0. - - All - Filter that matches input with any - ApplicationTypeDefinitionKind value. The value is 65535. - - ServiceFabricApplicationPackage - Filter that matches input with - ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. - The value is 1. - - Compose - Filter that matches input with - ApplicationTypeDefinitionKind value Compose. The value is 2. - :type application_type_definition_kind_filter: int - :param exclude_application_parameters: The flag that specifies whether - application parameters will be excluded from the result. - :type exclude_application_parameters: bool - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedApplicationTypeInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedApplicationTypeInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_type_info_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if application_type_definition_kind_filter is not None: - query_parameters['ApplicationTypeDefinitionKindFilter'] = self._serialize.query("application_type_definition_kind_filter", application_type_definition_kind_filter, 'int') - if exclude_application_parameters is not None: - query_parameters['ExcludeApplicationParameters'] = self._serialize.query("exclude_application_parameters", exclude_application_parameters, 'bool') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedApplicationTypeInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_type_info_list.metadata = {'url': '/ApplicationTypes'} - - async def get_application_type_info_list_by_name( - self, application_type_name, application_type_version=None, exclude_application_parameters=False, continuation_token=None, max_results=0, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the list of application types in the Service Fabric cluster - matching exactly the specified name. - - Returns the information about the application types that are - provisioned or in the process of being provisioned in the Service - Fabric cluster. These results are of application types whose name match - exactly the one specified as the parameter, and which comply with the - given query parameters. All versions of the application type matching - the application type name are returned, with each version returned as - one application type. The response includes the name, version, status, - and other details about the application type. This is a paged query, - meaning that if not all of the application types fit in a page, one - page of results is returned as well as a continuation token, which can - be used to get the next page. For example, if there are 10 application - types but a page only fits the first three application types, or if max - results is set to 3, then three is returned. To access the rest of the - results, retrieve subsequent pages by using the returned continuation - token in the next query. An empty continuation token is returned if - there are no subsequent pages. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param exclude_application_parameters: The flag that specifies whether - application parameters will be excluded from the result. - :type exclude_application_parameters: bool - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedApplicationTypeInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedApplicationTypeInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_type_info_list_by_name.metadata['url'] - path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if application_type_version is not None: - query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') - if exclude_application_parameters is not None: - query_parameters['ExcludeApplicationParameters'] = self._serialize.query("exclude_application_parameters", exclude_application_parameters, 'bool') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedApplicationTypeInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_type_info_list_by_name.metadata = {'url': '/ApplicationTypes/{applicationTypeName}'} - - async def provision_application_type( - self, provision_application_type_description_base_required_body_param, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Provisions or registers a Service Fabric application type with the - cluster using the '.sfpkg' package in the external store or using the - application package in the image store. - - Provisions a Service Fabric application type with the cluster. The - provision is required before any new applications can be instantiated. - The provision operation can be performed either on the application - package specified by the relativePathInImageStore, or by using the URI - of the external '.sfpkg'. - - :param - provision_application_type_description_base_required_body_param: The - base type of provision application type description which supports - either image store-based provision or external store-based provision. - :type provision_application_type_description_base_required_body_param: - ~azure.servicefabric.models.ProvisionApplicationTypeDescriptionBase - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.2" - - # Construct URL - url = self.provision_application_type.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(provision_application_type_description_base_required_body_param, 'ProvisionApplicationTypeDescriptionBase') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - provision_application_type.metadata = {'url': '/ApplicationTypes/$/Provision'} - - async def unprovision_application_type( - self, application_type_name, application_type_version, timeout=60, async_parameter=None, *, custom_headers=None, raw=False, **operation_config): - """Removes or unregisters a Service Fabric application type from the - cluster. - - This operation can only be performed if all application instances of - the application type have been deleted. Once the application type is - unregistered, no new application instances can be created for this - particular application type. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type - as defined in the application manifest. - :type application_type_version: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param async_parameter: The flag indicating whether or not unprovision - should occur asynchronously. When set to true, the unprovision - operation returns when the request is accepted by the system, and the - unprovision operation continues without any timeout limit. The default - value is false. However, we recommend setting it to true for large - application packages that were provisioned. - :type async_parameter: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - unprovision_application_type_description_info = models.UnprovisionApplicationTypeDescriptionInfo(application_type_version=application_type_version, async_property=async_parameter) - - api_version = "6.0" - - # Construct URL - url = self.unprovision_application_type.metadata['url'] - path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(unprovision_application_type_description_info, 'UnprovisionApplicationTypeDescriptionInfo') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - unprovision_application_type.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/Unprovision'} - - async def get_service_type_info_list( - self, application_type_name, application_type_version, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the list containing the information about service types that are - supported by a provisioned application type in a Service Fabric - cluster. - - Gets the list containing the information about service types that are - supported by a provisioned application type in a Service Fabric - cluster. The provided application type must exist. Otherwise, a 404 - status is returned. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ServiceTypeInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_type_info_list.metadata['url'] - path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[ServiceTypeInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_type_info_list.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes'} - - async def get_service_type_info_by_name( - self, application_type_name, application_type_version, service_type_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the information about a specific service type that is supported by - a provisioned application type in a Service Fabric cluster. - - Gets the information about a specific service type that is supported by - a provisioned application type in a Service Fabric cluster. The - provided application type must exist. Otherwise, a 404 status is - returned. A 204 response is returned if the specified service type is - not found in the cluster. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param service_type_name: Specifies the name of a Service Fabric - service type. - :type service_type_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceTypeInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceTypeInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_type_info_by_name.metadata['url'] - path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str'), - 'serviceTypeName': self._serialize.url("service_type_name", service_type_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServiceTypeInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_type_info_by_name.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes/{serviceTypeName}'} - - async def get_service_manifest( - self, application_type_name, application_type_version, service_manifest_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the manifest describing a service type. - - Gets the manifest describing a service type. The response contains the - service manifest XML as a string. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param service_manifest_name: The name of a service manifest - registered as part of an application type in a Service Fabric cluster. - :type service_manifest_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceTypeManifest or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceTypeManifest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_manifest.metadata['url'] - path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServiceTypeManifest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_manifest.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/GetServiceManifest'} - - async def get_deployed_service_type_info_list( - self, node_name, application_id, service_manifest_name=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the list containing the information about service types from the - applications deployed on a node in a Service Fabric cluster. - - Gets the list containing the information about service types from the - applications deployed on a node in a Service Fabric cluster. The - response includes the name of the service type, its registration - status, the code package that registered it and activation ID of the - service package. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_manifest_name: The name of the service manifest to - filter the list of deployed service type information. If specified, - the response will only contain the information about service types - that are defined in this service manifest. - :type service_manifest_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.DeployedServiceTypeInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_type_info_list.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if service_manifest_name is not None: - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[DeployedServiceTypeInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_type_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes'} - - async def get_deployed_service_type_info_by_name( - self, node_name, application_id, service_type_name, service_manifest_name=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the information about a specified service type of the application - deployed on a node in a Service Fabric cluster. - - Gets the list containing the information about a specific service type - from the applications deployed on a node in a Service Fabric cluster. - The response includes the name of the service type, its registration - status, the code package that registered it and activation ID of the - service package. Each entry represents one activation of a service - type, differentiated by the activation ID. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_type_name: Specifies the name of a Service Fabric - service type. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest to - filter the list of deployed service type information. If specified, - the response will only contain the information about service types - that are defined in this service manifest. - :type service_manifest_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.DeployedServiceTypeInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_type_info_by_name.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'serviceTypeName': self._serialize.url("service_type_name", service_type_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if service_manifest_name is not None: - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[DeployedServiceTypeInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_type_info_by_name.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes/{serviceTypeName}'} - - async def create_application( - self, application_description, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Creates a Service Fabric application. - - Creates a Service Fabric application using the specified description. - - :param application_description: Description for creating an - application. - :type application_description: - ~azure.servicefabric.models.ApplicationDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.create_application.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(application_description, 'ApplicationDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - create_application.metadata = {'url': '/Applications/$/Create'} - - async def delete_application( - self, application_id, force_remove=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Service Fabric application. - - An application must be created before it can be deleted. Deleting an - application will delete all services that are part of that application. - By default, Service Fabric will try to close service replicas in a - graceful manner and then delete the service. However, if a service is - having issues closing the replica gracefully, the delete operation may - take a long time or get stuck. Use the optional ForceRemove flag to - skip the graceful close sequence and forcefully delete the application - and all of its services. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param force_remove: Remove a Service Fabric application or service - forcefully without going through the graceful shutdown sequence. This - parameter can be used to forcefully delete an application or service - for which delete is timing out due to issues in the service code that - prevents graceful close of replicas. - :type force_remove: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.delete_application.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if force_remove is not None: - query_parameters['ForceRemove'] = self._serialize.query("force_remove", force_remove, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_application.metadata = {'url': '/Applications/{applicationId}/$/Delete'} - - async def get_application_load_info( - self, application_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets load information about a Service Fabric application. - - Returns the load information about the application that was created or - in the process of being created in the Service Fabric cluster and whose - name matches the one specified as the parameter. The response includes - the name, minimum nodes, maximum nodes, the number of nodes the - application is occupying currently, and application load metric - information about the application. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationLoadInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ApplicationLoadInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_load_info.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApplicationLoadInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_load_info.metadata = {'url': '/Applications/{applicationId}/$/GetLoadInformation'} - - async def get_application_info_list( - self, application_definition_kind_filter=0, application_type_name=None, exclude_application_parameters=False, continuation_token=None, max_results=0, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the list of applications created in the Service Fabric cluster - that match the specified filters. - - Gets the information about the applications that were created or in the - process of being created in the Service Fabric cluster and match the - specified filters. The response includes the name, type, status, - parameters, and other details about the application. If the - applications do not fit in a page, one page of results is returned as - well as a continuation token, which can be used to get the next page. - Filters ApplicationTypeName and ApplicationDefinitionKindFilter cannot - be specified at the same time. - - :param application_definition_kind_filter: Used to filter on - ApplicationDefinitionKind, which is the mechanism used to define a - Service Fabric application. - - Default - Default value, which performs the same function as - selecting "All". The value is 0. - - All - Filter that matches input with any ApplicationDefinitionKind - value. The value is 65535. - - ServiceFabricApplicationDescription - Filter that matches input with - ApplicationDefinitionKind value ServiceFabricApplicationDescription. - The value is 1. - - Compose - Filter that matches input with ApplicationDefinitionKind - value Compose. The value is 2. - :type application_definition_kind_filter: int - :param application_type_name: The application type name used to filter - the applications to query for. This value should not contain the - application type version. - :type application_type_name: str - :param exclude_application_parameters: The flag that specifies whether - application parameters will be excluded from the result. - :type exclude_application_parameters: bool - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedApplicationInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedApplicationInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.1" - - # Construct URL - url = self.get_application_info_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if application_definition_kind_filter is not None: - query_parameters['ApplicationDefinitionKindFilter'] = self._serialize.query("application_definition_kind_filter", application_definition_kind_filter, 'int') - if application_type_name is not None: - query_parameters['ApplicationTypeName'] = self._serialize.query("application_type_name", application_type_name, 'str') - if exclude_application_parameters is not None: - query_parameters['ExcludeApplicationParameters'] = self._serialize.query("exclude_application_parameters", exclude_application_parameters, 'bool') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedApplicationInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_info_list.metadata = {'url': '/Applications'} - - async def get_application_info( - self, application_id, exclude_application_parameters=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets information about a Service Fabric application. - - Returns the information about the application that was created or in - the process of being created in the Service Fabric cluster and whose - name matches the one specified as the parameter. The response includes - the name, type, status, parameters, and other details about the - application. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param exclude_application_parameters: The flag that specifies whether - application parameters will be excluded from the result. - :type exclude_application_parameters: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ApplicationInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_info.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if exclude_application_parameters is not None: - query_parameters['ExcludeApplicationParameters'] = self._serialize.query("exclude_application_parameters", exclude_application_parameters, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_info.metadata = {'url': '/Applications/{applicationId}'} - - async def get_application_health( - self, application_id, events_health_state_filter=0, deployed_applications_health_state_filter=0, services_health_state_filter=0, exclude_health_statistics=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the health of the service fabric application. - - Returns the heath state of the service fabric application. The response - reports either Ok, Error or Warning health state. If the entity is not - found in the health store, it will return Error. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param deployed_applications_health_state_filter: Allows filtering of - the deployed applications health state objects returned in the result - of application health query based on their health state. - The possible values for this parameter include integer value of one of - the following health states. Only deployed applications that match the - filter will be returned. - All deployed applications are used to evaluate the aggregated health - state. If not specified, all entries are returned. - The state values are flag-based enumeration, so the value could be a - combination of these values, obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of deployed - applications with HealthState value of OK (2) and Warning (4) are - returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type deployed_applications_health_state_filter: int - :param services_health_state_filter: Allows filtering of the services - health state objects returned in the result of services health query - based on their health state. - The possible values for this parameter include integer value of one of - the following health states. - Only services that match the filter are returned. All services are - used to evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, - obtained using bitwise 'OR' operator. For example, if the provided - value is 6 then health state of services with HealthState value of OK - (2) and Warning (4) will be returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type services_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ApplicationHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_health.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if deployed_applications_health_state_filter is not None: - query_parameters['DeployedApplicationsHealthStateFilter'] = self._serialize.query("deployed_applications_health_state_filter", deployed_applications_health_state_filter, 'int') - if services_health_state_filter is not None: - query_parameters['ServicesHealthStateFilter'] = self._serialize.query("services_health_state_filter", services_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApplicationHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_health.metadata = {'url': '/Applications/{applicationId}/$/GetHealth'} - - async def get_application_health_using_policy( - self, application_id, events_health_state_filter=0, deployed_applications_health_state_filter=0, services_health_state_filter=0, exclude_health_statistics=False, application_health_policy=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric application using the specified - policy. - - Gets the health of a Service Fabric application. Use - EventsHealthStateFilter to filter the collection of health events - reported on the node based on the health state. Use - ClusterHealthPolicies to override the health policies used to evaluate - the health. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param deployed_applications_health_state_filter: Allows filtering of - the deployed applications health state objects returned in the result - of application health query based on their health state. - The possible values for this parameter include integer value of one of - the following health states. Only deployed applications that match the - filter will be returned. - All deployed applications are used to evaluate the aggregated health - state. If not specified, all entries are returned. - The state values are flag-based enumeration, so the value could be a - combination of these values, obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of deployed - applications with HealthState value of OK (2) and Warning (4) are - returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type deployed_applications_health_state_filter: int - :param services_health_state_filter: Allows filtering of the services - health state objects returned in the result of services health query - based on their health state. - The possible values for this parameter include integer value of one of - the following health states. - Only services that match the filter are returned. All services are - used to evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, - obtained using bitwise 'OR' operator. For example, if the provided - value is 6 then health state of services with HealthState value of OK - (2) and Warning (4) will be returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type services_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param application_health_policy: Describes the health policies used - to evaluate the health of an application or one of its children. - If not present, the health evaluation uses the health policy from - application manifest or the default health policy. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ApplicationHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_health_using_policy.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if deployed_applications_health_state_filter is not None: - query_parameters['DeployedApplicationsHealthStateFilter'] = self._serialize.query("deployed_applications_health_state_filter", deployed_applications_health_state_filter, 'int') - if services_health_state_filter is not None: - query_parameters['ServicesHealthStateFilter'] = self._serialize.query("services_health_state_filter", services_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApplicationHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_health_using_policy.metadata = {'url': '/Applications/{applicationId}/$/GetHealth'} - - async def report_application_health( - self, application_id, health_information, immediate=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Sends a health report on the Service Fabric application. - - Reports health state of the specified Service Fabric application. The - report must contain the information about the source of the health - report and property on which it is reported. - The report is sent to a Service Fabric gateway Application, which - forwards to the health store. - The report may be accepted by the gateway, but rejected by the health - store after extra validation. - For example, the health store may reject the report because of an - invalid parameter, like a stale sequence number. - To see whether the report was applied in the health store, get - application health and check that the report appears in the - HealthEvents section. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param health_information: Describes the health information for the - health report. This information needs to be present in all of the - health reports sent to the health manager. - :type health_information: - ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be - sent immediately. - A health report is sent to a Service Fabric gateway Application, which - forwards to the health store. - If Immediate is set to true, the report is sent immediately from HTTP - Gateway to the health store, regardless of the fabric client settings - that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as - possible. - Depending on timing and other conditions, sending the report may still - fail, for example if the HTTP Gateway is closed or the message doesn't - reach the Gateway. - If Immediate is set to false, the report is sent based on the health - client settings from the HTTP Gateway. Therefore, it will be batched - according to the HealthReportSendInterval configuration. - This is the recommended setting because it allows the health client to - optimize health reporting messages to health store as well as health - report processing. - By default, reports are not sent immediately. - :type immediate: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.report_application_health.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - report_application_health.metadata = {'url': '/Applications/{applicationId}/$/ReportHealth'} - - async def start_application_upgrade( - self, application_id, application_upgrade_description, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Starts upgrading an application in the Service Fabric cluster. - - Validates the supplied application upgrade parameters and starts - upgrading the application if the parameters are valid. - Note, - [ApplicationParameter](https://docs.microsoft.com/dotnet/api/system.fabric.description.applicationdescription.applicationparameters)s - are not preserved across an application upgrade. - In order to preserve current application parameters, the user should - get the parameters using [GetApplicationInfo](./GetApplicationInfo.md) - operation first and pass them into the upgrade API call as shown in the - example. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param application_upgrade_description: Parameters for an application - upgrade. - :type application_upgrade_description: - ~azure.servicefabric.models.ApplicationUpgradeDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.start_application_upgrade.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(application_upgrade_description, 'ApplicationUpgradeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/Upgrade'} - - async def get_application_upgrade( - self, application_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets details for the latest upgrade performed on this application. - - Returns information about the state of the latest application upgrade - along with details to aid debugging application health issues. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationUpgradeProgressInfo or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.ApplicationUpgradeProgressInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_upgrade.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApplicationUpgradeProgressInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/GetUpgradeProgress'} - - async def update_application_upgrade( - self, application_id, application_upgrade_update_description, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Updates an ongoing application upgrade in the Service Fabric cluster. - - Updates the parameters of an ongoing application upgrade from the ones - specified at the time of starting the application upgrade. This may be - required to mitigate stuck application upgrades due to incorrect - parameters or issues in the application to make progress. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param application_upgrade_update_description: Parameters for updating - an existing application upgrade. - :type application_upgrade_update_description: - ~azure.servicefabric.models.ApplicationUpgradeUpdateDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.update_application_upgrade.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(application_upgrade_update_description, 'ApplicationUpgradeUpdateDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/UpdateUpgrade'} - - async def resume_application_upgrade( - self, application_id, upgrade_domain_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Resumes upgrading an application in the Service Fabric cluster. - - Resumes an unmonitored manual Service Fabric application upgrade. - Service Fabric upgrades one upgrade domain at a time. For unmonitored - manual upgrades, after Service Fabric finishes an upgrade domain, it - waits for you to call this API before proceeding to the next upgrade - domain. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param upgrade_domain_name: The name of the upgrade domain in which to - resume the upgrade. - :type upgrade_domain_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - resume_application_upgrade_description = models.ResumeApplicationUpgradeDescription(upgrade_domain_name=upgrade_domain_name) - - api_version = "6.0" - - # Construct URL - url = self.resume_application_upgrade.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(resume_application_upgrade_description, 'ResumeApplicationUpgradeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resume_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/MoveToNextUpgradeDomain'} - - async def rollback_application_upgrade( - self, application_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Starts rolling back the currently on-going upgrade of an application in - the Service Fabric cluster. - - Starts rolling back the current application upgrade to the previous - version. This API can only be used to roll back the current in-progress - upgrade that is rolling forward to new version. If the application is - not currently being upgraded use StartApplicationUpgrade API to upgrade - it to desired version, including rolling back to a previous version. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.rollback_application_upgrade.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - rollback_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/RollbackUpgrade'} - - async def get_deployed_application_info_list( - self, node_name, timeout=60, include_health_state=False, continuation_token=None, max_results=0, *, custom_headers=None, raw=False, **operation_config): - """Gets the list of applications deployed on a Service Fabric node. - - Gets the list of applications deployed on a Service Fabric node. The - results do not include information about deployed system applications - unless explicitly queried for by ID. Results encompass deployed - applications in active, activating, and downloading states. This query - requires that the node name corresponds to a node on the cluster. The - query fails if the provided node name does not point to any active - Service Fabric nodes on the cluster. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param include_health_state: Include the health state of an entity. - If this parameter is false or not specified, then the health state - returned is "Unknown". - When set to true, the query goes in parallel to the node and the - health system service before the results are merged. - As a result, the query is more expensive and may take a longer time. - :type include_health_state: bool - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedDeployedApplicationInfoList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedDeployedApplicationInfoList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.1" - - # Construct URL - url = self.get_deployed_application_info_list.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if include_health_state is not None: - query_parameters['IncludeHealthState'] = self._serialize.query("include_health_state", include_health_state, 'bool') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedDeployedApplicationInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_application_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications'} - - async def get_deployed_application_info( - self, node_name, application_id, timeout=60, include_health_state=False, *, custom_headers=None, raw=False, **operation_config): - """Gets the information about an application deployed on a Service Fabric - node. - - This query returns system application information if the application ID - provided is for system application. Results encompass deployed - applications in active, activating, and downloading states. This query - requires that the node name corresponds to a node on the cluster. The - query fails if the provided node name does not point to any active - Service Fabric nodes on the cluster. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param include_health_state: Include the health state of an entity. - If this parameter is false or not specified, then the health state - returned is "Unknown". - When set to true, the query goes in parallel to the node and the - health system service before the results are merged. - As a result, the query is more expensive and may take a longer time. - :type include_health_state: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeployedApplicationInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.DeployedApplicationInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.1" - - # Construct URL - url = self.get_deployed_application_info.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if include_health_state is not None: - query_parameters['IncludeHealthState'] = self._serialize.query("include_health_state", include_health_state, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeployedApplicationInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_application_info.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}'} - - async def get_deployed_application_health( - self, node_name, application_id, events_health_state_filter=0, deployed_service_packages_health_state_filter=0, exclude_health_statistics=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the information about health of an application deployed on a - Service Fabric node. - - Gets the information about health of an application deployed on a - Service Fabric node. Use EventsHealthStateFilter to optionally filter - for the collection of HealthEvent objects reported on the deployed - application based on health state. Use - DeployedServicePackagesHealthStateFilter to optionally filter for - DeployedServicePackageHealth children based on health state. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param deployed_service_packages_health_state_filter: Allows filtering - of the deployed service package health state objects returned in the - result of deployed application health query based on their health - state. - The possible values for this parameter include integer value of one of - the following health states. - Only deployed service packages that match the filter are returned. All - deployed service packages are used to evaluate the aggregated health - state of the deployed application. - If not specified, all entries are returned. - The state values are flag-based enumeration, so the value can be a - combination of these values, obtained using the bitwise 'OR' operator. - For example, if the provided value is 6 then health state of service - packages with HealthState value of OK (2) and Warning (4) are - returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type deployed_service_packages_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeployedApplicationHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.DeployedApplicationHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_application_health.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if deployed_service_packages_health_state_filter is not None: - query_parameters['DeployedServicePackagesHealthStateFilter'] = self._serialize.query("deployed_service_packages_health_state_filter", deployed_service_packages_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeployedApplicationHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_application_health.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth'} - - async def get_deployed_application_health_using_policy( - self, node_name, application_id, events_health_state_filter=0, deployed_service_packages_health_state_filter=0, application_health_policy=None, exclude_health_statistics=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the information about health of an application deployed on a - Service Fabric node. using the specified policy. - - Gets the information about health of an application deployed on a - Service Fabric node using the specified policy. Use - EventsHealthStateFilter to optionally filter for the collection of - HealthEvent objects reported on the deployed application based on - health state. Use DeployedServicePackagesHealthStateFilter to - optionally filter for DeployedServicePackageHealth children based on - health state. Use ApplicationHealthPolicy to optionally override the - health policies used to evaluate the health. This API only uses - 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest - of the fields are ignored while evaluating the health of the deployed - application. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param deployed_service_packages_health_state_filter: Allows filtering - of the deployed service package health state objects returned in the - result of deployed application health query based on their health - state. - The possible values for this parameter include integer value of one of - the following health states. - Only deployed service packages that match the filter are returned. All - deployed service packages are used to evaluate the aggregated health - state of the deployed application. - If not specified, all entries are returned. - The state values are flag-based enumeration, so the value can be a - combination of these values, obtained using the bitwise 'OR' operator. - For example, if the provided value is 6 then health state of service - packages with HealthState value of OK (2) and Warning (4) are - returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type deployed_service_packages_health_state_filter: int - :param application_health_policy: Describes the health policies used - to evaluate the health of an application or one of its children. - If not present, the health evaluation uses the health policy from - application manifest or the default health policy. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeployedApplicationHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.DeployedApplicationHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_application_health_using_policy.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if deployed_service_packages_health_state_filter is not None: - query_parameters['DeployedServicePackagesHealthStateFilter'] = self._serialize.query("deployed_service_packages_health_state_filter", deployed_service_packages_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeployedApplicationHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_application_health_using_policy.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth'} - - async def report_deployed_application_health( - self, node_name, application_id, health_information, immediate=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Sends a health report on the Service Fabric application deployed on a - Service Fabric node. - - Reports health state of the application deployed on a Service Fabric - node. The report must contain the information about the source of the - health report and property on which it is reported. - The report is sent to a Service Fabric gateway Service, which forwards - to the health store. - The report may be accepted by the gateway, but rejected by the health - store after extra validation. - For example, the health store may reject the report because of an - invalid parameter, like a stale sequence number. - To see whether the report was applied in the health store, get deployed - application health and check that the report appears in the - HealthEvents section. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param health_information: Describes the health information for the - health report. This information needs to be present in all of the - health reports sent to the health manager. - :type health_information: - ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be - sent immediately. - A health report is sent to a Service Fabric gateway Application, which - forwards to the health store. - If Immediate is set to true, the report is sent immediately from HTTP - Gateway to the health store, regardless of the fabric client settings - that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as - possible. - Depending on timing and other conditions, sending the report may still - fail, for example if the HTTP Gateway is closed or the message doesn't - reach the Gateway. - If Immediate is set to false, the report is sent based on the health - client settings from the HTTP Gateway. Therefore, it will be batched - according to the HealthReportSendInterval configuration. - This is the recommended setting because it allows the health client to - optimize health reporting messages to health store as well as health - report processing. - By default, reports are not sent immediately. - :type immediate: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.report_deployed_application_health.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - report_deployed_application_health.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/ReportHealth'} - - async def get_application_manifest( - self, application_type_name, application_type_version, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the manifest describing an application type. - - The response contains the application manifest XML as a string. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationTypeManifest or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ApplicationTypeManifest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_manifest.metadata['url'] - path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApplicationTypeManifest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_manifest.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/GetApplicationManifest'} - - async def get_service_info_list( - self, application_id, service_type_name=None, continuation_token=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the information about all services belonging to the application - specified by the application ID. - - Returns the information about all services belonging to the application - specified by the application ID. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_type_name: The service type name used to filter the - services to query for. - :type service_type_name: str - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedServiceInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedServiceInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_info_list.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if service_type_name is not None: - query_parameters['ServiceTypeName'] = self._serialize.query("service_type_name", service_type_name, 'str') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedServiceInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_info_list.metadata = {'url': '/Applications/{applicationId}/$/GetServices'} - - async def get_service_info( - self, application_id, service_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the information about the specific service belonging to the - Service Fabric application. - - Returns the information about the specified service belonging to the - specified Service Fabric application. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_info.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServiceInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_info.metadata = {'url': '/Applications/{applicationId}/$/GetServices/{serviceId}'} - - async def get_application_name_info( - self, service_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the name of the Service Fabric application for a service. - - Gets the name of the application for the specified service. A 404 - FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the - provided service ID does not exist. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationNameInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ApplicationNameInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_name_info.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApplicationNameInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_name_info.metadata = {'url': '/Services/{serviceId}/$/GetApplicationName'} - - async def create_service( - self, application_id, service_description, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Creates the specified Service Fabric service. - - This api allows creating a new Service Fabric stateless or stateful - service under a specified Service Fabric application. The description - for creating the service includes partitioning information and optional - properties for placement and load balancing. Some of the properties can - later be modified using `UpdateService` API. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_description: The information necessary to create a - service. - :type service_description: - ~azure.servicefabric.models.ServiceDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.create_service.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(service_description, 'ServiceDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - create_service.metadata = {'url': '/Applications/{applicationId}/$/GetServices/$/Create'} - - async def create_service_from_template( - self, application_id, service_from_template_description, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Creates a Service Fabric service from the service template. - - Creates a Service Fabric service from the service template defined in - the application manifest. A service template contains the properties - that will be same for the service instance of the same type. The API - allows overriding the properties that are usually different for - different services of the same service type. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_from_template_description: Describes the service that - needs to be created from the template defined in the application - manifest. - :type service_from_template_description: - ~azure.servicefabric.models.ServiceFromTemplateDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.create_service_from_template.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(service_from_template_description, 'ServiceFromTemplateDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - create_service_from_template.metadata = {'url': '/Applications/{applicationId}/$/GetServices/$/CreateFromTemplate'} - - async def delete_service( - self, service_id, force_remove=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Service Fabric service. - - A service must be created before it can be deleted. By default, Service - Fabric will try to close service replicas in a graceful manner and then - delete the service. However, if the service is having issues closing - the replica gracefully, the delete operation may take a long time or - get stuck. Use the optional ForceRemove flag to skip the graceful close - sequence and forcefully delete the service. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param force_remove: Remove a Service Fabric application or service - forcefully without going through the graceful shutdown sequence. This - parameter can be used to forcefully delete an application or service - for which delete is timing out due to issues in the service code that - prevents graceful close of replicas. - :type force_remove: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.delete_service.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if force_remove is not None: - query_parameters['ForceRemove'] = self._serialize.query("force_remove", force_remove, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_service.metadata = {'url': '/Services/{serviceId}/$/Delete'} - - async def update_service( - self, service_id, service_update_description, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Updates a Service Fabric service using the specified update - description. - - This API allows updating properties of a running Service Fabric - service. The set of properties that can be updated are a subset of the - properties that were specified at the time of creating the service. The - current set of properties can be obtained using `GetServiceDescription` - API. Note that updating the properties of a running service is - different than upgrading your application using - `StartApplicationUpgrade` API. The upgrade is a long running background - operation that involves moving the application from one version to - another, one upgrade domain at a time, whereas update applies the new - properties immediately to the service. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param service_update_description: The information necessary to update - a service. - :type service_update_description: - ~azure.servicefabric.models.ServiceUpdateDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.update_service.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(service_update_description, 'ServiceUpdateDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update_service.metadata = {'url': '/Services/{serviceId}/$/Update'} - - async def get_service_description( - self, service_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the description of an existing Service Fabric service. - - Gets the description of an existing Service Fabric service. A service - must be created before its description can be obtained. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_description.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServiceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_description.metadata = {'url': '/Services/{serviceId}/$/GetDescription'} - - async def get_service_health( - self, service_id, events_health_state_filter=0, partitions_health_state_filter=0, exclude_health_statistics=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the health of the specified Service Fabric service. - - Gets the health information of the specified service. - Use EventsHealthStateFilter to filter the collection of health events - reported on the service based on the health state. - Use PartitionsHealthStateFilter to filter the collection of partitions - returned. - If you specify a service that does not exist in the health store, this - request returns an error. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param partitions_health_state_filter: Allows filtering of the - partitions health state objects returned in the result of service - health query based on their health state. - The possible values for this parameter include integer value of one of - the following health states. - Only partitions that match the filter are returned. All partitions are - used to evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - value - obtained using bitwise 'OR' operator. For example, if the provided - value is 6 then health state of partitions with HealthState value of - OK (2) and Warning (4) will be returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type partitions_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_health.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if partitions_health_state_filter is not None: - query_parameters['PartitionsHealthStateFilter'] = self._serialize.query("partitions_health_state_filter", partitions_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServiceHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_health.metadata = {'url': '/Services/{serviceId}/$/GetHealth'} - - async def get_service_health_using_policy( - self, service_id, events_health_state_filter=0, partitions_health_state_filter=0, application_health_policy=None, exclude_health_statistics=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the health of the specified Service Fabric service, by using the - specified health policy. - - Gets the health information of the specified service. - If the application health policy is specified, the health evaluation - uses it to get the aggregated health state. - If the policy is not specified, the health evaluation uses the - application health policy defined in the application manifest, or the - default health policy, if no policy is defined in the manifest. - Use EventsHealthStateFilter to filter the collection of health events - reported on the service based on the health state. - Use PartitionsHealthStateFilter to filter the collection of partitions - returned. - If you specify a service that does not exist in the health store, this - request returns an error. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param partitions_health_state_filter: Allows filtering of the - partitions health state objects returned in the result of service - health query based on their health state. - The possible values for this parameter include integer value of one of - the following health states. - Only partitions that match the filter are returned. All partitions are - used to evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - value - obtained using bitwise 'OR' operator. For example, if the provided - value is 6 then health state of partitions with HealthState value of - OK (2) and Warning (4) will be returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type partitions_health_state_filter: int - :param application_health_policy: Describes the health policies used - to evaluate the health of an application or one of its children. - If not present, the health evaluation uses the health policy from - application manifest or the default health policy. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_health_using_policy.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if partitions_health_state_filter is not None: - query_parameters['PartitionsHealthStateFilter'] = self._serialize.query("partitions_health_state_filter", partitions_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServiceHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_health_using_policy.metadata = {'url': '/Services/{serviceId}/$/GetHealth'} - - async def report_service_health( - self, service_id, health_information, immediate=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Sends a health report on the Service Fabric service. - - Reports health state of the specified Service Fabric service. The - report must contain the information about the source of the health - report and property on which it is reported. - The report is sent to a Service Fabric gateway Service, which forwards - to the health store. - The report may be accepted by the gateway, but rejected by the health - store after extra validation. - For example, the health store may reject the report because of an - invalid parameter, like a stale sequence number. - To see whether the report was applied in the health store, run - GetServiceHealth and check that the report appears in the HealthEvents - section. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param health_information: Describes the health information for the - health report. This information needs to be present in all of the - health reports sent to the health manager. - :type health_information: - ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be - sent immediately. - A health report is sent to a Service Fabric gateway Application, which - forwards to the health store. - If Immediate is set to true, the report is sent immediately from HTTP - Gateway to the health store, regardless of the fabric client settings - that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as - possible. - Depending on timing and other conditions, sending the report may still - fail, for example if the HTTP Gateway is closed or the message doesn't - reach the Gateway. - If Immediate is set to false, the report is sent based on the health - client settings from the HTTP Gateway. Therefore, it will be batched - according to the HealthReportSendInterval configuration. - This is the recommended setting because it allows the health client to - optimize health reporting messages to health store as well as health - report processing. - By default, reports are not sent immediately. - :type immediate: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.report_service_health.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - report_service_health.metadata = {'url': '/Services/{serviceId}/$/ReportHealth'} - - async def resolve_service( - self, service_id, partition_key_type=None, partition_key_value=None, previous_rsp_version=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Resolve a Service Fabric partition. - - Resolve a Service Fabric service partition to get the endpoints of the - service replicas. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_key_type: Key type for the partition. This parameter - is required if the partition scheme for the service is Int64Range or - Named. The possible values are following. - - None (1) - Indicates that the PartitionKeyValue parameter is not - specified. This is valid for the partitions with partitioning scheme - as Singleton. This is the default value. The value is 1. - - Int64Range (2) - Indicates that the PartitionKeyValue parameter is - an int64 partition key. This is valid for the partitions with - partitioning scheme as Int64Range. The value is 2. - - Named (3) - Indicates that the PartitionKeyValue parameter is a name - of the partition. This is valid for the partitions with partitioning - scheme as Named. The value is 3. - :type partition_key_type: int - :param partition_key_value: Partition key. This is required if the - partition scheme for the service is Int64Range or Named. - This is not the partition ID, but rather, either the integer key - value, or the name of the partition ID. - For example, if your service is using ranged partitions from 0 to 10, - then they PartitionKeyValue would be an - integer in that range. Query service description to see the range or - name. - :type partition_key_value: str - :param previous_rsp_version: The value in the Version field of the - response that was received previously. This is required if the user - knows that the result that was gotten previously is stale. - :type previous_rsp_version: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResolvedServicePartition or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ResolvedServicePartition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.resolve_service.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if partition_key_type is not None: - query_parameters['PartitionKeyType'] = self._serialize.query("partition_key_type", partition_key_type, 'int') - if partition_key_value is not None: - query_parameters['PartitionKeyValue'] = self._serialize.query("partition_key_value", partition_key_value, 'str', skip_quote=True) - if previous_rsp_version is not None: - query_parameters['PreviousRspVersion'] = self._serialize.query("previous_rsp_version", previous_rsp_version, 'str', skip_quote=True) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResolvedServicePartition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - resolve_service.metadata = {'url': '/Services/{serviceId}/$/ResolvePartition'} - - async def get_unplaced_replica_information( - self, service_id, partition_id=None, only_query_primaries=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the information about unplaced replica of the service. - - Returns the information about the unplaced replicas of the service. - If PartitionId is specified, then result will contain information only - about unplaced replicas for that partition. - If PartitionId is not specified, then result will contain information - about unplaced replicas for all partitions of that service. - If OnlyQueryPrimaries is set to true, then result will contain - information only about primary replicas, and will ignore unplaced - secondary replicas. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param only_query_primaries: Indicates that unplaced replica - information will be queries only for primary replicas. - :type only_query_primaries: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: UnplacedReplicaInformation or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.UnplacedReplicaInformation or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_unplaced_replica_information.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if partition_id is not None: - query_parameters['PartitionId'] = self._serialize.query("partition_id", partition_id, 'str') - if only_query_primaries is not None: - query_parameters['OnlyQueryPrimaries'] = self._serialize.query("only_query_primaries", only_query_primaries, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('UnplacedReplicaInformation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_unplaced_replica_information.metadata = {'url': '/Services/{serviceId}/$/GetUnplacedReplicaInformation'} - - async def get_loaded_partition_info_list( - self, metric_name, service_name=None, ordering="Desc", max_results=0, continuation_token=None, *, custom_headers=None, raw=False, **operation_config): - """Gets ordered list of partitions. - - Retrieves partitions which are most/least loaded according to specified - metric. - - :param metric_name: Name of the metric based on which to get ordered - list of partitions. - :type metric_name: str - :param service_name: The name of a service. - :type service_name: str - :param ordering: Ordering of partitions' load. Possible values - include: 'Desc', 'Asc' - :type ordering: str or ~azure.servicefabric.models.Ordering - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: LoadedPartitionInformationResultList or ClientRawResponse if - raw=true - :rtype: - ~azure.servicefabric.models.LoadedPartitionInformationResultList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "8.0" - - # Construct URL - url = self.get_loaded_partition_info_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['MetricName'] = self._serialize.query("metric_name", metric_name, 'str') - if service_name is not None: - query_parameters['ServiceName'] = self._serialize.query("service_name", service_name, 'str') - if ordering is not None: - query_parameters['Ordering'] = self._serialize.query("ordering", ordering, 'str') - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('LoadedPartitionInformationResultList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_loaded_partition_info_list.metadata = {'url': '/$/GetLoadedPartitionInfoList'} - - async def get_partition_info_list( - self, service_id, continuation_token=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the list of partitions of a Service Fabric service. - - The response includes the partition ID, partitioning scheme - information, keys supported by the partition, status, health, and other - details about the partition. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedServicePartitionInfoList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedServicePartitionInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partition_info_list.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedServicePartitionInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_info_list.metadata = {'url': '/Services/{serviceId}/$/GetPartitions'} - - async def get_partition_info( - self, partition_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the information about a Service Fabric partition. - - Gets the information about the specified partition. The response - includes the partition ID, partitioning scheme information, keys - supported by the partition, status, health, and other details about the - partition. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServicePartitionInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServicePartitionInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_partition_info.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServicePartitionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_info.metadata = {'url': '/Partitions/{partitionId}'} - - async def get_service_name_info( - self, partition_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the name of the Service Fabric service for a partition. - - Gets name of the service for the specified partition. A 404 error is - returned if the partition ID does not exist in the cluster. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceNameInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceNameInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_name_info.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServiceNameInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_name_info.metadata = {'url': '/Partitions/{partitionId}/$/GetServiceName'} - - async def get_partition_health( - self, partition_id, events_health_state_filter=0, replicas_health_state_filter=0, exclude_health_statistics=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the health of the specified Service Fabric partition. - - Use EventsHealthStateFilter to filter the collection of health events - reported on the service based on the health state. - Use ReplicasHealthStateFilter to filter the collection of - ReplicaHealthState objects on the partition. - If you specify a partition that does not exist in the health store, - this request returns an error. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param replicas_health_state_filter: Allows filtering the collection - of ReplicaHealthState objects on the partition. The value can be - obtained from members or bitwise operations on members of - HealthStateFilter. Only replicas that match the filter will be - returned. All replicas will be used to evaluate the aggregated health - state. If not specified, all entries will be returned.The state values - are flag-based enumeration, so the value could be a combination of - these values obtained using bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) will be returned. The possible values for this - parameter include integer value of one of the following health states. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type replicas_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PartitionHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PartitionHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_partition_health.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if replicas_health_state_filter is not None: - query_parameters['ReplicasHealthStateFilter'] = self._serialize.query("replicas_health_state_filter", replicas_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PartitionHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_health.metadata = {'url': '/Partitions/{partitionId}/$/GetHealth'} - - async def get_partition_health_using_policy( - self, partition_id, events_health_state_filter=0, replicas_health_state_filter=0, application_health_policy=None, exclude_health_statistics=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the health of the specified Service Fabric partition, by using the - specified health policy. - - Gets the health information of the specified partition. - If the application health policy is specified, the health evaluation - uses it to get the aggregated health state. - If the policy is not specified, the health evaluation uses the - application health policy defined in the application manifest, or the - default health policy, if no policy is defined in the manifest. - Use EventsHealthStateFilter to filter the collection of health events - reported on the partition based on the health state. - Use ReplicasHealthStateFilter to filter the collection of - ReplicaHealthState objects on the partition. Use - ApplicationHealthPolicy in the POST body to override the health - policies used to evaluate the health. - If you specify a partition that does not exist in the health store, - this request returns an error. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param replicas_health_state_filter: Allows filtering the collection - of ReplicaHealthState objects on the partition. The value can be - obtained from members or bitwise operations on members of - HealthStateFilter. Only replicas that match the filter will be - returned. All replicas will be used to evaluate the aggregated health - state. If not specified, all entries will be returned.The state values - are flag-based enumeration, so the value could be a combination of - these values obtained using bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) will be returned. The possible values for this - parameter include integer value of one of the following health states. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type replicas_health_state_filter: int - :param application_health_policy: Describes the health policies used - to evaluate the health of an application or one of its children. - If not present, the health evaluation uses the health policy from - application manifest or the default health policy. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PartitionHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PartitionHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_partition_health_using_policy.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if replicas_health_state_filter is not None: - query_parameters['ReplicasHealthStateFilter'] = self._serialize.query("replicas_health_state_filter", replicas_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PartitionHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_health_using_policy.metadata = {'url': '/Partitions/{partitionId}/$/GetHealth'} - - async def report_partition_health( - self, partition_id, health_information, immediate=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Sends a health report on the Service Fabric partition. - - Reports health state of the specified Service Fabric partition. The - report must contain the information about the source of the health - report and property on which it is reported. - The report is sent to a Service Fabric gateway Partition, which - forwards to the health store. - The report may be accepted by the gateway, but rejected by the health - store after extra validation. - For example, the health store may reject the report because of an - invalid parameter, like a stale sequence number. - To see whether the report was applied in the health store, run - GetPartitionHealth and check that the report appears in the - HealthEvents section. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param health_information: Describes the health information for the - health report. This information needs to be present in all of the - health reports sent to the health manager. - :type health_information: - ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be - sent immediately. - A health report is sent to a Service Fabric gateway Application, which - forwards to the health store. - If Immediate is set to true, the report is sent immediately from HTTP - Gateway to the health store, regardless of the fabric client settings - that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as - possible. - Depending on timing and other conditions, sending the report may still - fail, for example if the HTTP Gateway is closed or the message doesn't - reach the Gateway. - If Immediate is set to false, the report is sent based on the health - client settings from the HTTP Gateway. Therefore, it will be batched - according to the HealthReportSendInterval configuration. - This is the recommended setting because it allows the health client to - optimize health reporting messages to health store as well as health - report processing. - By default, reports are not sent immediately. - :type immediate: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.report_partition_health.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - report_partition_health.metadata = {'url': '/Partitions/{partitionId}/$/ReportHealth'} - - async def get_partition_load_information( - self, partition_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the load information of the specified Service Fabric partition. - - Returns information about the load of a specified partition. - The response includes a list of load reports for a Service Fabric - partition. - Each report includes the load metric name, value, and last reported - time in UTC. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PartitionLoadInformation or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PartitionLoadInformation or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_partition_load_information.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PartitionLoadInformation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_load_information.metadata = {'url': '/Partitions/{partitionId}/$/GetLoadInformation'} - - async def reset_partition_load( - self, partition_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Resets the current load of a Service Fabric partition. - - Resets the current load of a Service Fabric partition to the default - load for the service. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.reset_partition_load.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_partition_load.metadata = {'url': '/Partitions/{partitionId}/$/ResetLoad'} - - async def recover_partition( - self, partition_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Indicates to the Service Fabric cluster that it should attempt to - recover a specific partition that is currently stuck in quorum loss. - - This operation should only be performed if it is known that the - replicas that are down cannot be recovered. Incorrect use of this API - can cause potential data loss. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.recover_partition.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_partition.metadata = {'url': '/Partitions/{partitionId}/$/Recover'} - - async def recover_service_partitions( - self, service_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Indicates to the Service Fabric cluster that it should attempt to - recover the specified service that is currently stuck in quorum loss. - - Indicates to the Service Fabric cluster that it should attempt to - recover the specified service that is currently stuck in quorum loss. - This operation should only be performed if it is known that the - replicas that are down cannot be recovered. Incorrect use of this API - can cause potential data loss. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.recover_service_partitions.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_service_partitions.metadata = {'url': '/Services/$/{serviceId}/$/GetPartitions/$/Recover'} - - async def recover_system_partitions( - self, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Indicates to the Service Fabric cluster that it should attempt to - recover the system services that are currently stuck in quorum loss. - - Indicates to the Service Fabric cluster that it should attempt to - recover the system services that are currently stuck in quorum loss. - This operation should only be performed if it is known that the - replicas that are down cannot be recovered. Incorrect use of this API - can cause potential data loss. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.recover_system_partitions.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_system_partitions.metadata = {'url': '/$/RecoverSystemPartitions'} - - async def recover_all_partitions( - self, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Indicates to the Service Fabric cluster that it should attempt to - recover any services (including system services) which are currently - stuck in quorum loss. - - This operation should only be performed if it is known that the - replicas that are down cannot be recovered. Incorrect use of this API - can cause potential data loss. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.recover_all_partitions.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_all_partitions.metadata = {'url': '/$/RecoverAllPartitions'} - - async def move_primary_replica( - self, partition_id, node_name=None, ignore_constraints=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Moves the primary replica of a partition of a stateful service. - - This command moves the primary replica of a partition of a stateful - service, respecting all constraints. - If NodeName parameter is specified, primary will be moved to the - specified node (if constraints allow it). - If NodeName parameter is not specified, primary replica will be moved - to a random node in the cluster. - If IgnoreConstraints parameter is specified and set to true, then - primary will be moved regardless of the constraints. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param node_name: The name of the node. - :type node_name: str - :param ignore_constraints: Ignore constraints when moving a replica or - instance. If this parameter is not specified, all constraints are - honored. - :type ignore_constraints: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.5" - - # Construct URL - url = self.move_primary_replica.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if node_name is not None: - query_parameters['NodeName'] = self._serialize.query("node_name", node_name, 'str') - if ignore_constraints is not None: - query_parameters['IgnoreConstraints'] = self._serialize.query("ignore_constraints", ignore_constraints, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - move_primary_replica.metadata = {'url': '/Partitions/{partitionId}/$/MovePrimaryReplica'} - - async def move_secondary_replica( - self, partition_id, current_node_name, new_node_name=None, ignore_constraints=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Moves the secondary replica of a partition of a stateful service. - - This command moves the secondary replica of a partition of a stateful - service, respecting all constraints. - CurrentNodeName parameter must be specified to identify the replica - that is moved. - Source node name must be specified, but new node name can be omitted, - and in that case replica is moved to a random node. - If IgnoreConstraints parameter is specified and set to true, then - secondary will be moved regardless of the constraints. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param current_node_name: The name of the source node for secondary - replica move. - :type current_node_name: str - :param new_node_name: The name of the target node for secondary - replica or instance move. If not specified, replica or instance is - moved to a random node. - :type new_node_name: str - :param ignore_constraints: Ignore constraints when moving a replica or - instance. If this parameter is not specified, all constraints are - honored. - :type ignore_constraints: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.5" - - # Construct URL - url = self.move_secondary_replica.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['CurrentNodeName'] = self._serialize.query("current_node_name", current_node_name, 'str') - if new_node_name is not None: - query_parameters['NewNodeName'] = self._serialize.query("new_node_name", new_node_name, 'str') - if ignore_constraints is not None: - query_parameters['IgnoreConstraints'] = self._serialize.query("ignore_constraints", ignore_constraints, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - move_secondary_replica.metadata = {'url': '/Partitions/{partitionId}/$/MoveSecondaryReplica'} - - async def update_partition_load( - self, partition_metric_load_description_list, continuation_token=None, max_results=0, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Update the loads of provided partitions for specific metrics. - - Updates the load value and predicted load value for all the partitions - provided for specified metrics. - - :param partition_metric_load_description_list: Description of updating - load for list of partitions. - :type partition_metric_load_description_list: - list[~azure.servicefabric.models.PartitionMetricLoadDescription] - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedUpdatePartitionLoadResultList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedUpdatePartitionLoadResultList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "7.2" - - # Construct URL - url = self.update_partition_load.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(partition_metric_load_description_list, '[PartitionMetricLoadDescription]') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedUpdatePartitionLoadResultList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_partition_load.metadata = {'url': '/$/UpdatePartitionLoad'} - - async def move_instance( - self, service_id, partition_id, current_node_name=None, new_node_name=None, ignore_constraints=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Moves the instance of a partition of a stateless service. - - This command moves the instance of a partition of a stateless service, - respecting all constraints. - Partition id and service name must be specified to be able to move the - instance. - CurrentNodeName when specified identifies the instance that is moved. - If not specified, random instance will be moved - New node name can be omitted, and in that case instance is moved to a - random node. - If IgnoreConstraints parameter is specified and set to true, then - instance will be moved regardless of the constraints. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param current_node_name: The name of the source node for instance - move. If not specified, instance is moved from a random node. - :type current_node_name: str - :param new_node_name: The name of the target node for secondary - replica or instance move. If not specified, replica or instance is - moved to a random node. - :type new_node_name: str - :param ignore_constraints: Ignore constraints when moving a replica or - instance. If this parameter is not specified, all constraints are - honored. - :type ignore_constraints: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "8.0" - - # Construct URL - url = self.move_instance.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if current_node_name is not None: - query_parameters['CurrentNodeName'] = self._serialize.query("current_node_name", current_node_name, 'str') - if new_node_name is not None: - query_parameters['NewNodeName'] = self._serialize.query("new_node_name", new_node_name, 'str') - if ignore_constraints is not None: - query_parameters['IgnoreConstraints'] = self._serialize.query("ignore_constraints", ignore_constraints, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - move_instance.metadata = {'url': '/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveInstance'} - - async def create_repair_task( - self, repair_task, *, custom_headers=None, raw=False, **operation_config): - """Creates a new repair task. - - For clusters that have the Repair Manager Service configured, - this API provides a way to create repair tasks that run automatically - or manually. - For repair tasks that run automatically, an appropriate repair executor - must be running for each repair action to run automatically. - These are currently only available in specially-configured Azure Cloud - Services. - To create a manual repair task, provide the set of impacted node names - and the - expected impact. When the state of the created repair task changes to - approved, - you can safely perform repair actions on those nodes. - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param repair_task: Describes the repair task to be created or - updated. - :type repair_task: ~azure.servicefabric.models.RepairTask - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RepairTaskUpdateInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.create_repair_task.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(repair_task, 'RepairTask') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RepairTaskUpdateInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_repair_task.metadata = {'url': '/$/CreateRepairTask'} - - async def cancel_repair_task( - self, repair_task_cancel_description, *, custom_headers=None, raw=False, **operation_config): - """Requests the cancellation of the given repair task. - - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param repair_task_cancel_description: Describes the repair task to be - cancelled. - :type repair_task_cancel_description: - ~azure.servicefabric.models.RepairTaskCancelDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RepairTaskUpdateInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.cancel_repair_task.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(repair_task_cancel_description, 'RepairTaskCancelDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RepairTaskUpdateInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - cancel_repair_task.metadata = {'url': '/$/CancelRepairTask'} - - async def delete_repair_task( - self, task_id, version=None, *, custom_headers=None, raw=False, **operation_config): - """Deletes a completed repair task. - - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param task_id: The ID of the completed repair task to be deleted. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current version of the repair task. If zero, then no version - check is performed. - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - repair_task_delete_description = models.RepairTaskDeleteDescription(task_id=task_id, version=version) - - api_version = "6.0" - - # Construct URL - url = self.delete_repair_task.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(repair_task_delete_description, 'RepairTaskDeleteDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_repair_task.metadata = {'url': '/$/DeleteRepairTask'} - - async def get_repair_task_list( - self, task_id_filter=None, state_filter=None, executor_filter=None, *, custom_headers=None, raw=False, **operation_config): - """Gets a list of repair tasks matching the given filters. - - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param task_id_filter: The repair task ID prefix to be matched. - :type task_id_filter: str - :param state_filter: A bitwise-OR of the following values, specifying - which task states should be included in the result list. - - 1 - Created - - 2 - Claimed - - 4 - Preparing - - 8 - Approved - - 16 - Executing - - 32 - Restoring - - 64 - Completed - :type state_filter: int - :param executor_filter: The name of the repair executor whose claimed - tasks should be included in the list. - :type executor_filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.RepairTask] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_repair_task_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if task_id_filter is not None: - query_parameters['TaskIdFilter'] = self._serialize.query("task_id_filter", task_id_filter, 'str') - if state_filter is not None: - query_parameters['StateFilter'] = self._serialize.query("state_filter", state_filter, 'int') - if executor_filter is not None: - query_parameters['ExecutorFilter'] = self._serialize.query("executor_filter", executor_filter, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[RepairTask]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_repair_task_list.metadata = {'url': '/$/GetRepairTaskList'} - - async def force_approve_repair_task( - self, task_id, version=None, *, custom_headers=None, raw=False, **operation_config): - """Forces the approval of the given repair task. - - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param task_id: The ID of the repair task. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current version of the repair task. If zero, then no version - check is performed. - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RepairTaskUpdateInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - repair_task_approve_description = models.RepairTaskApproveDescription(task_id=task_id, version=version) - - api_version = "6.0" - - # Construct URL - url = self.force_approve_repair_task.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(repair_task_approve_description, 'RepairTaskApproveDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RepairTaskUpdateInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - force_approve_repair_task.metadata = {'url': '/$/ForceApproveRepairTask'} - - async def update_repair_task_health_policy( - self, repair_task_update_health_policy_description, *, custom_headers=None, raw=False, **operation_config): - """Updates the health policy of the given repair task. - - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param repair_task_update_health_policy_description: Describes the - repair task healthy policy to be updated. - :type repair_task_update_health_policy_description: - ~azure.servicefabric.models.RepairTaskUpdateHealthPolicyDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RepairTaskUpdateInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.update_repair_task_health_policy.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(repair_task_update_health_policy_description, 'RepairTaskUpdateHealthPolicyDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RepairTaskUpdateInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_repair_task_health_policy.metadata = {'url': '/$/UpdateRepairTaskHealthPolicy'} - - async def update_repair_execution_state( - self, repair_task, *, custom_headers=None, raw=False, **operation_config): - """Updates the execution state of a repair task. - - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param repair_task: Describes the repair task to be created or - updated. - :type repair_task: ~azure.servicefabric.models.RepairTask - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RepairTaskUpdateInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.update_repair_execution_state.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(repair_task, 'RepairTask') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RepairTaskUpdateInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_repair_execution_state.metadata = {'url': '/$/UpdateRepairExecutionState'} - - async def get_replica_info_list( - self, partition_id, continuation_token=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the information about replicas of a Service Fabric service - partition. - - The GetReplicas endpoint returns information about the replicas of the - specified partition. The response includes the ID, role, status, - health, node name, uptime, and other details about the replica. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedReplicaInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedReplicaInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_replica_info_list.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedReplicaInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_replica_info_list.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas'} - - async def get_replica_info( - self, partition_id, replica_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the information about a replica of a Service Fabric partition. - - The response includes the ID, role, status, health, node name, uptime, - and other details about the replica. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ReplicaInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ReplicaInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_replica_info.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ReplicaInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_replica_info.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas/{replicaId}'} - - async def get_replica_health( - self, partition_id, replica_id, events_health_state_filter=0, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric stateful service replica or - stateless service instance. - - Gets the health of a Service Fabric replica. - Use EventsHealthStateFilter to filter the collection of health events - reported on the replica based on the health state. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ReplicaHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ReplicaHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_replica_health.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ReplicaHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_replica_health.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth'} - - async def get_replica_health_using_policy( - self, partition_id, replica_id, events_health_state_filter=0, application_health_policy=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric stateful service replica or - stateless service instance using the specified policy. - - Gets the health of a Service Fabric stateful service replica or - stateless service instance. - Use EventsHealthStateFilter to filter the collection of health events - reported on the cluster based on the health state. - Use ApplicationHealthPolicy to optionally override the health policies - used to evaluate the health. This API only uses - 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest - of the fields are ignored while evaluating the health of the replica. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param application_health_policy: Describes the health policies used - to evaluate the health of an application or one of its children. - If not present, the health evaluation uses the health policy from - application manifest or the default health policy. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ReplicaHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ReplicaHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_replica_health_using_policy.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ReplicaHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_replica_health_using_policy.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth'} - - async def report_replica_health( - self, partition_id, replica_id, health_information, service_kind="Stateful", immediate=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Sends a health report on the Service Fabric replica. - - Reports health state of the specified Service Fabric replica. The - report must contain the information about the source of the health - report and property on which it is reported. - The report is sent to a Service Fabric gateway Replica, which forwards - to the health store. - The report may be accepted by the gateway, but rejected by the health - store after extra validation. - For example, the health store may reject the report because of an - invalid parameter, like a stale sequence number. - To see whether the report was applied in the health store, run - GetReplicaHealth and check that the report appears in the HealthEvents - section. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param service_kind: The kind of service replica (Stateless or - Stateful) for which the health is being reported. Following are the - possible values. Possible values include: 'Stateless', 'Stateful' - :type service_kind: str or - ~azure.servicefabric.models.ReplicaHealthReportServiceKind - :param health_information: Describes the health information for the - health report. This information needs to be present in all of the - health reports sent to the health manager. - :type health_information: - ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be - sent immediately. - A health report is sent to a Service Fabric gateway Application, which - forwards to the health store. - If Immediate is set to true, the report is sent immediately from HTTP - Gateway to the health store, regardless of the fabric client settings - that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as - possible. - Depending on timing and other conditions, sending the report may still - fail, for example if the HTTP Gateway is closed or the message doesn't - reach the Gateway. - If Immediate is set to false, the report is sent based on the health - client settings from the HTTP Gateway. Therefore, it will be batched - according to the HealthReportSendInterval configuration. - This is the recommended setting because it allows the health client to - optimize health reporting messages to health store as well as health - report processing. - By default, reports are not sent immediately. - :type immediate: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.report_replica_health.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ServiceKind'] = self._serialize.query("service_kind", service_kind, 'str') - if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - report_replica_health.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/ReportHealth'} - - async def get_deployed_service_replica_info_list( - self, node_name, application_id, partition_id=None, service_manifest_name=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the list of replicas deployed on a Service Fabric node. - - Gets the list containing the information about replicas deployed on a - Service Fabric node. The information include partition ID, replica ID, - status of the replica, name of the service, name of the service type, - and other information. Use PartitionId or ServiceManifestName query - parameters to return information about the deployed replicas matching - the specified values for those parameters. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param service_manifest_name: The name of a service manifest - registered as part of an application type in a Service Fabric cluster. - :type service_manifest_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.DeployedServiceReplicaInfo] - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_replica_info_list.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if partition_id is not None: - query_parameters['PartitionId'] = self._serialize.query("partition_id", partition_id, 'str') - if service_manifest_name is not None: - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[DeployedServiceReplicaInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_replica_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetReplicas'} - - async def get_deployed_service_replica_detail_info( - self, node_name, partition_id, replica_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the details of replica deployed on a Service Fabric node. - - Gets the details of the replica deployed on a Service Fabric node. The - information includes service kind, service name, current service - operation, current service operation start date time, partition ID, - replica/instance ID, reported load, and other information. - - :param node_name: The name of the node. - :type node_name: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeployedServiceReplicaDetailInfo or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.DeployedServiceReplicaDetailInfo - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_replica_detail_info.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeployedServiceReplicaDetailInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_replica_detail_info.metadata = {'url': '/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetDetail'} - - async def get_deployed_service_replica_detail_info_by_partition_id( - self, node_name, partition_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the details of replica deployed on a Service Fabric node. - - Gets the details of the replica deployed on a Service Fabric node. The - information includes service kind, service name, current service - operation, current service operation start date time, partition ID, - replica/instance ID, reported load, and other information. - - :param node_name: The name of the node. - :type node_name: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeployedServiceReplicaDetailInfo or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.DeployedServiceReplicaDetailInfo - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_replica_detail_info_by_partition_id.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeployedServiceReplicaDetailInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_replica_detail_info_by_partition_id.metadata = {'url': '/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas'} - - async def restart_replica( - self, node_name, partition_id, replica_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Restarts a service replica of a persisted service running on a node. - - Restarts a service replica of a persisted service running on a node. - Warning - There are no safety checks performed when this API is used. - Incorrect use of this API can lead to availability loss for stateful - services. - - :param node_name: The name of the node. - :type node_name: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.restart_replica.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_replica.metadata = {'url': '/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Restart'} - - async def remove_replica( - self, node_name, partition_id, replica_id, force_remove=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Removes a service replica running on a node. - - This API simulates a Service Fabric replica failure by removing a - replica from a Service Fabric cluster. The removal closes the replica, - transitions the replica to the role None, and then removes all of the - state information of the replica from the cluster. This API tests the - replica state removal path, and simulates the report fault permanent - path through client APIs. Warning - There are no safety checks - performed when this API is used. Incorrect use of this API can lead to - data loss for stateful services. In addition, the forceRemove flag - impacts all other replicas hosted in the same process. - - :param node_name: The name of the node. - :type node_name: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param force_remove: Remove a Service Fabric application or service - forcefully without going through the graceful shutdown sequence. This - parameter can be used to forcefully delete an application or service - for which delete is timing out due to issues in the service code that - prevents graceful close of replicas. - :type force_remove: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.remove_replica.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if force_remove is not None: - query_parameters['ForceRemove'] = self._serialize.query("force_remove", force_remove, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - remove_replica.metadata = {'url': '/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Delete'} - - async def get_deployed_service_package_info_list( - self, node_name, application_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the list of service packages deployed on a Service Fabric node. - - Returns the information about the service packages deployed on a - Service Fabric node for the given application. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.DeployedServicePackageInfo] - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_package_info_list.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[DeployedServicePackageInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_package_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages'} - - async def get_deployed_service_package_info_list_by_name( - self, node_name, application_id, service_package_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the list of service packages deployed on a Service Fabric node - matching exactly the specified name. - - Returns the information about the service packages deployed on a - Service Fabric node for the given application. These results are of - service packages whose name match exactly the service package name - specified as the parameter. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_package_name: The name of the service package. - :type service_package_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.DeployedServicePackageInfo] - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_package_info_list_by_name.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'servicePackageName': self._serialize.url("service_package_name", service_package_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[DeployedServicePackageInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_package_info_list_by_name.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}'} - - async def get_deployed_service_package_health( - self, node_name, application_id, service_package_name, events_health_state_filter=0, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the information about health of a service package for a specific - application deployed for a Service Fabric node and application. - - Gets the information about health of a service package for a specific - application deployed on a Service Fabric node. Use - EventsHealthStateFilter to optionally filter for the collection of - HealthEvent objects reported on the deployed service package based on - health state. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_package_name: The name of the service package. - :type service_package_name: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeployedServicePackageHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.DeployedServicePackageHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_package_health.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'servicePackageName': self._serialize.url("service_package_name", service_package_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeployedServicePackageHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_package_health.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth'} - - async def get_deployed_service_package_health_using_policy( - self, node_name, application_id, service_package_name, events_health_state_filter=0, application_health_policy=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the information about health of service package for a specific - application deployed on a Service Fabric node using the specified - policy. - - Gets the information about health of a service package for a specific - application deployed on a Service Fabric node. using the specified - policy. Use EventsHealthStateFilter to optionally filter for the - collection of HealthEvent objects reported on the deployed service - package based on health state. Use ApplicationHealthPolicy to - optionally override the health policies used to evaluate the health. - This API only uses 'ConsiderWarningAsError' field of the - ApplicationHealthPolicy. The rest of the fields are ignored while - evaluating the health of the deployed service package. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_package_name: The name of the service package. - :type service_package_name: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param application_health_policy: Describes the health policies used - to evaluate the health of an application or one of its children. - If not present, the health evaluation uses the health policy from - application manifest or the default health policy. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeployedServicePackageHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.DeployedServicePackageHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_package_health_using_policy.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'servicePackageName': self._serialize.url("service_package_name", service_package_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeployedServicePackageHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_package_health_using_policy.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth'} - - async def report_deployed_service_package_health( - self, node_name, application_id, service_package_name, health_information, immediate=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Sends a health report on the Service Fabric deployed service package. - - Reports health state of the service package of the application deployed - on a Service Fabric node. The report must contain the information about - the source of the health report and property on which it is reported. - The report is sent to a Service Fabric gateway Service, which forwards - to the health store. - The report may be accepted by the gateway, but rejected by the health - store after extra validation. - For example, the health store may reject the report because of an - invalid parameter, like a stale sequence number. - To see whether the report was applied in the health store, get deployed - service package health and check that the report appears in the - HealthEvents section. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_package_name: The name of the service package. - :type service_package_name: str - :param health_information: Describes the health information for the - health report. This information needs to be present in all of the - health reports sent to the health manager. - :type health_information: - ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be - sent immediately. - A health report is sent to a Service Fabric gateway Application, which - forwards to the health store. - If Immediate is set to true, the report is sent immediately from HTTP - Gateway to the health store, regardless of the fabric client settings - that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as - possible. - Depending on timing and other conditions, sending the report may still - fail, for example if the HTTP Gateway is closed or the message doesn't - reach the Gateway. - If Immediate is set to false, the report is sent based on the health - client settings from the HTTP Gateway. Therefore, it will be batched - according to the HealthReportSendInterval configuration. - This is the recommended setting because it allows the health client to - optimize health reporting messages to health store as well as health - report processing. - By default, reports are not sent immediately. - :type immediate: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.report_deployed_service_package_health.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'servicePackageName': self._serialize.url("service_package_name", service_package_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - report_deployed_service_package_health.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/ReportHealth'} - - async def deploy_service_package_to_node( - self, node_name, deploy_service_package_to_node_description, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Downloads all of the code packages associated with specified service - manifest on the specified node. - - This API provides a way to download code packages including the - container images on a specific node outside of the normal application - deployment and upgrade path. This is useful for the large code packages - and container images to be present on the node before the actual - application deployment and upgrade, thus significantly reducing the - total time required for the deployment or upgrade. - - :param node_name: The name of the node. - :type node_name: str - :param deploy_service_package_to_node_description: Describes - information for deploying a service package to a Service Fabric node. - :type deploy_service_package_to_node_description: - ~azure.servicefabric.models.DeployServicePackageToNodeDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.deploy_service_package_to_node.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(deploy_service_package_to_node_description, 'DeployServicePackageToNodeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - deploy_service_package_to_node.metadata = {'url': '/Nodes/{nodeName}/$/DeployServicePackage'} - - async def get_deployed_code_package_info_list( - self, node_name, application_id, service_manifest_name=None, code_package_name=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the list of code packages deployed on a Service Fabric node. - - Gets the list of code packages deployed on a Service Fabric node for - the given application. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_manifest_name: The name of a service manifest - registered as part of an application type in a Service Fabric cluster. - :type service_manifest_name: str - :param code_package_name: The name of code package specified in - service manifest registered as part of an application type in a - Service Fabric cluster. - :type code_package_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.DeployedCodePackageInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_code_package_info_list.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if service_manifest_name is not None: - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') - if code_package_name is not None: - query_parameters['CodePackageName'] = self._serialize.query("code_package_name", code_package_name, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[DeployedCodePackageInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_code_package_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages'} - - async def restart_deployed_code_package( - self, node_name, application_id, restart_deployed_code_package_description, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Restarts a code package deployed on a Service Fabric node in a cluster. - - Restarts a code package deployed on a Service Fabric node in a cluster. - This aborts the code package process, which will restart all the user - service replicas hosted in that process. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param restart_deployed_code_package_description: Describes the - deployed code package on Service Fabric node to restart. - :type restart_deployed_code_package_description: - ~azure.servicefabric.models.RestartDeployedCodePackageDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.restart_deployed_code_package.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restart_deployed_code_package_description, 'RestartDeployedCodePackageDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_deployed_code_package.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/Restart'} - - async def get_container_logs_deployed_on_node( - self, node_name, application_id, service_manifest_name, code_package_name, tail=None, previous=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the container logs for container deployed on a Service Fabric - node. - - Gets the container logs for container deployed on a Service Fabric node - for the given code package. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_manifest_name: The name of a service manifest - registered as part of an application type in a Service Fabric cluster. - :type service_manifest_name: str - :param code_package_name: The name of code package specified in - service manifest registered as part of an application type in a - Service Fabric cluster. - :type code_package_name: str - :param tail: Number of lines to show from the end of the logs. Default - is 100. 'all' to show the complete logs. - :type tail: str - :param previous: Specifies whether to get container logs from - exited/dead containers of the code package instance. - :type previous: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContainerLogs or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ContainerLogs or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.2" - - # Construct URL - url = self.get_container_logs_deployed_on_node.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') - query_parameters['CodePackageName'] = self._serialize.query("code_package_name", code_package_name, 'str') - if tail is not None: - query_parameters['Tail'] = self._serialize.query("tail", tail, 'str') - if previous is not None: - query_parameters['Previous'] = self._serialize.query("previous", previous, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ContainerLogs', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_container_logs_deployed_on_node.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerLogs'} - - async def invoke_container_api( - self, node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, container_api_request_body, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Invoke container API on a container deployed on a Service Fabric node. - - Invoke container API on a container deployed on a Service Fabric node - for the given code package. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_manifest_name: The name of a service manifest - registered as part of an application type in a Service Fabric cluster. - :type service_manifest_name: str - :param code_package_name: The name of code package specified in - service manifest registered as part of an application type in a - Service Fabric cluster. - :type code_package_name: str - :param code_package_instance_id: ID that uniquely identifies a code - package instance deployed on a service fabric node. - :type code_package_instance_id: str - :param container_api_request_body: Parameters for making container API - call - :type container_api_request_body: - ~azure.servicefabric.models.ContainerApiRequestBody - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContainerApiResponse or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ContainerApiResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.2" - - # Construct URL - url = self.invoke_container_api.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') - query_parameters['CodePackageName'] = self._serialize.query("code_package_name", code_package_name, 'str') - query_parameters['CodePackageInstanceId'] = self._serialize.query("code_package_instance_id", code_package_instance_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(container_api_request_body, 'ContainerApiRequestBody') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ContainerApiResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - invoke_container_api.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerApi'} - - async def create_compose_deployment( - self, create_compose_deployment_description, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Creates a Service Fabric compose deployment. - - Compose is a file format that describes multi-container applications. - This API allows deploying container based applications defined in - compose format in a Service Fabric cluster. Once the deployment is - created, its status can be tracked via the `GetComposeDeploymentStatus` - API. - - :param create_compose_deployment_description: Describes the compose - deployment that needs to be created. - :type create_compose_deployment_description: - ~azure.servicefabric.models.CreateComposeDeploymentDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0-preview" - - # Construct URL - url = self.create_compose_deployment.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(create_compose_deployment_description, 'CreateComposeDeploymentDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - create_compose_deployment.metadata = {'url': '/ComposeDeployments/$/Create'} - - async def get_compose_deployment_status( - self, deployment_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets information about a Service Fabric compose deployment. - - Returns the status of the compose deployment that was created or in the - process of being created in the Service Fabric cluster and whose name - matches the one specified as the parameter. The response includes the - name, status, and other details about the deployment. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ComposeDeploymentStatusInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ComposeDeploymentStatusInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0-preview" - - # Construct URL - url = self.get_compose_deployment_status.metadata['url'] - path_format_arguments = { - 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ComposeDeploymentStatusInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_compose_deployment_status.metadata = {'url': '/ComposeDeployments/{deploymentName}'} - - async def get_compose_deployment_status_list( - self, continuation_token=None, max_results=0, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the list of compose deployments created in the Service Fabric - cluster. - - Gets the status about the compose deployments that were created or in - the process of being created in the Service Fabric cluster. The - response includes the name, status, and other details about the compose - deployments. If the list of deployments do not fit in a page, one page - of results is returned as well as a continuation token, which can be - used to get the next page. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedComposeDeploymentStatusInfoList or ClientRawResponse if - raw=true - :rtype: - ~azure.servicefabric.models.PagedComposeDeploymentStatusInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0-preview" - - # Construct URL - url = self.get_compose_deployment_status_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedComposeDeploymentStatusInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_compose_deployment_status_list.metadata = {'url': '/ComposeDeployments'} - - async def get_compose_deployment_upgrade_progress( - self, deployment_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets details for the latest upgrade performed on this Service Fabric - compose deployment. - - Returns the information about the state of the compose deployment - upgrade along with details to aid debugging application health issues. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ComposeDeploymentUpgradeProgressInfo or ClientRawResponse if - raw=true - :rtype: - ~azure.servicefabric.models.ComposeDeploymentUpgradeProgressInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0-preview" - - # Construct URL - url = self.get_compose_deployment_upgrade_progress.metadata['url'] - path_format_arguments = { - 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ComposeDeploymentUpgradeProgressInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_compose_deployment_upgrade_progress.metadata = {'url': '/ComposeDeployments/{deploymentName}/$/GetUpgradeProgress'} - - async def remove_compose_deployment( - self, deployment_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Service Fabric compose deployment from cluster. - - Deletes an existing Service Fabric compose deployment. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0-preview" - - # Construct URL - url = self.remove_compose_deployment.metadata['url'] - path_format_arguments = { - 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - remove_compose_deployment.metadata = {'url': '/ComposeDeployments/{deploymentName}/$/Delete'} - - async def start_compose_deployment_upgrade( - self, deployment_name, compose_deployment_upgrade_description, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Starts upgrading a compose deployment in the Service Fabric cluster. - - Validates the supplied upgrade parameters and starts upgrading the - deployment if the parameters are valid. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param compose_deployment_upgrade_description: Parameters for - upgrading compose deployment. - :type compose_deployment_upgrade_description: - ~azure.servicefabric.models.ComposeDeploymentUpgradeDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0-preview" - - # Construct URL - url = self.start_compose_deployment_upgrade.metadata['url'] - path_format_arguments = { - 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(compose_deployment_upgrade_description, 'ComposeDeploymentUpgradeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_compose_deployment_upgrade.metadata = {'url': '/ComposeDeployments/{deploymentName}/$/Upgrade'} - - async def start_rollback_compose_deployment_upgrade( - self, deployment_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Starts rolling back a compose deployment upgrade in the Service Fabric - cluster. - - Rollback a service fabric compose deployment upgrade. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4-preview" - - # Construct URL - url = self.start_rollback_compose_deployment_upgrade.metadata['url'] - path_format_arguments = { - 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_rollback_compose_deployment_upgrade.metadata = {'url': '/ComposeDeployments/{deploymentName}/$/RollbackUpgrade'} - - async def get_chaos( - self, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Get the status of Chaos. - - Get the status of Chaos indicating whether or not Chaos is running, the - Chaos parameters used for running Chaos and the status of the Chaos - Schedule. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Chaos or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.Chaos or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.2" - - # Construct URL - url = self.get_chaos.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Chaos', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_chaos.metadata = {'url': '/Tools/Chaos'} - - async def start_chaos( - self, chaos_parameters, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Starts Chaos in the cluster. - - If Chaos is not already running in the cluster, it starts Chaos with - the passed in Chaos parameters. - If Chaos is already running when this call is made, the call fails with - the error code FABRIC_E_CHAOS_ALREADY_RUNNING. - Refer to the article [Induce controlled Chaos in Service Fabric - clusters](https://docs.microsoft.com/azure/service-fabric/service-fabric-controlled-chaos) - for more details. - - :param chaos_parameters: Describes all the parameters to configure a - Chaos run. - :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.start_chaos.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(chaos_parameters, 'ChaosParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_chaos.metadata = {'url': '/Tools/Chaos/$/Start'} - - async def stop_chaos( - self, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Stops Chaos if it is running in the cluster and put the Chaos Schedule - in a stopped state. - - Stops Chaos from executing new faults. In-flight faults will continue - to execute until they are complete. The current Chaos Schedule is put - into a stopped state. - Once a schedule is stopped, it will stay in the stopped state and not - be used to Chaos Schedule new runs of Chaos. A new Chaos Schedule must - be set in order to resume scheduling. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.stop_chaos.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_chaos.metadata = {'url': '/Tools/Chaos/$/Stop'} - - async def get_chaos_events( - self, continuation_token=None, start_time_utc=None, end_time_utc=None, max_results=0, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the next segment of the Chaos events based on the continuation - token or the time range. - - To get the next segment of the Chaos events, you can specify the - ContinuationToken. To get the start of a new segment of Chaos events, - you can specify the time range - through StartTimeUtc and EndTimeUtc. You cannot specify both the - ContinuationToken and the time range in the same call. - When there are more than 100 Chaos events, the Chaos events are - returned in multiple segments where a segment contains no more than 100 - Chaos events and to get the next segment you make a call to this API - with the continuation token. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param start_time_utc: The Windows file time representing the start - time of the time range for which a Chaos report is to be generated. - Consult [DateTime.ToFileTimeUtc - Method](https://msdn.microsoft.com/library/system.datetime.tofiletimeutc(v=vs.110).aspx) - for details. - :type start_time_utc: str - :param end_time_utc: The Windows file time representing the end time - of the time range for which a Chaos report is to be generated. Consult - [DateTime.ToFileTimeUtc - Method](https://msdn.microsoft.com/library/system.datetime.tofiletimeutc(v=vs.110).aspx) - for details. - :type end_time_utc: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ChaosEventsSegment or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ChaosEventsSegment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.2" - - # Construct URL - url = self.get_chaos_events.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if start_time_utc is not None: - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - if end_time_utc is not None: - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ChaosEventsSegment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_chaos_events.metadata = {'url': '/Tools/Chaos/Events'} - - async def get_chaos_schedule( - self, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Get the Chaos Schedule defining when and how to run Chaos. - - Gets the version of the Chaos Schedule in use and the Chaos Schedule - that defines when and how to run Chaos. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ChaosScheduleDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ChaosScheduleDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.2" - - # Construct URL - url = self.get_chaos_schedule.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ChaosScheduleDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_chaos_schedule.metadata = {'url': '/Tools/Chaos/Schedule'} - - async def post_chaos_schedule( - self, timeout=60, version=None, schedule=None, *, custom_headers=None, raw=False, **operation_config): - """Set the schedule used by Chaos. - - Chaos will automatically schedule runs based on the Chaos Schedule. - The Chaos Schedule will be updated if the provided version matches the - version on the server. - When updating the Chaos Schedule, the version on the server is - incremented by 1. - The version on the server will wrap back to 0 after reaching a large - number. - If Chaos is running when this call is made, the call will fail. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param version: The version number of the Schedule. - :type version: int - :param schedule: Defines the schedule used by Chaos. - :type schedule: ~azure.servicefabric.models.ChaosSchedule - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - chaos_schedule = models.ChaosScheduleDescription(version=version, schedule=schedule) - - api_version = "6.2" - - # Construct URL - url = self.post_chaos_schedule.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(chaos_schedule, 'ChaosScheduleDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - post_chaos_schedule.metadata = {'url': '/Tools/Chaos/Schedule'} - - async def upload_file( - self, content_path, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Uploads contents of the file to the image store. - - Uploads contents of the file to the image store. Use this API if the - file is small enough to upload again if the connection fails. The - file's data needs to be added to the request body. The contents will be - uploaded to the specified path. Image store service uses a mark file to - indicate the availability of the folder. The mark file is an empty file - named "_.dir". The mark file is generated by the image store service - when all files in a folder are uploaded. When using File-by-File - approach to upload application package in REST, the image store service - isn't aware of the file hierarchy of the application package; you need - to create a mark file per folder and upload it last, to let the image - store service know that the folder is complete. - - :param content_path: Relative path to file or folder in the image - store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.upload_file.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - upload_file.metadata = {'url': '/ImageStore/{contentPath}'} - - async def get_image_store_content( - self, content_path, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the image store content information. - - Returns the information about the image store content at the specified - contentPath. The contentPath is relative to the root of the image - store. - - :param content_path: Relative path to file or folder in the image - store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ImageStoreContent or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ImageStoreContent or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.2" - - # Construct URL - url = self.get_image_store_content.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ImageStoreContent', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_image_store_content.metadata = {'url': '/ImageStore/{contentPath}'} - - async def delete_image_store_content( - self, content_path, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Deletes existing image store content. - - Deletes existing image store content being found within the given image - store relative path. This command can be used to delete uploaded - application packages once they are provisioned. - - :param content_path: Relative path to file or folder in the image - store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.delete_image_store_content.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_image_store_content.metadata = {'url': '/ImageStore/{contentPath}'} - - async def get_image_store_root_content( - self, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the content information at the root of the image store. - - Returns the information about the image store content at the root of - the image store. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ImageStoreContent or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ImageStoreContent or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_image_store_root_content.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ImageStoreContent', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_image_store_root_content.metadata = {'url': '/ImageStore'} - - async def copy_image_store_content( - self, image_store_copy_description, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Copies image store content internally. - - Copies the image store content from the source image store relative - path to the destination image store relative path. - - :param image_store_copy_description: Describes the copy description - for the image store. - :type image_store_copy_description: - ~azure.servicefabric.models.ImageStoreCopyDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.copy_image_store_content.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(image_store_copy_description, 'ImageStoreCopyDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - copy_image_store_content.metadata = {'url': '/ImageStore/$/Copy'} - - async def delete_image_store_upload_session( - self, session_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Cancels an image store upload session. - - The DELETE request will cause the existing upload session to expire and - remove any previously uploaded file chunks. - - :param session_id: A GUID generated by the user for a file uploading. - It identifies an image store upload session which keeps track of all - file chunks until it is committed. - :type session_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.delete_image_store_upload_session.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['session-id'] = self._serialize.query("session_id", session_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_image_store_upload_session.metadata = {'url': '/ImageStore/$/DeleteUploadSession'} - - async def commit_image_store_upload_session( - self, session_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Commit an image store upload session. - - When all file chunks have been uploaded, the upload session needs to be - committed explicitly to complete the upload. Image store preserves the - upload session until the expiration time, which is 30 minutes after the - last chunk received. . - - :param session_id: A GUID generated by the user for a file uploading. - It identifies an image store upload session which keeps track of all - file chunks until it is committed. - :type session_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.commit_image_store_upload_session.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['session-id'] = self._serialize.query("session_id", session_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - commit_image_store_upload_session.metadata = {'url': '/ImageStore/$/CommitUploadSession'} - - async def get_image_store_upload_session_by_id( - self, session_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Get the image store upload session by ID. - - Gets the image store upload session identified by the given ID. User - can query the upload session at any time during uploading. . - - :param session_id: A GUID generated by the user for a file uploading. - It identifies an image store upload session which keeps track of all - file chunks until it is committed. - :type session_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: UploadSession or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.UploadSession or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_image_store_upload_session_by_id.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['session-id'] = self._serialize.query("session_id", session_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('UploadSession', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_image_store_upload_session_by_id.metadata = {'url': '/ImageStore/$/GetUploadSession'} - - async def get_image_store_upload_session_by_path( - self, content_path, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Get the image store upload session by relative path. - - Gets the image store upload session associated with the given image - store relative path. User can query the upload session at any time - during uploading. . - - :param content_path: Relative path to file or folder in the image - store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: UploadSession or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.UploadSession or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_image_store_upload_session_by_path.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('UploadSession', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_image_store_upload_session_by_path.metadata = {'url': '/ImageStore/{contentPath}/$/GetUploadSession'} - - async def upload_file_chunk( - self, content_path, session_id, content_range, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Uploads a file chunk to the image store relative path. - - Uploads a file chunk to the image store with the specified upload - session ID and image store relative path. This API allows user to - resume the file upload operation. user doesn't have to restart the file - upload from scratch whenever there is a network interruption. Use this - option if the file size is large. - To perform a resumable file upload, user need to break the file into - multiple chunks and upload these chunks to the image store one-by-one. - Chunks don't have to be uploaded in order. If the file represented by - the image store relative path already exists, it will be overwritten - when the upload session commits. - - :param content_path: Relative path to file or folder in the image - store from its root. - :type content_path: str - :param session_id: A GUID generated by the user for a file uploading. - It identifies an image store upload session which keeps track of all - file chunks until it is committed. - :type session_id: str - :param content_range: When uploading file chunks to the image store, - the Content-Range header field need to be configured and sent with a - request. The format should looks like "bytes - {First-Byte-Position}-{Last-Byte-Position}/{File-Length}". For - example, Content-Range:bytes 300-5000/20000 indicates that user is - sending bytes 300 through 5,000 and the total file length is 20,000 - bytes. - :type content_range: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.upload_file_chunk.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['session-id'] = self._serialize.query("session_id", session_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['Content-Range'] = self._serialize.header("content_range", content_range, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - upload_file_chunk.metadata = {'url': '/ImageStore/{contentPath}/$/UploadChunk'} - - async def get_image_store_root_folder_size( - self, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Get the folder size at the root of the image store. - - Returns the total size of files at the root and children folders in - image store. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FolderSizeInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.FolderSizeInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.5" - - # Construct URL - url = self.get_image_store_root_folder_size.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FolderSizeInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_image_store_root_folder_size.metadata = {'url': '/ImageStore/$/FolderSize'} - - async def get_image_store_folder_size( - self, content_path, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Get the size of a folder in image store. - - Gets the total size of file under a image store folder, specified by - contentPath. The contentPath is relative to the root of the image - store. - - :param content_path: Relative path to file or folder in the image - store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FolderSizeInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.FolderSizeInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.5" - - # Construct URL - url = self.get_image_store_folder_size.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('FolderSizeInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_image_store_folder_size.metadata = {'url': '/ImageStore/{contentPath}/$/FolderSize'} - - async def get_image_store_info( - self, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the overall ImageStore information. - - Returns information about the primary ImageStore replica, such as disk - capacity and available disk space at the node it is on, and several - categories of the ImageStore's file system usage. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ImageStoreInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ImageStoreInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.5" - - # Construct URL - url = self.get_image_store_info.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ImageStoreInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_image_store_info.metadata = {'url': '/ImageStore/$/Info'} - - async def invoke_infrastructure_command( - self, command, service_id=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Invokes an administrative command on the given Infrastructure Service - instance. - - For clusters that have one or more instances of the Infrastructure - Service configured, - this API provides a way to send infrastructure-specific commands to a - particular - instance of the Infrastructure Service. - Available commands and their corresponding response formats vary - depending upon - the infrastructure on which the cluster is running. - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param command: The text of the command to be invoked. The content of - the command is infrastructure-specific. - :type command: str - :param service_id: The identity of the infrastructure service. This is - the full name of the infrastructure service without the 'fabric:' URI - scheme. This parameter required only for the cluster that has more - than one instance of infrastructure service running. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.invoke_infrastructure_command.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['Command'] = self._serialize.query("command", command, 'str') - if service_id is not None: - query_parameters['ServiceId'] = self._serialize.query("service_id", service_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - invoke_infrastructure_command.metadata = {'url': '/$/InvokeInfrastructureCommand'} - - async def invoke_infrastructure_query( - self, command, service_id=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Invokes a read-only query on the given infrastructure service instance. - - For clusters that have one or more instances of the Infrastructure - Service configured, - this API provides a way to send infrastructure-specific queries to a - particular - instance of the Infrastructure Service. - Available commands and their corresponding response formats vary - depending upon - the infrastructure on which the cluster is running. - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param command: The text of the command to be invoked. The content of - the command is infrastructure-specific. - :type command: str - :param service_id: The identity of the infrastructure service. This is - the full name of the infrastructure service without the 'fabric:' URI - scheme. This parameter required only for the cluster that has more - than one instance of infrastructure service running. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.invoke_infrastructure_query.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['Command'] = self._serialize.query("command", command, 'str') - if service_id is not None: - query_parameters['ServiceId'] = self._serialize.query("service_id", service_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - invoke_infrastructure_query.metadata = {'url': '/$/InvokeInfrastructureQuery'} - - async def start_data_loss( - self, service_id, partition_id, operation_id, data_loss_mode, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """This API will induce data loss for the specified partition. It will - trigger a call to the OnDataLossAsync API of the partition. - - This API will induce data loss for the specified partition. It will - trigger a call to the OnDataLoss API of the partition. - Actual data loss will depend on the specified DataLossMode. - - PartialDataLoss - Only a quorum of replicas are removed and - OnDataLoss is triggered for the partition but actual data loss depends - on the presence of in-flight replication. - - FullDataLoss - All replicas are removed hence all data is lost and - OnDataLoss is triggered. - This API should only be called with a stateful service as the target. - Calling this API with a system service as the target is not advised. - Note: Once this API has been called, it cannot be reversed. Calling - CancelOperation will only stop execution and clean up internal system - state. - It will not restore data if the command has progressed far enough to - cause data loss. - Call the GetDataLossProgress API with the same OperationId to return - information on the operation started with this API. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param data_loss_mode: This enum is passed to the StartDataLoss API to - indicate what type of data loss to induce. Possible values include: - 'Invalid', 'PartialDataLoss', 'FullDataLoss' - :type data_loss_mode: str or ~azure.servicefabric.models.DataLossMode - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.start_data_loss.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - query_parameters['DataLossMode'] = self._serialize.query("data_loss_mode", data_loss_mode, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_data_loss.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartDataLoss'} - - async def get_data_loss_progress( - self, service_id, partition_id, operation_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the progress of a partition data loss operation started using the - StartDataLoss API. - - Gets the progress of a data loss operation started with StartDataLoss, - using the OperationId. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PartitionDataLossProgress or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PartitionDataLossProgress or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_data_loss_progress.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PartitionDataLossProgress', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_data_loss_progress.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetDataLossProgress'} - - async def start_quorum_loss( - self, service_id, partition_id, operation_id, quorum_loss_mode, quorum_loss_duration, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Induces quorum loss for a given stateful service partition. - - This API is useful for a temporary quorum loss situation on your - service. - Call the GetQuorumLossProgress API with the same OperationId to return - information on the operation started with this API. - This can only be called on stateful persisted (HasPersistedState==true) - services. Do not use this API on stateless services or stateful - in-memory only services. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param quorum_loss_mode: This enum is passed to the StartQuorumLoss - API to indicate what type of quorum loss to induce. Possible values - include: 'Invalid', 'QuorumReplicas', 'AllReplicas' - :type quorum_loss_mode: str or - ~azure.servicefabric.models.QuorumLossMode - :param quorum_loss_duration: The amount of time for which the - partition will be kept in quorum loss. This must be specified in - seconds. - :type quorum_loss_duration: int - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.start_quorum_loss.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - query_parameters['QuorumLossMode'] = self._serialize.query("quorum_loss_mode", quorum_loss_mode, 'str') - query_parameters['QuorumLossDuration'] = self._serialize.query("quorum_loss_duration", quorum_loss_duration, 'int') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_quorum_loss.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartQuorumLoss'} - - async def get_quorum_loss_progress( - self, service_id, partition_id, operation_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the progress of a quorum loss operation on a partition started - using the StartQuorumLoss API. - - Gets the progress of a quorum loss operation started with - StartQuorumLoss, using the provided OperationId. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PartitionQuorumLossProgress or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PartitionQuorumLossProgress or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_quorum_loss_progress.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PartitionQuorumLossProgress', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_quorum_loss_progress.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetQuorumLossProgress'} - - async def start_partition_restart( - self, service_id, partition_id, operation_id, restart_partition_mode, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """This API will restart some or all replicas or instances of the - specified partition. - - This API is useful for testing failover. - If used to target a stateless service partition, RestartPartitionMode - must be AllReplicasOrInstances. - Call the GetPartitionRestartProgress API using the same OperationId to - get the progress. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param restart_partition_mode: Describe which partitions to restart. - Possible values include: 'Invalid', 'AllReplicasOrInstances', - 'OnlyActiveSecondaries' - :type restart_partition_mode: str or - ~azure.servicefabric.models.RestartPartitionMode - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.start_partition_restart.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - query_parameters['RestartPartitionMode'] = self._serialize.query("restart_partition_mode", restart_partition_mode, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_partition_restart.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartRestart'} - - async def get_partition_restart_progress( - self, service_id, partition_id, operation_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the progress of a PartitionRestart operation started using - StartPartitionRestart. - - Gets the progress of a PartitionRestart started with - StartPartitionRestart using the provided OperationId. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PartitionRestartProgress or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PartitionRestartProgress or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_partition_restart_progress.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PartitionRestartProgress', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_restart_progress.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetRestartProgress'} - - async def start_node_transition( - self, node_name, operation_id, node_transition_type, node_instance_id, stop_duration_in_seconds, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Starts or stops a cluster node. - - Starts or stops a cluster node. A cluster node is a process, not the - OS instance itself. To start a node, pass in "Start" for the - NodeTransitionType parameter. - To stop a node, pass in "Stop" for the NodeTransitionType parameter. - This API starts the operation - when the API returns the node may not - have finished transitioning yet. - Call GetNodeTransitionProgress with the same OperationId to get the - progress of the operation. - - :param node_name: The name of the node. - :type node_name: str - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param node_transition_type: Indicates the type of transition to - perform. NodeTransitionType.Start will start a stopped node. - NodeTransitionType.Stop will stop a node that is up. Possible values - include: 'Invalid', 'Start', 'Stop' - :type node_transition_type: str or - ~azure.servicefabric.models.NodeTransitionType - :param node_instance_id: The node instance ID of the target node. - This can be determined through GetNodeInfo API. - :type node_instance_id: str - :param stop_duration_in_seconds: The duration, in seconds, to keep the - node stopped. The minimum value is 600, the maximum is 14400. After - this time expires, the node will automatically come back up. - :type stop_duration_in_seconds: int - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.start_node_transition.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - query_parameters['NodeTransitionType'] = self._serialize.query("node_transition_type", node_transition_type, 'str') - query_parameters['NodeInstanceId'] = self._serialize.query("node_instance_id", node_instance_id, 'str') - query_parameters['StopDurationInSeconds'] = self._serialize.query("stop_duration_in_seconds", stop_duration_in_seconds, 'int', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_node_transition.metadata = {'url': '/Faults/Nodes/{nodeName}/$/StartTransition/'} - - async def get_node_transition_progress( - self, node_name, operation_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the progress of an operation started using StartNodeTransition. - - Gets the progress of an operation started with StartNodeTransition - using the provided OperationId. - - :param node_name: The name of the node. - :type node_name: str - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NodeTransitionProgress or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.NodeTransitionProgress or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_node_transition_progress.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NodeTransitionProgress', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_node_transition_progress.metadata = {'url': '/Faults/Nodes/{nodeName}/$/GetTransitionProgress'} - - async def get_fault_operation_list( - self, type_filter=65535, state_filter=65535, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets a list of user-induced fault operations filtered by provided - input. - - Gets the list of user-induced fault operations filtered by provided - input. - - :param type_filter: Used to filter on OperationType for user-induced - operations. - - 65535 - select all - - 1 - select PartitionDataLoss. - - 2 - select PartitionQuorumLoss. - - 4 - select PartitionRestart. - - 8 - select NodeTransition. - :type type_filter: int - :param state_filter: Used to filter on OperationState's for - user-induced operations. - - 65535 - select All - - 1 - select Running - - 2 - select RollingBack - - 8 - select Completed - - 16 - select Faulted - - 32 - select Cancelled - - 64 - select ForceCancelled - :type state_filter: int - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.OperationStatus] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_fault_operation_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['TypeFilter'] = self._serialize.query("type_filter", type_filter, 'int') - query_parameters['StateFilter'] = self._serialize.query("state_filter", state_filter, 'int') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[OperationStatus]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_fault_operation_list.metadata = {'url': '/Faults/'} - - async def cancel_operation( - self, operation_id, force=False, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Cancels a user-induced fault operation. - - The following APIs start fault operations that may be cancelled by - using CancelOperation: StartDataLoss, StartQuorumLoss, - StartPartitionRestart, StartNodeTransition. - If force is false, then the specified user-induced operation will be - gracefully stopped and cleaned up. If force is true, the command will - be aborted, and some internal state - may be left behind. Specifying force as true should be used with care. - Calling this API with force set to true is not allowed until this API - has already - been called on the same test command with force set to false first, or - unless the test command already has an OperationState of - OperationState.RollingBack. - Clarification: OperationState.RollingBack means that the system will - be/is cleaning up internal system state caused by executing the - command. It will not restore data if the - test command was to cause data loss. For example, if you call - StartDataLoss then call this API, the system will only clean up - internal state from running the command. - It will not restore the target partition's data, if the command - progressed far enough to cause data loss. - Important note: if this API is invoked with force==true, internal - state may be left behind. - - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param force: Indicates whether to gracefully roll back and clean up - internal system state modified by executing the user-induced - operation. - :type force: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.cancel_operation.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - query_parameters['Force'] = self._serialize.query("force", force, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - cancel_operation.metadata = {'url': '/Faults/$/Cancel'} - - async def create_backup_policy( - self, backup_policy_description, timeout=60, validate_connection=False, *, custom_headers=None, raw=False, **operation_config): - """Creates a backup policy. - - Creates a backup policy which can be associated later with a Service - Fabric application, service or a partition for periodic backup. - - :param backup_policy_description: Describes the backup policy. - :type backup_policy_description: - ~azure.servicefabric.models.BackupPolicyDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param validate_connection: Specifies whether to validate the storage - connection and credentials before creating or updating the backup - policies. - :type validate_connection: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.create_backup_policy.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if validate_connection is not None: - query_parameters['ValidateConnection'] = self._serialize.query("validate_connection", validate_connection, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - create_backup_policy.metadata = {'url': '/BackupRestore/BackupPolicies/$/Create'} - - async def delete_backup_policy( - self, backup_policy_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Deletes the backup policy. - - Deletes an existing backup policy. A backup policy must be created - before it can be deleted. A currently active backup policy, associated - with any Service Fabric application, service or partition, cannot be - deleted without first deleting the mapping. - - :param backup_policy_name: The name of the backup policy. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.delete_backup_policy.metadata['url'] - path_format_arguments = { - 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_policy.metadata = {'url': '/BackupRestore/BackupPolicies/{backupPolicyName}/$/Delete'} - - async def get_backup_policy_list( - self, continuation_token=None, max_results=0, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets all the backup policies configured. - - Get a list of all the backup policies configured. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedBackupPolicyDescriptionList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedBackupPolicyDescriptionList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_backup_policy_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedBackupPolicyDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_policy_list.metadata = {'url': '/BackupRestore/BackupPolicies'} - - async def get_backup_policy_by_name( - self, backup_policy_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets a particular backup policy by name. - - Gets a particular backup policy identified by {backupPolicyName}. - - :param backup_policy_name: The name of the backup policy. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupPolicyDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.BackupPolicyDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_backup_policy_by_name.metadata['url'] - path_format_arguments = { - 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupPolicyDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_policy_by_name.metadata = {'url': '/BackupRestore/BackupPolicies/{backupPolicyName}'} - - async def get_all_entities_backed_up_by_policy( - self, backup_policy_name, continuation_token=None, max_results=0, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the list of backup entities that are associated with this policy. - - Returns a list of Service Fabric application, service or partition - which are associated with this backup policy. - - :param backup_policy_name: The name of the backup policy. - :type backup_policy_name: str - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedBackupEntityList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedBackupEntityList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_all_entities_backed_up_by_policy.metadata['url'] - path_format_arguments = { - 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedBackupEntityList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_all_entities_backed_up_by_policy.metadata = {'url': '/BackupRestore/BackupPolicies/{backupPolicyName}/$/GetBackupEnabledEntities'} - - async def update_backup_policy( - self, backup_policy_description, backup_policy_name, timeout=60, validate_connection=False, *, custom_headers=None, raw=False, **operation_config): - """Updates the backup policy. - - Updates the backup policy identified by {backupPolicyName}. - - :param backup_policy_description: Describes the backup policy. - :type backup_policy_description: - ~azure.servicefabric.models.BackupPolicyDescription - :param backup_policy_name: The name of the backup policy. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param validate_connection: Specifies whether to validate the storage - connection and credentials before creating or updating the backup - policies. - :type validate_connection: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.update_backup_policy.metadata['url'] - path_format_arguments = { - 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if validate_connection is not None: - query_parameters['ValidateConnection'] = self._serialize.query("validate_connection", validate_connection, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update_backup_policy.metadata = {'url': '/BackupRestore/BackupPolicies/{backupPolicyName}/$/Update'} - - async def enable_application_backup( - self, application_id, backup_policy_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Enables periodic backup of stateful partitions under this Service - Fabric application. - - Enables periodic backup of stateful partitions which are part of this - Service Fabric application. Each partition is backed up individually as - per the specified backup policy description. - Note only C# based Reliable Actor and Reliable Stateful services are - currently supported for periodic backup. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param backup_policy_name: Name of the backup policy to be used for - enabling periodic backups. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - enable_backup_description = models.EnableBackupDescription(backup_policy_name=backup_policy_name) - - api_version = "6.4" - - # Construct URL - url = self.enable_application_backup.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(enable_backup_description, 'EnableBackupDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - enable_application_backup.metadata = {'url': '/Applications/{applicationId}/$/EnableBackup'} - - async def disable_application_backup( - self, application_id, clean_backup, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Disables periodic backup of Service Fabric application. - - Disables periodic backup of Service Fabric application which was - previously enabled. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param clean_backup: Boolean flag to delete backups. It can be set to - true for deleting all the backups which were created for the backup - entity that is getting disabled for backup. - :type clean_backup: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - disable_backup_description = None - if clean_backup is not None: - disable_backup_description = models.DisableBackupDescription(clean_backup=clean_backup) - - api_version = "6.4" - - # Construct URL - url = self.disable_application_backup.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if disable_backup_description is not None: - body_content = self._serialize.body(disable_backup_description, 'DisableBackupDescription') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_application_backup.metadata = {'url': '/Applications/{applicationId}/$/DisableBackup'} - - async def get_application_backup_configuration_info( - self, application_id, continuation_token=None, max_results=0, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the Service Fabric application backup configuration information. - - Gets the Service Fabric backup configuration information for the - application and the services and partitions under this application. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedBackupConfigurationInfoList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedBackupConfigurationInfoList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_application_backup_configuration_info.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedBackupConfigurationInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_backup_configuration_info.metadata = {'url': '/Applications/{applicationId}/$/GetBackupConfigurationInfo'} - - async def get_application_backup_list( - self, application_id, timeout=60, latest=False, start_date_time_filter=None, end_date_time_filter=None, continuation_token=None, max_results=0, *, custom_headers=None, raw=False, **operation_config): - """Gets the list of backups available for every partition in this - application. - - Returns a list of backups available for every partition in this Service - Fabric application. The server enumerates all the backups available at - the backup location configured in the backup policy. It also allows - filtering of the result based on start and end datetime or just - fetching the latest available backup for every partition. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param latest: Specifies whether to get only the most recent backup - available for a partition for the specified time range. - :type latest: bool - :param start_date_time_filter: Specify the start date time from which - to enumerate backups, in datetime format. The date time must be - specified in ISO8601 format. This is an optional parameter. If not - specified, all backups from the beginning are enumerated. - :type start_date_time_filter: datetime - :param end_date_time_filter: Specify the end date time till which to - enumerate backups, in datetime format. The date time must be specified - in ISO8601 format. This is an optional parameter. If not specified, - enumeration is done till the most recent backup. - :type end_date_time_filter: datetime - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedBackupInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedBackupInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_application_backup_list.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if latest is not None: - query_parameters['Latest'] = self._serialize.query("latest", latest, 'bool') - if start_date_time_filter is not None: - query_parameters['StartDateTimeFilter'] = self._serialize.query("start_date_time_filter", start_date_time_filter, 'iso-8601') - if end_date_time_filter is not None: - query_parameters['EndDateTimeFilter'] = self._serialize.query("end_date_time_filter", end_date_time_filter, 'iso-8601') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedBackupInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_backup_list.metadata = {'url': '/Applications/{applicationId}/$/GetBackups'} - - async def suspend_application_backup( - self, application_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Suspends periodic backup for the specified Service Fabric application. - - The application which is configured to take periodic backups, is - suspended for taking further backups till it is resumed again. This - operation applies to the entire application's hierarchy. It means all - the services and partitions under this application are now suspended - for backup. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.suspend_application_backup.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - suspend_application_backup.metadata = {'url': '/Applications/{applicationId}/$/SuspendBackup'} - - async def resume_application_backup( - self, application_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Resumes periodic backup of a Service Fabric application which was - previously suspended. - - The previously suspended Service Fabric application resumes taking - periodic backup as per the backup policy currently configured for the - same. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.resume_application_backup.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resume_application_backup.metadata = {'url': '/Applications/{applicationId}/$/ResumeBackup'} - - async def enable_service_backup( - self, service_id, backup_policy_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Enables periodic backup of stateful partitions under this Service - Fabric service. - - Enables periodic backup of stateful partitions which are part of this - Service Fabric service. Each partition is backed up individually as per - the specified backup policy description. In case the application, which - the service is part of, is already enabled for backup then this - operation would override the policy being used to take the periodic - backup for this service and its partitions (unless explicitly - overridden at the partition level). - Note only C# based Reliable Actor and Reliable Stateful services are - currently supported for periodic backup. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param backup_policy_name: Name of the backup policy to be used for - enabling periodic backups. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - enable_backup_description = models.EnableBackupDescription(backup_policy_name=backup_policy_name) - - api_version = "6.4" - - # Construct URL - url = self.enable_service_backup.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(enable_backup_description, 'EnableBackupDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - enable_service_backup.metadata = {'url': '/Services/{serviceId}/$/EnableBackup'} - - async def disable_service_backup( - self, service_id, clean_backup, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Disables periodic backup of Service Fabric service which was previously - enabled. - - Disables periodic backup of Service Fabric service which was previously - enabled. Backup must be explicitly enabled before it can be disabled. - In case the backup is enabled for the Service Fabric application, which - this service is part of, this service would continue to be periodically - backed up as per the policy mapped at the application level. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param clean_backup: Boolean flag to delete backups. It can be set to - true for deleting all the backups which were created for the backup - entity that is getting disabled for backup. - :type clean_backup: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - disable_backup_description = None - if clean_backup is not None: - disable_backup_description = models.DisableBackupDescription(clean_backup=clean_backup) - - api_version = "6.4" - - # Construct URL - url = self.disable_service_backup.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if disable_backup_description is not None: - body_content = self._serialize.body(disable_backup_description, 'DisableBackupDescription') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_service_backup.metadata = {'url': '/Services/{serviceId}/$/DisableBackup'} - - async def get_service_backup_configuration_info( - self, service_id, continuation_token=None, max_results=0, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the Service Fabric service backup configuration information. - - Gets the Service Fabric backup configuration information for the - service and the partitions under this service. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedBackupConfigurationInfoList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedBackupConfigurationInfoList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_service_backup_configuration_info.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedBackupConfigurationInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_backup_configuration_info.metadata = {'url': '/Services/{serviceId}/$/GetBackupConfigurationInfo'} - - async def get_service_backup_list( - self, service_id, timeout=60, latest=False, start_date_time_filter=None, end_date_time_filter=None, continuation_token=None, max_results=0, *, custom_headers=None, raw=False, **operation_config): - """Gets the list of backups available for every partition in this service. - - Returns a list of backups available for every partition in this Service - Fabric service. The server enumerates all the backups available in the - backup store configured in the backup policy. It also allows filtering - of the result based on start and end datetime or just fetching the - latest available backup for every partition. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param latest: Specifies whether to get only the most recent backup - available for a partition for the specified time range. - :type latest: bool - :param start_date_time_filter: Specify the start date time from which - to enumerate backups, in datetime format. The date time must be - specified in ISO8601 format. This is an optional parameter. If not - specified, all backups from the beginning are enumerated. - :type start_date_time_filter: datetime - :param end_date_time_filter: Specify the end date time till which to - enumerate backups, in datetime format. The date time must be specified - in ISO8601 format. This is an optional parameter. If not specified, - enumeration is done till the most recent backup. - :type end_date_time_filter: datetime - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedBackupInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedBackupInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_service_backup_list.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if latest is not None: - query_parameters['Latest'] = self._serialize.query("latest", latest, 'bool') - if start_date_time_filter is not None: - query_parameters['StartDateTimeFilter'] = self._serialize.query("start_date_time_filter", start_date_time_filter, 'iso-8601') - if end_date_time_filter is not None: - query_parameters['EndDateTimeFilter'] = self._serialize.query("end_date_time_filter", end_date_time_filter, 'iso-8601') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedBackupInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_backup_list.metadata = {'url': '/Services/{serviceId}/$/GetBackups'} - - async def suspend_service_backup( - self, service_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Suspends periodic backup for the specified Service Fabric service. - - The service which is configured to take periodic backups, is suspended - for taking further backups till it is resumed again. This operation - applies to the entire service's hierarchy. It means all the partitions - under this service are now suspended for backup. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.suspend_service_backup.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - suspend_service_backup.metadata = {'url': '/Services/{serviceId}/$/SuspendBackup'} - - async def resume_service_backup( - self, service_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Resumes periodic backup of a Service Fabric service which was - previously suspended. - - The previously suspended Service Fabric service resumes taking periodic - backup as per the backup policy currently configured for the same. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.resume_service_backup.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resume_service_backup.metadata = {'url': '/Services/{serviceId}/$/ResumeBackup'} - - async def enable_partition_backup( - self, partition_id, backup_policy_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Enables periodic backup of the stateful persisted partition. - - Enables periodic backup of stateful persisted partition. Each partition - is backed up as per the specified backup policy description. In case - the application or service, which is partition is part of, is already - enabled for backup then this operation would override the policy being - used to take the periodic backup of this partition. - Note only C# based Reliable Actor and Reliable Stateful services are - currently supported for periodic backup. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param backup_policy_name: Name of the backup policy to be used for - enabling periodic backups. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - enable_backup_description = models.EnableBackupDescription(backup_policy_name=backup_policy_name) - - api_version = "6.4" - - # Construct URL - url = self.enable_partition_backup.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(enable_backup_description, 'EnableBackupDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - enable_partition_backup.metadata = {'url': '/Partitions/{partitionId}/$/EnableBackup'} - - async def disable_partition_backup( - self, partition_id, clean_backup, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Disables periodic backup of Service Fabric partition which was - previously enabled. - - Disables periodic backup of partition which was previously enabled. - Backup must be explicitly enabled before it can be disabled. - In case the backup is enabled for the Service Fabric application or - service, which this partition is part of, this partition would continue - to be periodically backed up as per the policy mapped at the higher - level entity. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param clean_backup: Boolean flag to delete backups. It can be set to - true for deleting all the backups which were created for the backup - entity that is getting disabled for backup. - :type clean_backup: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - disable_backup_description = None - if clean_backup is not None: - disable_backup_description = models.DisableBackupDescription(clean_backup=clean_backup) - - api_version = "6.4" - - # Construct URL - url = self.disable_partition_backup.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if disable_backup_description is not None: - body_content = self._serialize.body(disable_backup_description, 'DisableBackupDescription') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_partition_backup.metadata = {'url': '/Partitions/{partitionId}/$/DisableBackup'} - - async def get_partition_backup_configuration_info( - self, partition_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the partition backup configuration information. - - Gets the Service Fabric Backup configuration information for the - specified partition. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PartitionBackupConfigurationInfo or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PartitionBackupConfigurationInfo - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partition_backup_configuration_info.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PartitionBackupConfigurationInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_backup_configuration_info.metadata = {'url': '/Partitions/{partitionId}/$/GetBackupConfigurationInfo'} - - async def get_partition_backup_list( - self, partition_id, timeout=60, latest=False, start_date_time_filter=None, end_date_time_filter=None, *, custom_headers=None, raw=False, **operation_config): - """Gets the list of backups available for the specified partition. - - Returns a list of backups available for the specified partition. The - server enumerates all the backups available in the backup store - configured in the backup policy. It also allows filtering of the result - based on start and end datetime or just fetching the latest available - backup for the partition. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param latest: Specifies whether to get only the most recent backup - available for a partition for the specified time range. - :type latest: bool - :param start_date_time_filter: Specify the start date time from which - to enumerate backups, in datetime format. The date time must be - specified in ISO8601 format. This is an optional parameter. If not - specified, all backups from the beginning are enumerated. - :type start_date_time_filter: datetime - :param end_date_time_filter: Specify the end date time till which to - enumerate backups, in datetime format. The date time must be specified - in ISO8601 format. This is an optional parameter. If not specified, - enumeration is done till the most recent backup. - :type end_date_time_filter: datetime - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedBackupInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedBackupInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partition_backup_list.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if latest is not None: - query_parameters['Latest'] = self._serialize.query("latest", latest, 'bool') - if start_date_time_filter is not None: - query_parameters['StartDateTimeFilter'] = self._serialize.query("start_date_time_filter", start_date_time_filter, 'iso-8601') - if end_date_time_filter is not None: - query_parameters['EndDateTimeFilter'] = self._serialize.query("end_date_time_filter", end_date_time_filter, 'iso-8601') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedBackupInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_backup_list.metadata = {'url': '/Partitions/{partitionId}/$/GetBackups'} - - async def suspend_partition_backup( - self, partition_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Suspends periodic backup for the specified partition. - - The partition which is configured to take periodic backups, is - suspended for taking further backups till it is resumed again. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.suspend_partition_backup.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - suspend_partition_backup.metadata = {'url': '/Partitions/{partitionId}/$/SuspendBackup'} - - async def resume_partition_backup( - self, partition_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Resumes periodic backup of partition which was previously suspended. - - The previously suspended partition resumes taking periodic backup as - per the backup policy currently configured for the same. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.resume_partition_backup.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resume_partition_backup.metadata = {'url': '/Partitions/{partitionId}/$/ResumeBackup'} - - async def backup_partition( - self, partition_id, backup_timeout=10, timeout=60, backup_storage=None, *, custom_headers=None, raw=False, **operation_config): - """Triggers backup of the partition's state. - - Creates a backup of the stateful persisted partition's state. In case - the partition is already being periodically backed up, then by default - the new backup is created at the same backup storage. One can also - override the same by specifying the backup storage details as part of - the request body. Once the backup is initiated, its progress can be - tracked using the GetBackupProgress operation. - In case, the operation times out, specify a greater backup timeout - value in the query parameter. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param backup_timeout: Specifies the maximum amount of time, in - minutes, to wait for the backup operation to complete. Post that, the - operation completes with timeout error. However, in certain corner - cases it could be that though the operation returns back timeout, the - backup actually goes through. In case of timeout error, its - recommended to invoke this operation again with a greater timeout - value. The default value for the same is 10 minutes. - :type backup_timeout: int - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param backup_storage: Specifies the details of the backup storage - where to save the backup. - :type backup_storage: - ~azure.servicefabric.models.BackupStorageDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - backup_partition_description = None - if backup_storage is not None: - backup_partition_description = models.BackupPartitionDescription(backup_storage=backup_storage) - - api_version = "6.4" - - # Construct URL - url = self.backup_partition.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if backup_timeout is not None: - query_parameters['BackupTimeout'] = self._serialize.query("backup_timeout", backup_timeout, 'int') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if backup_partition_description is not None: - body_content = self._serialize.body(backup_partition_description, 'BackupPartitionDescription') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - backup_partition.metadata = {'url': '/Partitions/{partitionId}/$/Backup'} - - async def get_partition_backup_progress( - self, partition_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets details for the latest backup triggered for this partition. - - Returns information about the state of the latest backup along with - details or failure reason in case of completion. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupProgressInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.BackupProgressInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partition_backup_progress.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupProgressInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_backup_progress.metadata = {'url': '/Partitions/{partitionId}/$/GetBackupProgress'} - - async def restore_partition( - self, partition_id, restore_partition_description, restore_timeout=10, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Triggers restore of the state of the partition using the specified - restore partition description. - - Restores the state of a of the stateful persisted partition using the - specified backup point. In case the partition is already being - periodically backed up, then by default the backup point is looked for - in the storage specified in backup policy. One can also override the - same by specifying the backup storage details as part of the restore - partition description in body. Once the restore is initiated, its - progress can be tracked using the GetRestoreProgress operation. - In case, the operation times out, specify a greater restore timeout - value in the query parameter. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param restore_partition_description: Describes the parameters to - restore the partition. - :type restore_partition_description: - ~azure.servicefabric.models.RestorePartitionDescription - :param restore_timeout: Specifies the maximum amount of time to wait, - in minutes, for the restore operation to complete. Post that, the - operation returns back with timeout error. However, in certain corner - cases it could be that the restore operation goes through even though - it completes with timeout. In case of timeout error, its recommended - to invoke this operation again with a greater timeout value. the - default value for the same is 10 minutes. - :type restore_timeout: int - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.restore_partition.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if restore_timeout is not None: - query_parameters['RestoreTimeout'] = self._serialize.query("restore_timeout", restore_timeout, 'int') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_partition_description, 'RestorePartitionDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restore_partition.metadata = {'url': '/Partitions/{partitionId}/$/Restore'} - - async def get_partition_restore_progress( - self, partition_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets details for the latest restore operation triggered for this - partition. - - Returns information about the state of the latest restore operation - along with details or failure reason in case of completion. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RestoreProgressInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.RestoreProgressInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partition_restore_progress.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RestoreProgressInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_restore_progress.metadata = {'url': '/Partitions/{partitionId}/$/GetRestoreProgress'} - - async def get_backups_from_backup_location( - self, get_backup_by_storage_query_description, timeout=60, continuation_token=None, max_results=0, *, custom_headers=None, raw=False, **operation_config): - """Gets the list of backups available for the specified backed up entity - at the specified backup location. - - Gets the list of backups available for the specified backed up entity - (Application, Service or Partition) at the specified backup location - (FileShare or Azure Blob Storage). - - :param get_backup_by_storage_query_description: Describes the filters - and backup storage details to be used for enumerating backups. - :type get_backup_by_storage_query_description: - ~azure.servicefabric.models.GetBackupByStorageQueryDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedBackupInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedBackupInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_backups_from_backup_location.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(get_backup_by_storage_query_description, 'GetBackupByStorageQueryDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedBackupInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backups_from_backup_location.metadata = {'url': '/BackupRestore/$/GetBackups'} - - async def create_name( - self, name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Creates a Service Fabric name. - - Creates the specified Service Fabric name. - - :param name: The Service Fabric name, including the 'fabric:' URI - scheme. - :type name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - name_description = models.NameDescription(name=name) - - api_version = "6.0" - - # Construct URL - url = self.create_name.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_description, 'NameDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - create_name.metadata = {'url': '/Names/$/Create'} - - async def get_name_exists_info( - self, name_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Returns whether the Service Fabric name exists. - - Returns whether the specified Service Fabric name exists. - - :param name_id: The Service Fabric name, without the 'fabric:' URI - scheme. - :type name_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_name_exists_info.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - get_name_exists_info.metadata = {'url': '/Names/{nameId}'} - - async def delete_name( - self, name_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Deletes a Service Fabric name. - - Deletes the specified Service Fabric name. A name must be created - before it can be deleted. Deleting a name with child properties will - fail. - - :param name_id: The Service Fabric name, without the 'fabric:' URI - scheme. - :type name_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.delete_name.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_name.metadata = {'url': '/Names/{nameId}'} - - async def get_sub_name_info_list( - self, name_id, recursive=False, continuation_token=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Enumerates all the Service Fabric names under a given name. - - Enumerates all the Service Fabric names under a given name. If the - subnames do not fit in a page, one page of results is returned as well - as a continuation token, which can be used to get the next page. - Querying a name that doesn't exist will fail. - - :param name_id: The Service Fabric name, without the 'fabric:' URI - scheme. - :type name_id: str - :param recursive: Allows specifying that the search performed should - be recursive. - :type recursive: bool - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedSubNameInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedSubNameInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_sub_name_info_list.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if recursive is not None: - query_parameters['Recursive'] = self._serialize.query("recursive", recursive, 'bool') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedSubNameInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_sub_name_info_list.metadata = {'url': '/Names/{nameId}/$/GetSubNames'} - - async def get_property_info_list( - self, name_id, include_values=False, continuation_token=None, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets information on all Service Fabric properties under a given name. - - A Service Fabric name can have one or more named properties that store - custom information. This operation gets the information about these - properties in a paged list. The information includes name, value, and - metadata about each of the properties. - - :param name_id: The Service Fabric name, without the 'fabric:' URI - scheme. - :type name_id: str - :param include_values: Allows specifying whether to include the values - of the properties returned. True if values should be returned with the - metadata; False to return only property metadata. - :type include_values: bool - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedPropertyInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedPropertyInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_property_info_list.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if include_values is not None: - query_parameters['IncludeValues'] = self._serialize.query("include_values", include_values, 'bool') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PagedPropertyInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_property_info_list.metadata = {'url': '/Names/{nameId}/$/GetProperties'} - - async def put_property( - self, name_id, property_description, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Creates or updates a Service Fabric property. - - Creates or updates the specified Service Fabric property under a given - name. - - :param name_id: The Service Fabric name, without the 'fabric:' URI - scheme. - :type name_id: str - :param property_description: Describes the Service Fabric property to - be created. - :type property_description: - ~azure.servicefabric.models.PropertyDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.put_property.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(property_description, 'PropertyDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - put_property.metadata = {'url': '/Names/{nameId}/$/GetProperty'} - - async def get_property_info( - self, name_id, property_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets the specified Service Fabric property. - - Gets the specified Service Fabric property under a given name. This - will always return both value and metadata. - - :param name_id: The Service Fabric name, without the 'fabric:' URI - scheme. - :type name_id: str - :param property_name: Specifies the name of the property to get. - :type property_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PropertyInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PropertyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_property_info.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['PropertyName'] = self._serialize.query("property_name", property_name, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PropertyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_property_info.metadata = {'url': '/Names/{nameId}/$/GetProperty'} - - async def delete_property( - self, name_id, property_name, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Deletes the specified Service Fabric property. - - Deletes the specified Service Fabric property under a given name. A - property must be created before it can be deleted. - - :param name_id: The Service Fabric name, without the 'fabric:' URI - scheme. - :type name_id: str - :param property_name: Specifies the name of the property to get. - :type property_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.delete_property.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['PropertyName'] = self._serialize.query("property_name", property_name, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_property.metadata = {'url': '/Names/{nameId}/$/GetProperty'} - - async def submit_property_batch( - self, name_id, timeout=60, operations=None, *, custom_headers=None, raw=False, **operation_config): - """Submits a property batch. - - Submits a batch of property operations. Either all or none of the - operations will be committed. - - :param name_id: The Service Fabric name, without the 'fabric:' URI - scheme. - :type name_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param operations: A list of the property batch operations to be - executed. - :type operations: - list[~azure.servicefabric.models.PropertyBatchOperation] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PropertyBatchInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PropertyBatchInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - property_batch_description_list = models.PropertyBatchDescriptionList(operations=operations) - - api_version = "6.0" - - # Construct URL - url = self.submit_property_batch.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(property_batch_description_list, 'PropertyBatchDescriptionList') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200, 409]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SuccessfulPropertyBatchInfo', response) - if response.status_code == 409: - deserialized = self._deserialize('FailedPropertyBatchInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - submit_property_batch.metadata = {'url': '/Names/{nameId}/$/GetProperties/$/SubmitBatch'} - - async def get_cluster_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, *, custom_headers=None, raw=False, **operation_config): - """Gets all Cluster-related events. - - The response is list of ClusterEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ClusterEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_cluster_event_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[ClusterEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_event_list.metadata = {'url': '/EventsStore/Cluster/Events'} - - async def get_containers_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, *, custom_headers=None, raw=False, **operation_config): - """Gets all Containers-related events. - - The response is list of ContainerInstanceEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ContainerInstanceEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.2-preview" - - # Construct URL - url = self.get_containers_event_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[ContainerInstanceEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_containers_event_list.metadata = {'url': '/EventsStore/Containers/Events'} - - async def get_node_event_list( - self, node_name, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, *, custom_headers=None, raw=False, **operation_config): - """Gets a Node-related events. - - The response is list of NodeEvent objects. - - :param node_name: The name of the node. - :type node_name: str - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.NodeEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_node_event_list.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NodeEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_node_event_list.metadata = {'url': '/EventsStore/Nodes/{nodeName}/$/Events'} - - async def get_nodes_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, *, custom_headers=None, raw=False, **operation_config): - """Gets all Nodes-related Events. - - The response is list of NodeEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.NodeEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_nodes_event_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[NodeEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_nodes_event_list.metadata = {'url': '/EventsStore/Nodes/Events'} - - async def get_application_event_list( - self, application_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, *, custom_headers=None, raw=False, **operation_config): - """Gets an Application-related events. - - The response is list of ApplicationEvent objects. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ApplicationEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_application_event_list.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[ApplicationEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_event_list.metadata = {'url': '/EventsStore/Applications/{applicationId}/$/Events'} - - async def get_applications_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, *, custom_headers=None, raw=False, **operation_config): - """Gets all Applications-related events. - - The response is list of ApplicationEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ApplicationEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_applications_event_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[ApplicationEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_applications_event_list.metadata = {'url': '/EventsStore/Applications/Events'} - - async def get_service_event_list( - self, service_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, *, custom_headers=None, raw=False, **operation_config): - """Gets a Service-related events. - - The response is list of ServiceEvent objects. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ServiceEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_service_event_list.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[ServiceEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_event_list.metadata = {'url': '/EventsStore/Services/{serviceId}/$/Events'} - - async def get_services_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, *, custom_headers=None, raw=False, **operation_config): - """Gets all Services-related events. - - The response is list of ServiceEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ServiceEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_services_event_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[ServiceEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_services_event_list.metadata = {'url': '/EventsStore/Services/Events'} - - async def get_partition_event_list( - self, partition_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, *, custom_headers=None, raw=False, **operation_config): - """Gets a Partition-related events. - - The response is list of PartitionEvent objects. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.PartitionEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partition_event_list.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[PartitionEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_event_list.metadata = {'url': '/EventsStore/Partitions/{partitionId}/$/Events'} - - async def get_partitions_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, *, custom_headers=None, raw=False, **operation_config): - """Gets all Partitions-related events. - - The response is list of PartitionEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.PartitionEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partitions_event_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[PartitionEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partitions_event_list.metadata = {'url': '/EventsStore/Partitions/Events'} - - async def get_partition_replica_event_list( - self, partition_id, replica_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, *, custom_headers=None, raw=False, **operation_config): - """Gets a Partition Replica-related events. - - The response is list of ReplicaEvent objects. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ReplicaEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partition_replica_event_list.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[ReplicaEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_replica_event_list.metadata = {'url': '/EventsStore/Partitions/{partitionId}/$/Replicas/{replicaId}/$/Events'} - - async def get_partition_replicas_event_list( - self, partition_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, *, custom_headers=None, raw=False, **operation_config): - """Gets all Replicas-related events for a Partition. - - The response is list of ReplicaEvent objects. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ReplicaEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partition_replicas_event_list.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[ReplicaEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_replicas_event_list.metadata = {'url': '/EventsStore/Partitions/{partitionId}/$/Replicas/Events'} - - async def get_correlated_event_list( - self, event_instance_id, timeout=60, *, custom_headers=None, raw=False, **operation_config): - """Gets all correlated events for a given event. - - The response is list of FabricEvents. - - :param event_instance_id: The EventInstanceId. - :type event_instance_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.FabricEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_correlated_event_list.metadata['url'] - path_format_arguments = { - 'eventInstanceId': self._serialize.url("event_instance_id", event_instance_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = await self._client.async_send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[FabricEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_correlated_event_list.metadata = {'url': '/EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events'} diff --git a/customSDK/servicefabric/models/__init__.py b/customSDK/servicefabric/models/__init__.py index 1adc82e..0c2bc30 100644 --- a/customSDK/servicefabric/models/__init__.py +++ b/customSDK/servicefabric/models/__init__.py @@ -10,1040 +10,1040 @@ # -------------------------------------------------------------------------- try: - from ._models_py3 import AadMetadata - from ._models_py3 import AadMetadataObject - from ._models_py3 import AddRemoveIncrementalNamedPartitionScalingMechanism - from ._models_py3 import AddRemoveReplicaScalingMechanism - from ._models_py3 import AnalysisEventMetadata - from ._models_py3 import ApplicationBackupConfigurationInfo - from ._models_py3 import ApplicationBackupEntity - from ._models_py3 import ApplicationCapacityDescription - from ._models_py3 import ApplicationContainerInstanceExitedEvent - from ._models_py3 import ApplicationCreatedEvent - from ._models_py3 import ApplicationDeletedEvent - from ._models_py3 import ApplicationDescription - from ._models_py3 import ApplicationEvent - from ._models_py3 import ApplicationHealth - from ._models_py3 import ApplicationHealthEvaluation - from ._models_py3 import ApplicationHealthPolicies - from ._models_py3 import ApplicationHealthPolicy - from ._models_py3 import ApplicationHealthPolicyMapItem - from ._models_py3 import ApplicationHealthPolicyMapObject - from ._models_py3 import ApplicationHealthReportExpiredEvent - from ._models_py3 import ApplicationHealthState - from ._models_py3 import ApplicationHealthStateChunk - from ._models_py3 import ApplicationHealthStateChunkList - from ._models_py3 import ApplicationHealthStateFilter - from ._models_py3 import ApplicationInfo - from ._models_py3 import ApplicationLoadInfo - from ._models_py3 import ApplicationLoadMetricInformation - from ._models_py3 import ApplicationMetricDescription - from ._models_py3 import ApplicationNameInfo - from ._models_py3 import ApplicationNewHealthReportEvent - from ._models_py3 import ApplicationParameter - from ._models_py3 import ApplicationProcessExitedEvent - from ._models_py3 import ApplicationResourceDescription - from ._models_py3 import ApplicationResourceUpgradeProgressInfo - from ._models_py3 import ApplicationScopedVolume - from ._models_py3 import ApplicationScopedVolumeCreationParameters - from ._models_py3 import ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk - from ._models_py3 import ApplicationsHealthEvaluation - from ._models_py3 import ApplicationTypeApplicationsHealthEvaluation - from ._models_py3 import ApplicationTypeHealthPolicyMapItem - from ._models_py3 import ApplicationTypeImageStorePath - from ._models_py3 import ApplicationTypeInfo - from ._models_py3 import ApplicationTypeManifest - from ._models_py3 import ApplicationUpgradeCompletedEvent - from ._models_py3 import ApplicationUpgradeDescription - from ._models_py3 import ApplicationUpgradeDomainCompletedEvent - from ._models_py3 import ApplicationUpgradeProgressInfo - from ._models_py3 import ApplicationUpgradeRollbackCompletedEvent - from ._models_py3 import ApplicationUpgradeRollbackStartedEvent - from ._models_py3 import ApplicationUpgradeStartedEvent - from ._models_py3 import ApplicationUpgradeUpdateDescription - from ._models_py3 import AutoScalingMechanism - from ._models_py3 import AutoScalingMetric - from ._models_py3 import AutoScalingPolicy - from ._models_py3 import AutoScalingResourceMetric - from ._models_py3 import AutoScalingTrigger - from ._models_py3 import AverageLoadScalingTrigger - from ._models_py3 import AveragePartitionLoadScalingTrigger - from ._models_py3 import AverageServiceLoadScalingTrigger - from ._models_py3 import AzureBlobBackupStorageDescription - from ._models_py3 import AzureInternalMonitoringPipelineSinkDescription - from ._models_py3 import BackupConfigurationInfo - from ._models_py3 import BackupEntity - from ._models_py3 import BackupInfo - from ._models_py3 import BackupPartitionDescription - from ._models_py3 import BackupPolicyDescription - from ._models_py3 import BackupProgressInfo - from ._models_py3 import BackupScheduleDescription - from ._models_py3 import BackupStorageDescription - from ._models_py3 import BackupSuspensionInfo - from ._models_py3 import BasicRetentionPolicyDescription - from ._models_py3 import BinaryPropertyValue - from ._models_py3 import Chaos - from ._models_py3 import ChaosCodePackageRestartScheduledEvent - from ._models_py3 import ChaosContext - from ._models_py3 import ChaosEvent - from ._models_py3 import ChaosEventsSegment - from ._models_py3 import ChaosEventWrapper - from ._models_py3 import ChaosNodeRestartScheduledEvent - from ._models_py3 import ChaosParameters - from ._models_py3 import ChaosParametersDictionaryItem - from ._models_py3 import ChaosPartitionPrimaryMoveScheduledEvent - from ._models_py3 import ChaosPartitionSecondaryMoveScheduledEvent - from ._models_py3 import ChaosReplicaRemovalScheduledEvent - from ._models_py3 import ChaosReplicaRestartScheduledEvent - from ._models_py3 import ChaosSchedule - from ._models_py3 import ChaosScheduleDescription - from ._models_py3 import ChaosScheduleJob - from ._models_py3 import ChaosScheduleJobActiveDaysOfWeek - from ._models_py3 import ChaosStartedEvent - from ._models_py3 import ChaosStoppedEvent - from ._models_py3 import ChaosTargetFilter - from ._models_py3 import CheckExistsPropertyBatchOperation - from ._models_py3 import CheckSequencePropertyBatchOperation - from ._models_py3 import CheckValuePropertyBatchOperation - from ._models_py3 import ClusterConfiguration - from ._models_py3 import ClusterConfigurationUpgradeDescription - from ._models_py3 import ClusterConfigurationUpgradeStatusInfo - from ._models_py3 import ClusterEvent - from ._models_py3 import ClusterHealth - from ._models_py3 import ClusterHealthChunk - from ._models_py3 import ClusterHealthChunkQueryDescription - from ._models_py3 import ClusterHealthPolicies - from ._models_py3 import ClusterHealthPolicy - from ._models_py3 import ClusterHealthReportExpiredEvent - from ._models_py3 import ClusterLoadInfo - from ._models_py3 import ClusterManifest - from ._models_py3 import ClusterNewHealthReportEvent - from ._models_py3 import ClusterUpgradeCompletedEvent - from ._models_py3 import ClusterUpgradeDescriptionObject - from ._models_py3 import ClusterUpgradeDomainCompletedEvent - from ._models_py3 import ClusterUpgradeHealthPolicyObject - from ._models_py3 import ClusterUpgradeProgressObject - from ._models_py3 import ClusterUpgradeRollbackCompletedEvent - from ._models_py3 import ClusterUpgradeRollbackStartedEvent - from ._models_py3 import ClusterUpgradeStartedEvent - from ._models_py3 import ClusterVersion - from ._models_py3 import CodePackageEntryPoint - from ._models_py3 import CodePackageEntryPointStatistics - from ._models_py3 import ComposeDeploymentStatusInfo - from ._models_py3 import ComposeDeploymentUpgradeDescription - from ._models_py3 import ComposeDeploymentUpgradeProgressInfo - from ._models_py3 import ConfigParameterOverride - from ._models_py3 import ContainerApiRequestBody - from ._models_py3 import ContainerApiResponse - from ._models_py3 import ContainerApiResult - from ._models_py3 import ContainerCodePackageProperties - from ._models_py3 import ContainerEvent - from ._models_py3 import ContainerInstanceEvent - from ._models_py3 import ContainerInstanceView - from ._models_py3 import ContainerLabel - from ._models_py3 import ContainerLogs - from ._models_py3 import ContainerState - from ._models_py3 import CreateComposeDeploymentDescription - from ._models_py3 import CurrentUpgradeDomainProgressInfo - from ._models_py3 import DeactivationIntentDescription - from ._models_py3 import DefaultExecutionPolicy - from ._models_py3 import DeletePropertyBatchOperation - from ._models_py3 import DeltaNodesCheckHealthEvaluation - from ._models_py3 import DeployedApplicationHealth - from ._models_py3 import DeployedApplicationHealthEvaluation - from ._models_py3 import DeployedApplicationHealthReportExpiredEvent - from ._models_py3 import DeployedApplicationHealthState - from ._models_py3 import DeployedApplicationHealthStateChunk - from ._models_py3 import DeployedApplicationHealthStateChunkList - from ._models_py3 import DeployedApplicationHealthStateFilter - from ._models_py3 import DeployedApplicationInfo - from ._models_py3 import DeployedApplicationNewHealthReportEvent - from ._models_py3 import DeployedApplicationsHealthEvaluation - from ._models_py3 import DeployedCodePackageInfo - from ._models_py3 import DeployedServicePackageHealth - from ._models_py3 import DeployedServicePackageHealthEvaluation - from ._models_py3 import DeployedServicePackageHealthReportExpiredEvent - from ._models_py3 import DeployedServicePackageHealthState - from ._models_py3 import DeployedServicePackageHealthStateChunk - from ._models_py3 import DeployedServicePackageHealthStateChunkList - from ._models_py3 import DeployedServicePackageHealthStateFilter - from ._models_py3 import DeployedServicePackageInfo - from ._models_py3 import DeployedServicePackageNewHealthReportEvent - from ._models_py3 import DeployedServicePackagesHealthEvaluation - from ._models_py3 import DeployedServiceReplicaDetailInfo - from ._models_py3 import DeployedServiceReplicaInfo - from ._models_py3 import DeployedServiceTypeInfo - from ._models_py3 import DeployedStatefulServiceReplicaDetailInfo - from ._models_py3 import DeployedStatefulServiceReplicaInfo - from ._models_py3 import DeployedStatelessServiceInstanceDetailInfo - from ._models_py3 import DeployedStatelessServiceInstanceInfo - from ._models_py3 import DeployServicePackageToNodeDescription - from ._models_py3 import DiagnosticsDescription - from ._models_py3 import DiagnosticsRef - from ._models_py3 import DiagnosticsSinkProperties - from ._models_py3 import DisableBackupDescription - from ._models_py3 import DiskInfo - from ._models_py3 import DoublePropertyValue - from ._models_py3 import DsmsAzureBlobBackupStorageDescription - from ._models_py3 import EnableBackupDescription - from ._models_py3 import EndpointProperties - from ._models_py3 import EndpointRef - from ._models_py3 import EnsureAvailabilitySafetyCheck - from ._models_py3 import EnsurePartitionQuorumSafetyCheck - from ._models_py3 import EntityHealth - from ._models_py3 import EntityHealthState - from ._models_py3 import EntityHealthStateChunk - from ._models_py3 import EntityHealthStateChunkList - from ._models_py3 import EntityKindHealthStateCount - from ._models_py3 import EnvironmentVariable - from ._models_py3 import Epoch - from ._models_py3 import EventHealthEvaluation - from ._models_py3 import ExecutingFaultsChaosEvent - from ._models_py3 import ExecutionPolicy - from ._models_py3 import ExternalStoreProvisionApplicationTypeDescription - from ._models_py3 import FabricCodeVersionInfo - from ._models_py3 import FabricConfigVersionInfo - from ._models_py3 import FabricError, FabricErrorException - from ._models_py3 import FabricErrorError - from ._models_py3 import FabricEvent - from ._models_py3 import FailedPropertyBatchInfo - from ._models_py3 import FailedUpgradeDomainProgressObject - from ._models_py3 import FailureUpgradeDomainProgressInfo - from ._models_py3 import FileInfo - from ._models_py3 import FileShareBackupStorageDescription - from ._models_py3 import FileVersion - from ._models_py3 import FolderInfo - from ._models_py3 import FolderSizeInfo - from ._models_py3 import FrequencyBasedBackupScheduleDescription - from ._models_py3 import GatewayDestination - from ._models_py3 import GatewayResourceDescription - from ._models_py3 import GetBackupByStorageQueryDescription - from ._models_py3 import GetPropertyBatchOperation - from ._models_py3 import GuidPropertyValue - from ._models_py3 import HealthEvaluation - from ._models_py3 import HealthEvaluationWrapper - from ._models_py3 import HealthEvent - from ._models_py3 import HealthInformation - from ._models_py3 import HealthStateCount - from ._models_py3 import HealthStatistics - from ._models_py3 import HttpConfig - from ._models_py3 import HttpHostConfig - from ._models_py3 import HttpRouteConfig - from ._models_py3 import HttpRouteMatchHeader - from ._models_py3 import HttpRouteMatchPath - from ._models_py3 import HttpRouteMatchRule - from ._models_py3 import IdentityDescription - from ._models_py3 import IdentityItemDescription - from ._models_py3 import ImageRegistryCredential - from ._models_py3 import ImageStoreContent - from ._models_py3 import ImageStoreCopyDescription - from ._models_py3 import ImageStoreInfo - from ._models_py3 import InlinedValueSecretResourceProperties - from ._models_py3 import InstanceLifecycleDescription - from ._models_py3 import Int64PropertyValue - from ._models_py3 import Int64RangePartitionInformation - from ._models_py3 import InvokeDataLossResult - from ._models_py3 import InvokeQuorumLossResult - from ._models_py3 import KeyValueStoreReplicaStatus - from ._models_py3 import LoadedPartitionInformationQueryDescription - from ._models_py3 import LoadedPartitionInformationResult - from ._models_py3 import LoadedPartitionInformationResultList - from ._models_py3 import LoadMetricInformation - from ._models_py3 import LoadMetricReport - from ._models_py3 import LoadMetricReportInfo - from ._models_py3 import LocalNetworkResourceProperties - from ._models_py3 import ManagedApplicationIdentity - from ._models_py3 import ManagedApplicationIdentityDescription - from ._models_py3 import ManagedIdentityAzureBlobBackupStorageDescription - from ._models_py3 import MetricLoadDescription - from ._models_py3 import MonitoringPolicyDescription - from ._models_py3 import NameDescription - from ._models_py3 import NamedPartitionInformation - from ._models_py3 import NamedPartitionSchemeDescription - from ._models_py3 import NetworkRef - from ._models_py3 import NetworkResourceDescription - from ._models_py3 import NetworkResourceProperties - from ._models_py3 import NetworkResourcePropertiesBase - from ._models_py3 import NodeAbortedEvent - from ._models_py3 import NodeAddedToClusterEvent - from ._models_py3 import NodeClosedEvent - from ._models_py3 import NodeDeactivateCompletedEvent - from ._models_py3 import NodeDeactivateStartedEvent - from ._models_py3 import NodeDeactivationInfo - from ._models_py3 import NodeDeactivationTask - from ._models_py3 import NodeDeactivationTaskId - from ._models_py3 import NodeDownEvent - from ._models_py3 import NodeEvent - from ._models_py3 import NodeHealth - from ._models_py3 import NodeHealthEvaluation - from ._models_py3 import NodeHealthReportExpiredEvent - from ._models_py3 import NodeHealthState - from ._models_py3 import NodeHealthStateChunk - from ._models_py3 import NodeHealthStateChunkList - from ._models_py3 import NodeHealthStateFilter - from ._models_py3 import NodeId - from ._models_py3 import NodeImpact - from ._models_py3 import NodeInfo - from ._models_py3 import NodeLoadInfo - from ._models_py3 import NodeLoadMetricInformation - from ._models_py3 import NodeNewHealthReportEvent - from ._models_py3 import NodeOpenFailedEvent - from ._models_py3 import NodeOpenSucceededEvent - from ._models_py3 import NodeRemovedFromClusterEvent - from ._models_py3 import NodeRepairImpactDescription - from ._models_py3 import NodeRepairTargetDescription - from ._models_py3 import NodeResult - from ._models_py3 import NodesHealthEvaluation - from ._models_py3 import NodeTagsDescription - from ._models_py3 import NodeTransitionProgress - from ._models_py3 import NodeTransitionResult - from ._models_py3 import NodeTypeHealthPolicyMapItem - from ._models_py3 import NodeTypeNodesHealthEvaluation - from ._models_py3 import NodeUpEvent - from ._models_py3 import NodeUpgradeProgressInfo - from ._models_py3 import OperationStatus - from ._models_py3 import PackageSharingPolicyInfo - from ._models_py3 import PagedApplicationInfoList - from ._models_py3 import PagedApplicationResourceDescriptionList - from ._models_py3 import PagedApplicationTypeInfoList - from ._models_py3 import PagedBackupConfigurationInfoList - from ._models_py3 import PagedBackupEntityList - from ._models_py3 import PagedBackupInfoList - from ._models_py3 import PagedBackupPolicyDescriptionList - from ._models_py3 import PagedComposeDeploymentStatusInfoList - from ._models_py3 import PagedDeployedApplicationInfoList - from ._models_py3 import PagedGatewayResourceDescriptionList - from ._models_py3 import PagedNetworkResourceDescriptionList - from ._models_py3 import PagedNodeInfoList - from ._models_py3 import PagedPropertyInfoList - from ._models_py3 import PagedReplicaInfoList - from ._models_py3 import PagedSecretResourceDescriptionList - from ._models_py3 import PagedSecretValueResourceDescriptionList - from ._models_py3 import PagedServiceInfoList - from ._models_py3 import PagedServicePartitionInfoList - from ._models_py3 import PagedServiceReplicaDescriptionList - from ._models_py3 import PagedServiceResourceDescriptionList - from ._models_py3 import PagedSubNameInfoList - from ._models_py3 import PagedUpdatePartitionLoadResultList - from ._models_py3 import PagedVolumeResourceDescriptionList - from ._models_py3 import PartitionAnalysisEvent - from ._models_py3 import PartitionBackupConfigurationInfo - from ._models_py3 import PartitionBackupEntity - from ._models_py3 import PartitionDataLossProgress - from ._models_py3 import PartitionEvent - from ._models_py3 import PartitionHealth - from ._models_py3 import PartitionHealthEvaluation - from ._models_py3 import PartitionHealthReportExpiredEvent - from ._models_py3 import PartitionHealthState - from ._models_py3 import PartitionHealthStateChunk - from ._models_py3 import PartitionHealthStateChunkList - from ._models_py3 import PartitionHealthStateFilter - from ._models_py3 import PartitionInformation - from ._models_py3 import PartitionInstanceCountScaleMechanism - from ._models_py3 import PartitionLoadInformation - from ._models_py3 import PartitionMetricLoadDescription - from ._models_py3 import PartitionNewHealthReportEvent - from ._models_py3 import PartitionPrimaryMoveAnalysisEvent - from ._models_py3 import PartitionQuorumLossProgress - from ._models_py3 import PartitionReconfiguredEvent - from ._models_py3 import PartitionRestartProgress - from ._models_py3 import PartitionSafetyCheck - from ._models_py3 import PartitionSchemeDescription - from ._models_py3 import PartitionsHealthEvaluation - from ._models_py3 import PrimaryReplicatorStatus - from ._models_py3 import Probe - from ._models_py3 import ProbeExec - from ._models_py3 import ProbeHttpGet - from ._models_py3 import ProbeHttpGetHeaders - from ._models_py3 import ProbeTcpSocket - from ._models_py3 import PropertyBatchDescriptionList - from ._models_py3 import PropertyBatchInfo - from ._models_py3 import PropertyBatchOperation - from ._models_py3 import PropertyDescription - from ._models_py3 import PropertyInfo - from ._models_py3 import PropertyMetadata - from ._models_py3 import PropertyValue - from ._models_py3 import ProvisionApplicationTypeDescription - from ._models_py3 import ProvisionApplicationTypeDescriptionBase - from ._models_py3 import ProvisionFabricDescription - from ._models_py3 import PutPropertyBatchOperation - from ._models_py3 import ReconfigurationInformation - from ._models_py3 import RegistryCredential - from ._models_py3 import ReliableCollectionsRef - from ._models_py3 import RemoteReplicatorAcknowledgementDetail - from ._models_py3 import RemoteReplicatorAcknowledgementStatus - from ._models_py3 import RemoteReplicatorStatus - from ._models_py3 import RepairImpactDescriptionBase - from ._models_py3 import RepairTargetDescriptionBase - from ._models_py3 import RepairTask - from ._models_py3 import RepairTaskApproveDescription - from ._models_py3 import RepairTaskCancelDescription - from ._models_py3 import RepairTaskDeleteDescription - from ._models_py3 import RepairTaskHistory - from ._models_py3 import RepairTaskUpdateHealthPolicyDescription - from ._models_py3 import RepairTaskUpdateInfo - from ._models_py3 import ReplicaEvent - from ._models_py3 import ReplicaHealth - from ._models_py3 import ReplicaHealthEvaluation - from ._models_py3 import ReplicaHealthState - from ._models_py3 import ReplicaHealthStateChunk - from ._models_py3 import ReplicaHealthStateChunkList - from ._models_py3 import ReplicaHealthStateFilter - from ._models_py3 import ReplicaInfo - from ._models_py3 import ReplicaLifecycleDescription - from ._models_py3 import ReplicaMetricLoadDescription - from ._models_py3 import ReplicasHealthEvaluation - from ._models_py3 import ReplicaStatusBase - from ._models_py3 import ReplicatorQueueStatus - from ._models_py3 import ReplicatorStatus - from ._models_py3 import ResolvedServiceEndpoint - from ._models_py3 import ResolvedServicePartition - from ._models_py3 import ResourceLimits - from ._models_py3 import ResourceRequests - from ._models_py3 import ResourceRequirements - from ._models_py3 import RestartDeployedCodePackageDescription - from ._models_py3 import RestartNodeDescription - from ._models_py3 import RestartPartitionResult - from ._models_py3 import RestorePartitionDescription - from ._models_py3 import RestoreProgressInfo - from ._models_py3 import ResumeApplicationUpgradeDescription - from ._models_py3 import ResumeClusterUpgradeDescription - from ._models_py3 import RetentionPolicyDescription - from ._models_py3 import RollingUpgradeUpdateDescription - from ._models_py3 import RunToCompletionExecutionPolicy - from ._models_py3 import SafetyCheck - from ._models_py3 import SafetyCheckWrapper - from ._models_py3 import ScalingMechanismDescription - from ._models_py3 import ScalingPolicyDescription - from ._models_py3 import ScalingTriggerDescription - from ._models_py3 import SecondaryActiveReplicatorStatus - from ._models_py3 import SecondaryIdleReplicatorStatus - from ._models_py3 import SecondaryReplicatorStatus - from ._models_py3 import SecretResourceDescription - from ._models_py3 import SecretResourceProperties - from ._models_py3 import SecretResourcePropertiesBase - from ._models_py3 import SecretValue - from ._models_py3 import SecretValueProperties - from ._models_py3 import SecretValueResourceDescription - from ._models_py3 import SeedNodeSafetyCheck - from ._models_py3 import SelectedPartition - from ._models_py3 import ServiceBackupConfigurationInfo - from ._models_py3 import ServiceBackupEntity - from ._models_py3 import ServiceCorrelationDescription - from ._models_py3 import ServiceCreatedEvent - from ._models_py3 import ServiceDeletedEvent - from ._models_py3 import ServiceDescription - from ._models_py3 import ServiceEvent - from ._models_py3 import ServiceFromTemplateDescription - from ._models_py3 import ServiceHealth - from ._models_py3 import ServiceHealthEvaluation - from ._models_py3 import ServiceHealthReportExpiredEvent - from ._models_py3 import ServiceHealthState - from ._models_py3 import ServiceHealthStateChunk - from ._models_py3 import ServiceHealthStateChunkList - from ._models_py3 import ServiceHealthStateFilter - from ._models_py3 import ServiceIdentity - from ._models_py3 import ServiceInfo - from ._models_py3 import ServiceLoadMetricDescription - from ._models_py3 import ServiceNameInfo - from ._models_py3 import ServiceNewHealthReportEvent - from ._models_py3 import ServicePartitionInfo - from ._models_py3 import ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription - from ._models_py3 import ServicePlacementInvalidDomainPolicyDescription - from ._models_py3 import ServicePlacementNonPartiallyPlaceServicePolicyDescription - from ._models_py3 import ServicePlacementPolicyDescription - from ._models_py3 import ServicePlacementPreferPrimaryDomainPolicyDescription - from ._models_py3 import ServicePlacementRequiredDomainPolicyDescription - from ._models_py3 import ServicePlacementRequireDomainDistributionPolicyDescription - from ._models_py3 import ServiceProperties - from ._models_py3 import ServiceReplicaDescription - from ._models_py3 import ServiceReplicaProperties - from ._models_py3 import ServiceResourceDescription - from ._models_py3 import ServicesHealthEvaluation - from ._models_py3 import ServiceTypeDescription - from ._models_py3 import ServiceTypeExtensionDescription - from ._models_py3 import ServiceTypeHealthPolicy - from ._models_py3 import ServiceTypeHealthPolicyMapItem - from ._models_py3 import ServiceTypeInfo - from ._models_py3 import ServiceTypeManifest - from ._models_py3 import ServiceUpdateDescription - from ._models_py3 import ServiceUpgradeProgress - from ._models_py3 import Setting - from ._models_py3 import SingletonPartitionInformation - from ._models_py3 import SingletonPartitionSchemeDescription - from ._models_py3 import StartClusterUpgradeDescription - from ._models_py3 import StartedChaosEvent - from ._models_py3 import StatefulReplicaHealthReportExpiredEvent - from ._models_py3 import StatefulReplicaNewHealthReportEvent - from ._models_py3 import StatefulServiceDescription - from ._models_py3 import StatefulServiceInfo - from ._models_py3 import StatefulServicePartitionInfo - from ._models_py3 import StatefulServiceReplicaHealth - from ._models_py3 import StatefulServiceReplicaHealthState - from ._models_py3 import StatefulServiceReplicaInfo - from ._models_py3 import StatefulServiceTypeDescription - from ._models_py3 import StatefulServiceUpdateDescription - from ._models_py3 import StatelessReplicaHealthReportExpiredEvent - from ._models_py3 import StatelessReplicaNewHealthReportEvent - from ._models_py3 import StatelessServiceDescription - from ._models_py3 import StatelessServiceInfo - from ._models_py3 import StatelessServiceInstanceHealth - from ._models_py3 import StatelessServiceInstanceHealthState - from ._models_py3 import StatelessServiceInstanceInfo - from ._models_py3 import StatelessServicePartitionInfo - from ._models_py3 import StatelessServiceTypeDescription - from ._models_py3 import StatelessServiceUpdateDescription - from ._models_py3 import StoppedChaosEvent - from ._models_py3 import StringPropertyValue - from ._models_py3 import SuccessfulPropertyBatchInfo - from ._models_py3 import SystemApplicationHealthEvaluation - from ._models_py3 import TcpConfig - from ._models_py3 import TestErrorChaosEvent - from ._models_py3 import TimeBasedBackupScheduleDescription - from ._models_py3 import TimeOfDay - from ._models_py3 import TimeRange - from ._models_py3 import UniformInt64RangePartitionSchemeDescription - from ._models_py3 import UnplacedReplicaInformation - from ._models_py3 import UnprovisionApplicationTypeDescriptionInfo - from ._models_py3 import UnprovisionFabricDescription - from ._models_py3 import UpdateClusterUpgradeDescription - from ._models_py3 import UpdatePartitionLoadResult - from ._models_py3 import UpgradeDomainDeltaNodesCheckHealthEvaluation - from ._models_py3 import UpgradeDomainInfo - from ._models_py3 import UpgradeDomainNodesHealthEvaluation - from ._models_py3 import UpgradeOrchestrationServiceState - from ._models_py3 import UpgradeOrchestrationServiceStateSummary - from ._models_py3 import UploadChunkRange - from ._models_py3 import UploadSession - from ._models_py3 import UploadSessionInfo - from ._models_py3 import UsageInfo - from ._models_py3 import ValidationFailedChaosEvent - from ._models_py3 import VolumeProviderParametersAzureFile - from ._models_py3 import VolumeReference - from ._models_py3 import VolumeResourceDescription - from ._models_py3 import WaitForInbuildReplicaSafetyCheck - from ._models_py3 import WaitForPrimaryPlacementSafetyCheck - from ._models_py3 import WaitForPrimarySwapSafetyCheck - from ._models_py3 import WaitForReconfigurationSafetyCheck - from ._models_py3 import WaitingChaosEvent + from .fabric_error_error_py3 import FabricErrorError + from .fabric_error_py3 import FabricError, FabricErrorException + from .container_logs_py3 import ContainerLogs + from .aad_metadata_py3 import AadMetadata + from .aad_metadata_object_py3 import AadMetadataObject + from .analysis_event_metadata_py3 import AnalysisEventMetadata + from .application_event_py3 import ApplicationEvent + from .service_health_state_py3 import ServiceHealthState + from .deployed_application_health_state_py3 import DeployedApplicationHealthState + from .application_health_py3 import ApplicationHealth + from .health_evaluation_py3 import HealthEvaluation + from .health_evaluation_wrapper_py3 import HealthEvaluationWrapper + from .application_health_evaluation_py3 import ApplicationHealthEvaluation + from .service_type_health_policy_py3 import ServiceTypeHealthPolicy + from .service_type_health_policy_map_item_py3 import ServiceTypeHealthPolicyMapItem + from .application_health_policy_py3 import ApplicationHealthPolicy + from .application_health_policy_map_item_py3 import ApplicationHealthPolicyMapItem + from .application_health_policies_py3 import ApplicationHealthPolicies + from .application_health_policy_map_object_py3 import ApplicationHealthPolicyMapObject + from .application_health_state_py3 import ApplicationHealthState + from .replica_health_state_chunk_py3 import ReplicaHealthStateChunk + from .replica_health_state_chunk_list_py3 import ReplicaHealthStateChunkList + from .partition_health_state_chunk_py3 import PartitionHealthStateChunk + from .partition_health_state_chunk_list_py3 import PartitionHealthStateChunkList + from .service_health_state_chunk_py3 import ServiceHealthStateChunk + from .service_health_state_chunk_list_py3 import ServiceHealthStateChunkList + from .deployed_service_package_health_state_chunk_py3 import DeployedServicePackageHealthStateChunk + from .deployed_service_package_health_state_chunk_list_py3 import DeployedServicePackageHealthStateChunkList + from .deployed_application_health_state_chunk_py3 import DeployedApplicationHealthStateChunk + from .deployed_application_health_state_chunk_list_py3 import DeployedApplicationHealthStateChunkList + from .application_health_state_chunk_py3 import ApplicationHealthStateChunk + from .application_health_state_chunk_list_py3 import ApplicationHealthStateChunkList + from .replica_health_state_filter_py3 import ReplicaHealthStateFilter + from .partition_health_state_filter_py3 import PartitionHealthStateFilter + from .service_health_state_filter_py3 import ServiceHealthStateFilter + from .deployed_service_package_health_state_filter_py3 import DeployedServicePackageHealthStateFilter + from .deployed_application_health_state_filter_py3 import DeployedApplicationHealthStateFilter + from .application_health_state_filter_py3 import ApplicationHealthStateFilter + from .application_parameter_py3 import ApplicationParameter + from .managed_application_identity_py3 import ManagedApplicationIdentity + from .managed_application_identity_description_py3 import ManagedApplicationIdentityDescription + from .application_info_py3 import ApplicationInfo + from .application_load_metric_information_py3 import ApplicationLoadMetricInformation + from .application_load_info_py3 import ApplicationLoadInfo + from .application_name_info_py3 import ApplicationNameInfo + from .applications_health_evaluation_py3 import ApplicationsHealthEvaluation + from .application_type_applications_health_evaluation_py3 import ApplicationTypeApplicationsHealthEvaluation + from .application_type_health_policy_map_item_py3 import ApplicationTypeHealthPolicyMapItem + from .application_type_info_py3 import ApplicationTypeInfo + from .paged_application_type_info_list_py3 import PagedApplicationTypeInfoList + from .application_type_manifest_py3 import ApplicationTypeManifest + from .monitoring_policy_description_py3 import MonitoringPolicyDescription + from .application_upgrade_description_py3 import ApplicationUpgradeDescription + from .upgrade_domain_info_py3 import UpgradeDomainInfo + from .safety_check_py3 import SafetyCheck + from .safety_check_wrapper_py3 import SafetyCheckWrapper + from .node_upgrade_progress_info_py3 import NodeUpgradeProgressInfo + from .current_upgrade_domain_progress_info_py3 import CurrentUpgradeDomainProgressInfo + from .failure_upgrade_domain_progress_info_py3 import FailureUpgradeDomainProgressInfo + from .application_upgrade_progress_info_py3 import ApplicationUpgradeProgressInfo + from .cluster_configuration_py3 import ClusterConfiguration + from .cluster_event_py3 import ClusterEvent + from .node_id_py3 import NodeId + from .node_health_state_py3 import NodeHealthState + from .cluster_health_py3 import ClusterHealth + from .node_health_state_chunk_py3 import NodeHealthStateChunk + from .node_health_state_chunk_list_py3 import NodeHealthStateChunkList + from .cluster_health_chunk_py3 import ClusterHealthChunk + from .node_health_state_filter_py3 import NodeHealthStateFilter + from .node_type_health_policy_map_item_py3 import NodeTypeHealthPolicyMapItem + from .cluster_health_policy_py3 import ClusterHealthPolicy + from .cluster_health_chunk_query_description_py3 import ClusterHealthChunkQueryDescription + from .cluster_health_policies_py3 import ClusterHealthPolicies + from .cluster_manifest_py3 import ClusterManifest + from .load_metric_information_py3 import LoadMetricInformation + from .cluster_load_info_py3 import ClusterLoadInfo + from .cluster_version_py3 import ClusterVersion + from .container_api_request_body_py3 import ContainerApiRequestBody + from .container_api_result_py3 import ContainerApiResult + from .container_api_response_py3 import ContainerApiResponse + from .container_instance_event_py3 import ContainerInstanceEvent + from .config_parameter_override_py3 import ConfigParameterOverride + from .deactivation_intent_description_py3 import DeactivationIntentDescription + from .delta_nodes_check_health_evaluation_py3 import DeltaNodesCheckHealthEvaluation + from .deployed_service_package_health_state_py3 import DeployedServicePackageHealthState + from .deployed_application_health_py3 import DeployedApplicationHealth + from .deployed_application_health_evaluation_py3 import DeployedApplicationHealthEvaluation + from .deployed_application_info_py3 import DeployedApplicationInfo + from .deployed_applications_health_evaluation_py3 import DeployedApplicationsHealthEvaluation + from .deployed_service_package_health_py3 import DeployedServicePackageHealth + from .deployed_service_package_health_evaluation_py3 import DeployedServicePackageHealthEvaluation + from .deployed_service_packages_health_evaluation_py3 import DeployedServicePackagesHealthEvaluation + from .deployed_service_replica_info_py3 import DeployedServiceReplicaInfo + from .reconfiguration_information_py3 import ReconfigurationInformation + from .deployed_stateful_service_replica_info_py3 import DeployedStatefulServiceReplicaInfo + from .deployed_stateless_service_instance_info_py3 import DeployedStatelessServiceInstanceInfo + from .health_event_py3 import HealthEvent + from .health_state_count_py3 import HealthStateCount + from .entity_kind_health_state_count_py3 import EntityKindHealthStateCount + from .health_statistics_py3 import HealthStatistics + from .entity_health_py3 import EntityHealth + from .entity_health_state_py3 import EntityHealthState + from .entity_health_state_chunk_py3 import EntityHealthStateChunk + from .entity_health_state_chunk_list_py3 import EntityHealthStateChunkList + from .epoch_py3 import Epoch + from .event_health_evaluation_py3 import EventHealthEvaluation + from .fabric_event_py3 import FabricEvent + from .fabric_code_version_info_py3 import FabricCodeVersionInfo + from .fabric_config_version_info_py3 import FabricConfigVersionInfo + from .cluster_configuration_upgrade_status_info_py3 import ClusterConfigurationUpgradeStatusInfo + from .health_information_py3 import HealthInformation + from .int64_range_partition_information_py3 import Int64RangePartitionInformation + from .loaded_partition_information_result_py3 import LoadedPartitionInformationResult + from .loaded_partition_information_result_list_py3 import LoadedPartitionInformationResultList + from .loaded_partition_information_query_description_py3 import LoadedPartitionInformationQueryDescription + from .named_partition_information_py3 import NamedPartitionInformation + from .node_deactivation_task_id_py3 import NodeDeactivationTaskId + from .node_deactivation_task_py3 import NodeDeactivationTask + from .node_deactivation_info_py3 import NodeDeactivationInfo + from .node_event_py3 import NodeEvent + from .node_health_py3 import NodeHealth + from .node_health_evaluation_py3 import NodeHealthEvaluation + from .node_info_py3 import NodeInfo + from .node_load_metric_information_py3 import NodeLoadMetricInformation + from .node_load_info_py3 import NodeLoadInfo + from .nodes_health_evaluation_py3 import NodesHealthEvaluation + from .paged_application_info_list_py3 import PagedApplicationInfoList + from .paged_deployed_application_info_list_py3 import PagedDeployedApplicationInfoList + from .paged_node_info_list_py3 import PagedNodeInfoList + from .partition_information_py3 import PartitionInformation + from .service_partition_info_py3 import ServicePartitionInfo + from .paged_service_partition_info_list_py3 import PagedServicePartitionInfoList + from .replica_info_py3 import ReplicaInfo + from .paged_replica_info_list_py3 import PagedReplicaInfoList + from .service_info_py3 import ServiceInfo + from .paged_service_info_list_py3 import PagedServiceInfoList + from .partition_analysis_event_py3 import PartitionAnalysisEvent + from .partition_event_py3 import PartitionEvent + from .replica_health_state_py3 import ReplicaHealthState + from .partition_health_py3 import PartitionHealth + from .partition_health_evaluation_py3 import PartitionHealthEvaluation + from .partition_health_state_py3 import PartitionHealthState + from .provision_fabric_description_py3 import ProvisionFabricDescription + from .provision_application_type_description_base_py3 import ProvisionApplicationTypeDescriptionBase + from .provision_application_type_description_py3 import ProvisionApplicationTypeDescription + from .external_store_provision_application_type_description_py3 import ExternalStoreProvisionApplicationTypeDescription + from .unprovision_fabric_description_py3 import UnprovisionFabricDescription + from .resume_cluster_upgrade_description_py3 import ResumeClusterUpgradeDescription + from .cluster_upgrade_health_policy_object_py3 import ClusterUpgradeHealthPolicyObject + from .start_cluster_upgrade_description_py3 import StartClusterUpgradeDescription + from .rolling_upgrade_update_description_py3 import RollingUpgradeUpdateDescription + from .update_cluster_upgrade_description_py3 import UpdateClusterUpgradeDescription + from .partition_safety_check_py3 import PartitionSafetyCheck + from .ensure_availability_safety_check_py3 import EnsureAvailabilitySafetyCheck + from .ensure_partition_quorum_safety_check_py3 import EnsurePartitionQuorumSafetyCheck + from .seed_node_safety_check_py3 import SeedNodeSafetyCheck + from .partitions_health_evaluation_py3 import PartitionsHealthEvaluation + from .replica_event_py3 import ReplicaEvent + from .replica_health_py3 import ReplicaHealth + from .replica_health_evaluation_py3 import ReplicaHealthEvaluation + from .replicas_health_evaluation_py3 import ReplicasHealthEvaluation + from .restart_node_description_py3 import RestartNodeDescription + from .service_event_py3 import ServiceEvent + from .service_from_template_description_py3 import ServiceFromTemplateDescription + from .service_health_evaluation_py3 import ServiceHealthEvaluation + from .service_health_py3 import ServiceHealth + from .service_name_info_py3 import ServiceNameInfo + from .service_placement_invalid_domain_policy_description_py3 import ServicePlacementInvalidDomainPolicyDescription + from .service_placement_non_partially_place_service_policy_description_py3 import ServicePlacementNonPartiallyPlaceServicePolicyDescription + from .service_placement_allow_multiple_stateless_instances_on_node_policy_description_py3 import ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription + from .service_placement_policy_description_py3 import ServicePlacementPolicyDescription + from .service_placement_prefer_primary_domain_policy_description_py3 import ServicePlacementPreferPrimaryDomainPolicyDescription + from .service_placement_required_domain_policy_description_py3 import ServicePlacementRequiredDomainPolicyDescription + from .service_placement_require_domain_distribution_policy_description_py3 import ServicePlacementRequireDomainDistributionPolicyDescription + from .services_health_evaluation_py3 import ServicesHealthEvaluation + from .service_load_metric_description_py3 import ServiceLoadMetricDescription + from .service_type_extension_description_py3 import ServiceTypeExtensionDescription + from .service_type_description_py3 import ServiceTypeDescription + from .service_type_info_py3 import ServiceTypeInfo + from .service_type_manifest_py3 import ServiceTypeManifest + from .singleton_partition_information_py3 import SingletonPartitionInformation + from .stateful_service_info_py3 import StatefulServiceInfo + from .stateful_service_partition_info_py3 import StatefulServicePartitionInfo + from .stateful_service_replica_health_py3 import StatefulServiceReplicaHealth + from .stateful_service_replica_health_state_py3 import StatefulServiceReplicaHealthState + from .stateful_service_type_description_py3 import StatefulServiceTypeDescription + from .stateless_service_info_py3 import StatelessServiceInfo + from .stateless_service_instance_health_py3 import StatelessServiceInstanceHealth + from .stateless_service_instance_health_state_py3 import StatelessServiceInstanceHealthState + from .stateless_service_partition_info_py3 import StatelessServicePartitionInfo + from .stateless_service_type_description_py3 import StatelessServiceTypeDescription + from .system_application_health_evaluation_py3 import SystemApplicationHealthEvaluation + from .upgrade_domain_delta_nodes_check_health_evaluation_py3 import UpgradeDomainDeltaNodesCheckHealthEvaluation + from .upgrade_domain_nodes_health_evaluation_py3 import UpgradeDomainNodesHealthEvaluation + from .wait_for_inbuild_replica_safety_check_py3 import WaitForInbuildReplicaSafetyCheck + from .wait_for_primary_placement_safety_check_py3 import WaitForPrimaryPlacementSafetyCheck + from .wait_for_primary_swap_safety_check_py3 import WaitForPrimarySwapSafetyCheck + from .wait_for_reconfiguration_safety_check_py3 import WaitForReconfigurationSafetyCheck + from .load_metric_report_py3 import LoadMetricReport + from .partition_load_information_py3 import PartitionLoadInformation + from .stateful_service_replica_info_py3 import StatefulServiceReplicaInfo + from .stateless_service_instance_info_py3 import StatelessServiceInstanceInfo + from .cluster_upgrade_description_object_py3 import ClusterUpgradeDescriptionObject + from .failed_upgrade_domain_progress_object_py3 import FailedUpgradeDomainProgressObject + from .cluster_upgrade_progress_object_py3 import ClusterUpgradeProgressObject + from .cluster_configuration_upgrade_description_py3 import ClusterConfigurationUpgradeDescription + from .upgrade_orchestration_service_state_py3 import UpgradeOrchestrationServiceState + from .upgrade_orchestration_service_state_summary_py3 import UpgradeOrchestrationServiceStateSummary + from .application_type_image_store_path_py3 import ApplicationTypeImageStorePath + from .unprovision_application_type_description_info_py3 import UnprovisionApplicationTypeDescriptionInfo + from .code_package_entry_point_statistics_py3 import CodePackageEntryPointStatistics + from .code_package_entry_point_py3 import CodePackageEntryPoint + from .deployed_code_package_info_py3 import DeployedCodePackageInfo + from .chaos_context_py3 import ChaosContext + from .chaos_target_filter_py3 import ChaosTargetFilter + from .chaos_parameters_py3 import ChaosParameters + from .chaos_py3 import Chaos + from .chaos_parameters_dictionary_item_py3 import ChaosParametersDictionaryItem + from .chaos_event_py3 import ChaosEvent + from .chaos_event_wrapper_py3 import ChaosEventWrapper + from .chaos_events_segment_py3 import ChaosEventsSegment + from .chaos_schedule_job_active_days_of_week_py3 import ChaosScheduleJobActiveDaysOfWeek + from .time_of_day_py3 import TimeOfDay + from .time_range_py3 import TimeRange + from .chaos_schedule_job_py3 import ChaosScheduleJob + from .chaos_schedule_py3 import ChaosSchedule + from .chaos_schedule_description_py3 import ChaosScheduleDescription + from .executing_faults_chaos_event_py3 import ExecutingFaultsChaosEvent + from .started_chaos_event_py3 import StartedChaosEvent + from .stopped_chaos_event_py3 import StoppedChaosEvent + from .test_error_chaos_event_py3 import TestErrorChaosEvent + from .validation_failed_chaos_event_py3 import ValidationFailedChaosEvent + from .waiting_chaos_event_py3 import WaitingChaosEvent + from .application_metric_description_py3 import ApplicationMetricDescription + from .application_capacity_description_py3 import ApplicationCapacityDescription + from .application_description_py3 import ApplicationDescription + from .compose_deployment_status_info_py3 import ComposeDeploymentStatusInfo + from .registry_credential_py3 import RegistryCredential + from .compose_deployment_upgrade_description_py3 import ComposeDeploymentUpgradeDescription + from .compose_deployment_upgrade_progress_info_py3 import ComposeDeploymentUpgradeProgressInfo + from .paged_compose_deployment_status_info_list_py3 import PagedComposeDeploymentStatusInfoList + from .create_compose_deployment_description_py3 import CreateComposeDeploymentDescription + from .deployed_service_package_info_py3 import DeployedServicePackageInfo + from .service_correlation_description_py3 import ServiceCorrelationDescription + from .partition_scheme_description_py3 import PartitionSchemeDescription + from .named_partition_scheme_description_py3 import NamedPartitionSchemeDescription + from .singleton_partition_scheme_description_py3 import SingletonPartitionSchemeDescription + from .uniform_int64_range_partition_scheme_description_py3 import UniformInt64RangePartitionSchemeDescription + from .scaling_trigger_description_py3 import ScalingTriggerDescription + from .scaling_mechanism_description_py3 import ScalingMechanismDescription + from .scaling_policy_description_py3 import ScalingPolicyDescription + from .node_tags_description_py3 import NodeTagsDescription + from .service_description_py3 import ServiceDescription + from .replica_lifecycle_description_py3 import ReplicaLifecycleDescription + from .stateful_service_description_py3 import StatefulServiceDescription + from .instance_lifecycle_description_py3 import InstanceLifecycleDescription + from .stateless_service_description_py3 import StatelessServiceDescription + from .replicator_queue_status_py3 import ReplicatorQueueStatus + from .replicator_status_py3 import ReplicatorStatus + from .remote_replicator_acknowledgement_detail_py3 import RemoteReplicatorAcknowledgementDetail + from .remote_replicator_acknowledgement_status_py3 import RemoteReplicatorAcknowledgementStatus + from .remote_replicator_status_py3 import RemoteReplicatorStatus + from .primary_replicator_status_py3 import PrimaryReplicatorStatus + from .secondary_replicator_status_py3 import SecondaryReplicatorStatus + from .secondary_active_replicator_status_py3 import SecondaryActiveReplicatorStatus + from .secondary_idle_replicator_status_py3 import SecondaryIdleReplicatorStatus + from .load_metric_report_info_py3 import LoadMetricReportInfo + from .deployed_service_replica_detail_info_py3 import DeployedServiceReplicaDetailInfo + from .key_value_store_replica_status_py3 import KeyValueStoreReplicaStatus + from .deployed_stateful_service_replica_detail_info_py3 import DeployedStatefulServiceReplicaDetailInfo + from .deployed_stateless_service_instance_detail_info_py3 import DeployedStatelessServiceInstanceDetailInfo + from .replica_status_base_py3 import ReplicaStatusBase + from .service_update_description_py3 import ServiceUpdateDescription + from .stateful_service_update_description_py3 import StatefulServiceUpdateDescription + from .stateless_service_update_description_py3 import StatelessServiceUpdateDescription + from .file_version_py3 import FileVersion + from .disk_info_py3 import DiskInfo + from .file_info_py3 import FileInfo + from .folder_info_py3 import FolderInfo + from .folder_size_info_py3 import FolderSizeInfo + from .usage_info_py3 import UsageInfo + from .image_store_content_py3 import ImageStoreContent + from .image_store_copy_description_py3 import ImageStoreCopyDescription + from .image_store_info_py3 import ImageStoreInfo + from .restart_deployed_code_package_description_py3 import RestartDeployedCodePackageDescription + from .deployed_service_type_info_py3 import DeployedServiceTypeInfo + from .resolved_service_endpoint_py3 import ResolvedServiceEndpoint + from .resolved_service_partition_py3 import ResolvedServicePartition + from .selected_partition_py3 import SelectedPartition + from .invoke_data_loss_result_py3 import InvokeDataLossResult + from .invoke_quorum_loss_result_py3 import InvokeQuorumLossResult + from .node_result_py3 import NodeResult + from .node_transition_result_py3 import NodeTransitionResult + from .node_transition_progress_py3 import NodeTransitionProgress + from .operation_status_py3 import OperationStatus + from .partition_data_loss_progress_py3 import PartitionDataLossProgress + from .partition_quorum_loss_progress_py3 import PartitionQuorumLossProgress + from .restart_partition_result_py3 import RestartPartitionResult + from .partition_restart_progress_py3 import PartitionRestartProgress + from .package_sharing_policy_info_py3 import PackageSharingPolicyInfo + from .deploy_service_package_to_node_description_py3 import DeployServicePackageToNodeDescription + from .resume_application_upgrade_description_py3 import ResumeApplicationUpgradeDescription + from .application_upgrade_update_description_py3 import ApplicationUpgradeUpdateDescription + from .name_description_py3 import NameDescription + from .paged_sub_name_info_list_py3 import PagedSubNameInfoList + from .property_value_py3 import PropertyValue + from .binary_property_value_py3 import BinaryPropertyValue + from .int64_property_value_py3 import Int64PropertyValue + from .double_property_value_py3 import DoublePropertyValue + from .string_property_value_py3 import StringPropertyValue + from .guid_property_value_py3 import GuidPropertyValue + from .property_metadata_py3 import PropertyMetadata + from .property_info_py3 import PropertyInfo + from .paged_property_info_list_py3 import PagedPropertyInfoList + from .property_description_py3 import PropertyDescription + from .property_batch_operation_py3 import PropertyBatchOperation + from .property_batch_description_list_py3 import PropertyBatchDescriptionList + from .check_exists_property_batch_operation_py3 import CheckExistsPropertyBatchOperation + from .check_sequence_property_batch_operation_py3 import CheckSequencePropertyBatchOperation + from .check_value_property_batch_operation_py3 import CheckValuePropertyBatchOperation + from .delete_property_batch_operation_py3 import DeletePropertyBatchOperation + from .get_property_batch_operation_py3 import GetPropertyBatchOperation + from .put_property_batch_operation_py3 import PutPropertyBatchOperation + from .property_batch_info_py3 import PropertyBatchInfo + from .successful_property_batch_info_py3 import SuccessfulPropertyBatchInfo + from .failed_property_batch_info_py3 import FailedPropertyBatchInfo + from .backup_schedule_description_py3 import BackupScheduleDescription + from .backup_storage_description_py3 import BackupStorageDescription + from .retention_policy_description_py3 import RetentionPolicyDescription + from .backup_policy_description_py3 import BackupPolicyDescription + from .paged_backup_policy_description_list_py3 import PagedBackupPolicyDescriptionList + from .basic_retention_policy_description_py3 import BasicRetentionPolicyDescription + from .disable_backup_description_py3 import DisableBackupDescription + from .application_backup_configuration_info_py3 import ApplicationBackupConfigurationInfo + from .service_backup_configuration_info_py3 import ServiceBackupConfigurationInfo + from .backup_suspension_info_py3 import BackupSuspensionInfo + from .backup_configuration_info_py3 import BackupConfigurationInfo + from .paged_backup_configuration_info_list_py3 import PagedBackupConfigurationInfoList + from .restore_partition_description_py3 import RestorePartitionDescription + from .restore_progress_info_py3 import RestoreProgressInfo + from .backup_partition_description_py3 import BackupPartitionDescription + from .backup_info_py3 import BackupInfo + from .paged_backup_info_list_py3 import PagedBackupInfoList + from .azure_blob_backup_storage_description_py3 import AzureBlobBackupStorageDescription + from .file_share_backup_storage_description_py3 import FileShareBackupStorageDescription + from .dsms_azure_blob_backup_storage_description_py3 import DsmsAzureBlobBackupStorageDescription + from .managed_identity_azure_blob_backup_storage_description_py3 import ManagedIdentityAzureBlobBackupStorageDescription + from .frequency_based_backup_schedule_description_py3 import FrequencyBasedBackupScheduleDescription + from .time_based_backup_schedule_description_py3 import TimeBasedBackupScheduleDescription + from .backup_progress_info_py3 import BackupProgressInfo + from .partition_backup_configuration_info_py3 import PartitionBackupConfigurationInfo + from .backup_entity_py3 import BackupEntity + from .application_backup_entity_py3 import ApplicationBackupEntity + from .service_backup_entity_py3 import ServiceBackupEntity + from .partition_backup_entity_py3 import PartitionBackupEntity + from .enable_backup_description_py3 import EnableBackupDescription + from .paged_backup_entity_list_py3 import PagedBackupEntityList + from .get_backup_by_storage_query_description_py3 import GetBackupByStorageQueryDescription + from .node_impact_py3 import NodeImpact + from .node_repair_impact_description_py3 import NodeRepairImpactDescription + from .node_repair_target_description_py3 import NodeRepairTargetDescription + from .repair_impact_description_base_py3 import RepairImpactDescriptionBase + from .repair_target_description_base_py3 import RepairTargetDescriptionBase + from .repair_task_history_py3 import RepairTaskHistory + from .repair_task_py3 import RepairTask + from .repair_task_approve_description_py3 import RepairTaskApproveDescription + from .repair_task_cancel_description_py3 import RepairTaskCancelDescription + from .repair_task_delete_description_py3 import RepairTaskDeleteDescription + from .repair_task_update_health_policy_description_py3 import RepairTaskUpdateHealthPolicyDescription + from .repair_task_update_info_py3 import RepairTaskUpdateInfo + from .upload_chunk_range_py3 import UploadChunkRange + from .upload_session_info_py3 import UploadSessionInfo + from .upload_session_py3 import UploadSession + from .average_partition_load_scaling_trigger_py3 import AveragePartitionLoadScalingTrigger + from .average_service_load_scaling_trigger_py3 import AverageServiceLoadScalingTrigger + from .partition_instance_count_scale_mechanism_py3 import PartitionInstanceCountScaleMechanism + from .add_remove_incremental_named_partition_scaling_mechanism_py3 import AddRemoveIncrementalNamedPartitionScalingMechanism + from .unplaced_replica_information_py3 import UnplacedReplicaInformation + from .application_created_event_py3 import ApplicationCreatedEvent + from .application_deleted_event_py3 import ApplicationDeletedEvent + from .application_new_health_report_event_py3 import ApplicationNewHealthReportEvent + from .application_health_report_expired_event_py3 import ApplicationHealthReportExpiredEvent + from .application_upgrade_completed_event_py3 import ApplicationUpgradeCompletedEvent + from .application_upgrade_domain_completed_event_py3 import ApplicationUpgradeDomainCompletedEvent + from .application_upgrade_rollback_completed_event_py3 import ApplicationUpgradeRollbackCompletedEvent + from .application_upgrade_rollback_started_event_py3 import ApplicationUpgradeRollbackStartedEvent + from .application_upgrade_started_event_py3 import ApplicationUpgradeStartedEvent + from .deployed_application_new_health_report_event_py3 import DeployedApplicationNewHealthReportEvent + from .deployed_application_health_report_expired_event_py3 import DeployedApplicationHealthReportExpiredEvent + from .application_process_exited_event_py3 import ApplicationProcessExitedEvent + from .application_container_instance_exited_event_py3 import ApplicationContainerInstanceExitedEvent + from .node_aborted_event_py3 import NodeAbortedEvent + from .node_added_to_cluster_event_py3 import NodeAddedToClusterEvent + from .node_closed_event_py3 import NodeClosedEvent + from .node_deactivate_completed_event_py3 import NodeDeactivateCompletedEvent + from .node_deactivate_started_event_py3 import NodeDeactivateStartedEvent + from .node_down_event_py3 import NodeDownEvent + from .node_new_health_report_event_py3 import NodeNewHealthReportEvent + from .node_health_report_expired_event_py3 import NodeHealthReportExpiredEvent + from .node_open_succeeded_event_py3 import NodeOpenSucceededEvent + from .node_open_failed_event_py3 import NodeOpenFailedEvent + from .node_removed_from_cluster_event_py3 import NodeRemovedFromClusterEvent + from .node_up_event_py3 import NodeUpEvent + from .partition_new_health_report_event_py3 import PartitionNewHealthReportEvent + from .partition_health_report_expired_event_py3 import PartitionHealthReportExpiredEvent + from .partition_reconfigured_event_py3 import PartitionReconfiguredEvent + from .partition_primary_move_analysis_event_py3 import PartitionPrimaryMoveAnalysisEvent + from .service_created_event_py3 import ServiceCreatedEvent + from .service_deleted_event_py3 import ServiceDeletedEvent + from .service_new_health_report_event_py3 import ServiceNewHealthReportEvent + from .service_health_report_expired_event_py3 import ServiceHealthReportExpiredEvent + from .deployed_service_package_new_health_report_event_py3 import DeployedServicePackageNewHealthReportEvent + from .deployed_service_package_health_report_expired_event_py3 import DeployedServicePackageHealthReportExpiredEvent + from .stateful_replica_new_health_report_event_py3 import StatefulReplicaNewHealthReportEvent + from .stateful_replica_health_report_expired_event_py3 import StatefulReplicaHealthReportExpiredEvent + from .stateless_replica_new_health_report_event_py3 import StatelessReplicaNewHealthReportEvent + from .stateless_replica_health_report_expired_event_py3 import StatelessReplicaHealthReportExpiredEvent + from .cluster_new_health_report_event_py3 import ClusterNewHealthReportEvent + from .cluster_health_report_expired_event_py3 import ClusterHealthReportExpiredEvent + from .cluster_upgrade_completed_event_py3 import ClusterUpgradeCompletedEvent + from .cluster_upgrade_domain_completed_event_py3 import ClusterUpgradeDomainCompletedEvent + from .cluster_upgrade_rollback_completed_event_py3 import ClusterUpgradeRollbackCompletedEvent + from .cluster_upgrade_rollback_started_event_py3 import ClusterUpgradeRollbackStartedEvent + from .cluster_upgrade_started_event_py3 import ClusterUpgradeStartedEvent + from .chaos_stopped_event_py3 import ChaosStoppedEvent + from .chaos_started_event_py3 import ChaosStartedEvent + from .chaos_code_package_restart_scheduled_event_py3 import ChaosCodePackageRestartScheduledEvent + from .chaos_replica_removal_scheduled_event_py3 import ChaosReplicaRemovalScheduledEvent + from .chaos_partition_secondary_move_scheduled_event_py3 import ChaosPartitionSecondaryMoveScheduledEvent + from .chaos_partition_primary_move_scheduled_event_py3 import ChaosPartitionPrimaryMoveScheduledEvent + from .chaos_replica_restart_scheduled_event_py3 import ChaosReplicaRestartScheduledEvent + from .chaos_node_restart_scheduled_event_py3 import ChaosNodeRestartScheduledEvent + from .metric_load_description_py3 import MetricLoadDescription + from .update_partition_load_result_py3 import UpdatePartitionLoadResult + from .paged_update_partition_load_result_list_py3 import PagedUpdatePartitionLoadResultList + from .replica_metric_load_description_py3 import ReplicaMetricLoadDescription + from .partition_metric_load_description_py3 import PartitionMetricLoadDescription + from .node_type_nodes_health_evaluation_py3 import NodeTypeNodesHealthEvaluation + from .secret_resource_properties_py3 import SecretResourceProperties + from .inlined_value_secret_resource_properties_py3 import InlinedValueSecretResourceProperties + from .secret_resource_description_py3 import SecretResourceDescription + from .paged_secret_resource_description_list_py3 import PagedSecretResourceDescriptionList + from .secret_resource_properties_base_py3 import SecretResourcePropertiesBase + from .secret_value_py3 import SecretValue + from .secret_value_properties_py3 import SecretValueProperties + from .secret_value_resource_description_py3 import SecretValueResourceDescription + from .paged_secret_value_resource_description_list_py3 import PagedSecretValueResourceDescriptionList + from .volume_provider_parameters_azure_file_py3 import VolumeProviderParametersAzureFile + from .volume_reference_py3 import VolumeReference + from .application_scoped_volume_creation_parameters_py3 import ApplicationScopedVolumeCreationParameters + from .application_scoped_volume_py3 import ApplicationScopedVolume + from .application_scoped_volume_creation_parameters_service_fabric_volume_disk_py3 import ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk + from .volume_resource_description_py3 import VolumeResourceDescription + from .paged_volume_resource_description_list_py3 import PagedVolumeResourceDescriptionList + from .endpoint_ref_py3 import EndpointRef + from .network_ref_py3 import NetworkRef + from .network_resource_properties_py3 import NetworkResourceProperties + from .local_network_resource_properties_py3 import LocalNetworkResourceProperties + from .network_resource_description_py3 import NetworkResourceDescription + from .network_resource_properties_base_py3 import NetworkResourcePropertiesBase + from .paged_network_resource_description_list_py3 import PagedNetworkResourceDescriptionList + from .gateway_destination_py3 import GatewayDestination + from .tcp_config_py3 import TcpConfig + from .http_route_match_path_py3 import HttpRouteMatchPath + from .http_route_match_header_py3 import HttpRouteMatchHeader + from .http_route_match_rule_py3 import HttpRouteMatchRule + from .http_route_config_py3 import HttpRouteConfig + from .http_host_config_py3 import HttpHostConfig + from .http_config_py3 import HttpConfig + from .gateway_resource_description_py3 import GatewayResourceDescription + from .paged_gateway_resource_description_list_py3 import PagedGatewayResourceDescriptionList + from .image_registry_credential_py3 import ImageRegistryCredential + from .environment_variable_py3 import EnvironmentVariable + from .setting_py3 import Setting + from .container_label_py3 import ContainerLabel + from .endpoint_properties_py3 import EndpointProperties + from .resource_requests_py3 import ResourceRequests + from .resource_limits_py3 import ResourceLimits + from .resource_requirements_py3 import ResourceRequirements + from .diagnostics_ref_py3 import DiagnosticsRef + from .reliable_collections_ref_py3 import ReliableCollectionsRef + from .container_state_py3 import ContainerState + from .container_event_py3 import ContainerEvent + from .container_instance_view_py3 import ContainerInstanceView + from .probe_exec_py3 import ProbeExec + from .probe_http_get_headers_py3 import ProbeHttpGetHeaders + from .probe_http_get_py3 import ProbeHttpGet + from .probe_tcp_socket_py3 import ProbeTcpSocket + from .probe_py3 import Probe + from .container_code_package_properties_py3 import ContainerCodePackageProperties + from .execution_policy_py3 import ExecutionPolicy + from .auto_scaling_trigger_py3 import AutoScalingTrigger + from .auto_scaling_mechanism_py3 import AutoScalingMechanism + from .auto_scaling_policy_py3 import AutoScalingPolicy + from .service_identity_py3 import ServiceIdentity + from .service_resource_description_py3 import ServiceResourceDescription + from .diagnostics_sink_properties_py3 import DiagnosticsSinkProperties + from .diagnostics_description_py3 import DiagnosticsDescription + from .service_upgrade_progress_py3 import ServiceUpgradeProgress + from .application_resource_upgrade_progress_info_py3 import ApplicationResourceUpgradeProgressInfo + from .azure_internal_monitoring_pipeline_sink_description_py3 import AzureInternalMonitoringPipelineSinkDescription + from .identity_item_description_py3 import IdentityItemDescription + from .identity_description_py3 import IdentityDescription + from .add_remove_replica_scaling_mechanism_py3 import AddRemoveReplicaScalingMechanism + from .auto_scaling_metric_py3 import AutoScalingMetric + from .auto_scaling_resource_metric_py3 import AutoScalingResourceMetric + from .default_execution_policy_py3 import DefaultExecutionPolicy + from .run_to_completion_execution_policy_py3 import RunToCompletionExecutionPolicy + from .service_properties_py3 import ServiceProperties + from .service_replica_properties_py3 import ServiceReplicaProperties + from .service_replica_description_py3 import ServiceReplicaDescription + from .average_load_scaling_trigger_py3 import AverageLoadScalingTrigger + from .paged_service_resource_description_list_py3 import PagedServiceResourceDescriptionList + from .paged_service_replica_description_list_py3 import PagedServiceReplicaDescriptionList + from .application_resource_description_py3 import ApplicationResourceDescription + from .paged_application_resource_description_list_py3 import PagedApplicationResourceDescriptionList except (SyntaxError, ImportError): - from ._models import AadMetadata - from ._models import AadMetadataObject - from ._models import AddRemoveIncrementalNamedPartitionScalingMechanism - from ._models import AddRemoveReplicaScalingMechanism - from ._models import AnalysisEventMetadata - from ._models import ApplicationBackupConfigurationInfo - from ._models import ApplicationBackupEntity - from ._models import ApplicationCapacityDescription - from ._models import ApplicationContainerInstanceExitedEvent - from ._models import ApplicationCreatedEvent - from ._models import ApplicationDeletedEvent - from ._models import ApplicationDescription - from ._models import ApplicationEvent - from ._models import ApplicationHealth - from ._models import ApplicationHealthEvaluation - from ._models import ApplicationHealthPolicies - from ._models import ApplicationHealthPolicy - from ._models import ApplicationHealthPolicyMapItem - from ._models import ApplicationHealthPolicyMapObject - from ._models import ApplicationHealthReportExpiredEvent - from ._models import ApplicationHealthState - from ._models import ApplicationHealthStateChunk - from ._models import ApplicationHealthStateChunkList - from ._models import ApplicationHealthStateFilter - from ._models import ApplicationInfo - from ._models import ApplicationLoadInfo - from ._models import ApplicationLoadMetricInformation - from ._models import ApplicationMetricDescription - from ._models import ApplicationNameInfo - from ._models import ApplicationNewHealthReportEvent - from ._models import ApplicationParameter - from ._models import ApplicationProcessExitedEvent - from ._models import ApplicationResourceDescription - from ._models import ApplicationResourceUpgradeProgressInfo - from ._models import ApplicationScopedVolume - from ._models import ApplicationScopedVolumeCreationParameters - from ._models import ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk - from ._models import ApplicationsHealthEvaluation - from ._models import ApplicationTypeApplicationsHealthEvaluation - from ._models import ApplicationTypeHealthPolicyMapItem - from ._models import ApplicationTypeImageStorePath - from ._models import ApplicationTypeInfo - from ._models import ApplicationTypeManifest - from ._models import ApplicationUpgradeCompletedEvent - from ._models import ApplicationUpgradeDescription - from ._models import ApplicationUpgradeDomainCompletedEvent - from ._models import ApplicationUpgradeProgressInfo - from ._models import ApplicationUpgradeRollbackCompletedEvent - from ._models import ApplicationUpgradeRollbackStartedEvent - from ._models import ApplicationUpgradeStartedEvent - from ._models import ApplicationUpgradeUpdateDescription - from ._models import AutoScalingMechanism - from ._models import AutoScalingMetric - from ._models import AutoScalingPolicy - from ._models import AutoScalingResourceMetric - from ._models import AutoScalingTrigger - from ._models import AverageLoadScalingTrigger - from ._models import AveragePartitionLoadScalingTrigger - from ._models import AverageServiceLoadScalingTrigger - from ._models import AzureBlobBackupStorageDescription - from ._models import AzureInternalMonitoringPipelineSinkDescription - from ._models import BackupConfigurationInfo - from ._models import BackupEntity - from ._models import BackupInfo - from ._models import BackupPartitionDescription - from ._models import BackupPolicyDescription - from ._models import BackupProgressInfo - from ._models import BackupScheduleDescription - from ._models import BackupStorageDescription - from ._models import BackupSuspensionInfo - from ._models import BasicRetentionPolicyDescription - from ._models import BinaryPropertyValue - from ._models import Chaos - from ._models import ChaosCodePackageRestartScheduledEvent - from ._models import ChaosContext - from ._models import ChaosEvent - from ._models import ChaosEventsSegment - from ._models import ChaosEventWrapper - from ._models import ChaosNodeRestartScheduledEvent - from ._models import ChaosParameters - from ._models import ChaosParametersDictionaryItem - from ._models import ChaosPartitionPrimaryMoveScheduledEvent - from ._models import ChaosPartitionSecondaryMoveScheduledEvent - from ._models import ChaosReplicaRemovalScheduledEvent - from ._models import ChaosReplicaRestartScheduledEvent - from ._models import ChaosSchedule - from ._models import ChaosScheduleDescription - from ._models import ChaosScheduleJob - from ._models import ChaosScheduleJobActiveDaysOfWeek - from ._models import ChaosStartedEvent - from ._models import ChaosStoppedEvent - from ._models import ChaosTargetFilter - from ._models import CheckExistsPropertyBatchOperation - from ._models import CheckSequencePropertyBatchOperation - from ._models import CheckValuePropertyBatchOperation - from ._models import ClusterConfiguration - from ._models import ClusterConfigurationUpgradeDescription - from ._models import ClusterConfigurationUpgradeStatusInfo - from ._models import ClusterEvent - from ._models import ClusterHealth - from ._models import ClusterHealthChunk - from ._models import ClusterHealthChunkQueryDescription - from ._models import ClusterHealthPolicies - from ._models import ClusterHealthPolicy - from ._models import ClusterHealthReportExpiredEvent - from ._models import ClusterLoadInfo - from ._models import ClusterManifest - from ._models import ClusterNewHealthReportEvent - from ._models import ClusterUpgradeCompletedEvent - from ._models import ClusterUpgradeDescriptionObject - from ._models import ClusterUpgradeDomainCompletedEvent - from ._models import ClusterUpgradeHealthPolicyObject - from ._models import ClusterUpgradeProgressObject - from ._models import ClusterUpgradeRollbackCompletedEvent - from ._models import ClusterUpgradeRollbackStartedEvent - from ._models import ClusterUpgradeStartedEvent - from ._models import ClusterVersion - from ._models import CodePackageEntryPoint - from ._models import CodePackageEntryPointStatistics - from ._models import ComposeDeploymentStatusInfo - from ._models import ComposeDeploymentUpgradeDescription - from ._models import ComposeDeploymentUpgradeProgressInfo - from ._models import ConfigParameterOverride - from ._models import ContainerApiRequestBody - from ._models import ContainerApiResponse - from ._models import ContainerApiResult - from ._models import ContainerCodePackageProperties - from ._models import ContainerEvent - from ._models import ContainerInstanceEvent - from ._models import ContainerInstanceView - from ._models import ContainerLabel - from ._models import ContainerLogs - from ._models import ContainerState - from ._models import CreateComposeDeploymentDescription - from ._models import CurrentUpgradeDomainProgressInfo - from ._models import DeactivationIntentDescription - from ._models import DefaultExecutionPolicy - from ._models import DeletePropertyBatchOperation - from ._models import DeltaNodesCheckHealthEvaluation - from ._models import DeployedApplicationHealth - from ._models import DeployedApplicationHealthEvaluation - from ._models import DeployedApplicationHealthReportExpiredEvent - from ._models import DeployedApplicationHealthState - from ._models import DeployedApplicationHealthStateChunk - from ._models import DeployedApplicationHealthStateChunkList - from ._models import DeployedApplicationHealthStateFilter - from ._models import DeployedApplicationInfo - from ._models import DeployedApplicationNewHealthReportEvent - from ._models import DeployedApplicationsHealthEvaluation - from ._models import DeployedCodePackageInfo - from ._models import DeployedServicePackageHealth - from ._models import DeployedServicePackageHealthEvaluation - from ._models import DeployedServicePackageHealthReportExpiredEvent - from ._models import DeployedServicePackageHealthState - from ._models import DeployedServicePackageHealthStateChunk - from ._models import DeployedServicePackageHealthStateChunkList - from ._models import DeployedServicePackageHealthStateFilter - from ._models import DeployedServicePackageInfo - from ._models import DeployedServicePackageNewHealthReportEvent - from ._models import DeployedServicePackagesHealthEvaluation - from ._models import DeployedServiceReplicaDetailInfo - from ._models import DeployedServiceReplicaInfo - from ._models import DeployedServiceTypeInfo - from ._models import DeployedStatefulServiceReplicaDetailInfo - from ._models import DeployedStatefulServiceReplicaInfo - from ._models import DeployedStatelessServiceInstanceDetailInfo - from ._models import DeployedStatelessServiceInstanceInfo - from ._models import DeployServicePackageToNodeDescription - from ._models import DiagnosticsDescription - from ._models import DiagnosticsRef - from ._models import DiagnosticsSinkProperties - from ._models import DisableBackupDescription - from ._models import DiskInfo - from ._models import DoublePropertyValue - from ._models import DsmsAzureBlobBackupStorageDescription - from ._models import EnableBackupDescription - from ._models import EndpointProperties - from ._models import EndpointRef - from ._models import EnsureAvailabilitySafetyCheck - from ._models import EnsurePartitionQuorumSafetyCheck - from ._models import EntityHealth - from ._models import EntityHealthState - from ._models import EntityHealthStateChunk - from ._models import EntityHealthStateChunkList - from ._models import EntityKindHealthStateCount - from ._models import EnvironmentVariable - from ._models import Epoch - from ._models import EventHealthEvaluation - from ._models import ExecutingFaultsChaosEvent - from ._models import ExecutionPolicy - from ._models import ExternalStoreProvisionApplicationTypeDescription - from ._models import FabricCodeVersionInfo - from ._models import FabricConfigVersionInfo - from ._models import FabricError, FabricErrorException - from ._models import FabricErrorError - from ._models import FabricEvent - from ._models import FailedPropertyBatchInfo - from ._models import FailedUpgradeDomainProgressObject - from ._models import FailureUpgradeDomainProgressInfo - from ._models import FileInfo - from ._models import FileShareBackupStorageDescription - from ._models import FileVersion - from ._models import FolderInfo - from ._models import FolderSizeInfo - from ._models import FrequencyBasedBackupScheduleDescription - from ._models import GatewayDestination - from ._models import GatewayResourceDescription - from ._models import GetBackupByStorageQueryDescription - from ._models import GetPropertyBatchOperation - from ._models import GuidPropertyValue - from ._models import HealthEvaluation - from ._models import HealthEvaluationWrapper - from ._models import HealthEvent - from ._models import HealthInformation - from ._models import HealthStateCount - from ._models import HealthStatistics - from ._models import HttpConfig - from ._models import HttpHostConfig - from ._models import HttpRouteConfig - from ._models import HttpRouteMatchHeader - from ._models import HttpRouteMatchPath - from ._models import HttpRouteMatchRule - from ._models import IdentityDescription - from ._models import IdentityItemDescription - from ._models import ImageRegistryCredential - from ._models import ImageStoreContent - from ._models import ImageStoreCopyDescription - from ._models import ImageStoreInfo - from ._models import InlinedValueSecretResourceProperties - from ._models import InstanceLifecycleDescription - from ._models import Int64PropertyValue - from ._models import Int64RangePartitionInformation - from ._models import InvokeDataLossResult - from ._models import InvokeQuorumLossResult - from ._models import KeyValueStoreReplicaStatus - from ._models import LoadedPartitionInformationQueryDescription - from ._models import LoadedPartitionInformationResult - from ._models import LoadedPartitionInformationResultList - from ._models import LoadMetricInformation - from ._models import LoadMetricReport - from ._models import LoadMetricReportInfo - from ._models import LocalNetworkResourceProperties - from ._models import ManagedApplicationIdentity - from ._models import ManagedApplicationIdentityDescription - from ._models import ManagedIdentityAzureBlobBackupStorageDescription - from ._models import MetricLoadDescription - from ._models import MonitoringPolicyDescription - from ._models import NameDescription - from ._models import NamedPartitionInformation - from ._models import NamedPartitionSchemeDescription - from ._models import NetworkRef - from ._models import NetworkResourceDescription - from ._models import NetworkResourceProperties - from ._models import NetworkResourcePropertiesBase - from ._models import NodeAbortedEvent - from ._models import NodeAddedToClusterEvent - from ._models import NodeClosedEvent - from ._models import NodeDeactivateCompletedEvent - from ._models import NodeDeactivateStartedEvent - from ._models import NodeDeactivationInfo - from ._models import NodeDeactivationTask - from ._models import NodeDeactivationTaskId - from ._models import NodeDownEvent - from ._models import NodeEvent - from ._models import NodeHealth - from ._models import NodeHealthEvaluation - from ._models import NodeHealthReportExpiredEvent - from ._models import NodeHealthState - from ._models import NodeHealthStateChunk - from ._models import NodeHealthStateChunkList - from ._models import NodeHealthStateFilter - from ._models import NodeId - from ._models import NodeImpact - from ._models import NodeInfo - from ._models import NodeLoadInfo - from ._models import NodeLoadMetricInformation - from ._models import NodeNewHealthReportEvent - from ._models import NodeOpenFailedEvent - from ._models import NodeOpenSucceededEvent - from ._models import NodeRemovedFromClusterEvent - from ._models import NodeRepairImpactDescription - from ._models import NodeRepairTargetDescription - from ._models import NodeResult - from ._models import NodesHealthEvaluation - from ._models import NodeTagsDescription - from ._models import NodeTransitionProgress - from ._models import NodeTransitionResult - from ._models import NodeTypeHealthPolicyMapItem - from ._models import NodeTypeNodesHealthEvaluation - from ._models import NodeUpEvent - from ._models import NodeUpgradeProgressInfo - from ._models import OperationStatus - from ._models import PackageSharingPolicyInfo - from ._models import PagedApplicationInfoList - from ._models import PagedApplicationResourceDescriptionList - from ._models import PagedApplicationTypeInfoList - from ._models import PagedBackupConfigurationInfoList - from ._models import PagedBackupEntityList - from ._models import PagedBackupInfoList - from ._models import PagedBackupPolicyDescriptionList - from ._models import PagedComposeDeploymentStatusInfoList - from ._models import PagedDeployedApplicationInfoList - from ._models import PagedGatewayResourceDescriptionList - from ._models import PagedNetworkResourceDescriptionList - from ._models import PagedNodeInfoList - from ._models import PagedPropertyInfoList - from ._models import PagedReplicaInfoList - from ._models import PagedSecretResourceDescriptionList - from ._models import PagedSecretValueResourceDescriptionList - from ._models import PagedServiceInfoList - from ._models import PagedServicePartitionInfoList - from ._models import PagedServiceReplicaDescriptionList - from ._models import PagedServiceResourceDescriptionList - from ._models import PagedSubNameInfoList - from ._models import PagedUpdatePartitionLoadResultList - from ._models import PagedVolumeResourceDescriptionList - from ._models import PartitionAnalysisEvent - from ._models import PartitionBackupConfigurationInfo - from ._models import PartitionBackupEntity - from ._models import PartitionDataLossProgress - from ._models import PartitionEvent - from ._models import PartitionHealth - from ._models import PartitionHealthEvaluation - from ._models import PartitionHealthReportExpiredEvent - from ._models import PartitionHealthState - from ._models import PartitionHealthStateChunk - from ._models import PartitionHealthStateChunkList - from ._models import PartitionHealthStateFilter - from ._models import PartitionInformation - from ._models import PartitionInstanceCountScaleMechanism - from ._models import PartitionLoadInformation - from ._models import PartitionMetricLoadDescription - from ._models import PartitionNewHealthReportEvent - from ._models import PartitionPrimaryMoveAnalysisEvent - from ._models import PartitionQuorumLossProgress - from ._models import PartitionReconfiguredEvent - from ._models import PartitionRestartProgress - from ._models import PartitionSafetyCheck - from ._models import PartitionSchemeDescription - from ._models import PartitionsHealthEvaluation - from ._models import PrimaryReplicatorStatus - from ._models import Probe - from ._models import ProbeExec - from ._models import ProbeHttpGet - from ._models import ProbeHttpGetHeaders - from ._models import ProbeTcpSocket - from ._models import PropertyBatchDescriptionList - from ._models import PropertyBatchInfo - from ._models import PropertyBatchOperation - from ._models import PropertyDescription - from ._models import PropertyInfo - from ._models import PropertyMetadata - from ._models import PropertyValue - from ._models import ProvisionApplicationTypeDescription - from ._models import ProvisionApplicationTypeDescriptionBase - from ._models import ProvisionFabricDescription - from ._models import PutPropertyBatchOperation - from ._models import ReconfigurationInformation - from ._models import RegistryCredential - from ._models import ReliableCollectionsRef - from ._models import RemoteReplicatorAcknowledgementDetail - from ._models import RemoteReplicatorAcknowledgementStatus - from ._models import RemoteReplicatorStatus - from ._models import RepairImpactDescriptionBase - from ._models import RepairTargetDescriptionBase - from ._models import RepairTask - from ._models import RepairTaskApproveDescription - from ._models import RepairTaskCancelDescription - from ._models import RepairTaskDeleteDescription - from ._models import RepairTaskHistory - from ._models import RepairTaskUpdateHealthPolicyDescription - from ._models import RepairTaskUpdateInfo - from ._models import ReplicaEvent - from ._models import ReplicaHealth - from ._models import ReplicaHealthEvaluation - from ._models import ReplicaHealthState - from ._models import ReplicaHealthStateChunk - from ._models import ReplicaHealthStateChunkList - from ._models import ReplicaHealthStateFilter - from ._models import ReplicaInfo - from ._models import ReplicaLifecycleDescription - from ._models import ReplicaMetricLoadDescription - from ._models import ReplicasHealthEvaluation - from ._models import ReplicaStatusBase - from ._models import ReplicatorQueueStatus - from ._models import ReplicatorStatus - from ._models import ResolvedServiceEndpoint - from ._models import ResolvedServicePartition - from ._models import ResourceLimits - from ._models import ResourceRequests - from ._models import ResourceRequirements - from ._models import RestartDeployedCodePackageDescription - from ._models import RestartNodeDescription - from ._models import RestartPartitionResult - from ._models import RestorePartitionDescription - from ._models import RestoreProgressInfo - from ._models import ResumeApplicationUpgradeDescription - from ._models import ResumeClusterUpgradeDescription - from ._models import RetentionPolicyDescription - from ._models import RollingUpgradeUpdateDescription - from ._models import RunToCompletionExecutionPolicy - from ._models import SafetyCheck - from ._models import SafetyCheckWrapper - from ._models import ScalingMechanismDescription - from ._models import ScalingPolicyDescription - from ._models import ScalingTriggerDescription - from ._models import SecondaryActiveReplicatorStatus - from ._models import SecondaryIdleReplicatorStatus - from ._models import SecondaryReplicatorStatus - from ._models import SecretResourceDescription - from ._models import SecretResourceProperties - from ._models import SecretResourcePropertiesBase - from ._models import SecretValue - from ._models import SecretValueProperties - from ._models import SecretValueResourceDescription - from ._models import SeedNodeSafetyCheck - from ._models import SelectedPartition - from ._models import ServiceBackupConfigurationInfo - from ._models import ServiceBackupEntity - from ._models import ServiceCorrelationDescription - from ._models import ServiceCreatedEvent - from ._models import ServiceDeletedEvent - from ._models import ServiceDescription - from ._models import ServiceEvent - from ._models import ServiceFromTemplateDescription - from ._models import ServiceHealth - from ._models import ServiceHealthEvaluation - from ._models import ServiceHealthReportExpiredEvent - from ._models import ServiceHealthState - from ._models import ServiceHealthStateChunk - from ._models import ServiceHealthStateChunkList - from ._models import ServiceHealthStateFilter - from ._models import ServiceIdentity - from ._models import ServiceInfo - from ._models import ServiceLoadMetricDescription - from ._models import ServiceNameInfo - from ._models import ServiceNewHealthReportEvent - from ._models import ServicePartitionInfo - from ._models import ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription - from ._models import ServicePlacementInvalidDomainPolicyDescription - from ._models import ServicePlacementNonPartiallyPlaceServicePolicyDescription - from ._models import ServicePlacementPolicyDescription - from ._models import ServicePlacementPreferPrimaryDomainPolicyDescription - from ._models import ServicePlacementRequiredDomainPolicyDescription - from ._models import ServicePlacementRequireDomainDistributionPolicyDescription - from ._models import ServiceProperties - from ._models import ServiceReplicaDescription - from ._models import ServiceReplicaProperties - from ._models import ServiceResourceDescription - from ._models import ServicesHealthEvaluation - from ._models import ServiceTypeDescription - from ._models import ServiceTypeExtensionDescription - from ._models import ServiceTypeHealthPolicy - from ._models import ServiceTypeHealthPolicyMapItem - from ._models import ServiceTypeInfo - from ._models import ServiceTypeManifest - from ._models import ServiceUpdateDescription - from ._models import ServiceUpgradeProgress - from ._models import Setting - from ._models import SingletonPartitionInformation - from ._models import SingletonPartitionSchemeDescription - from ._models import StartClusterUpgradeDescription - from ._models import StartedChaosEvent - from ._models import StatefulReplicaHealthReportExpiredEvent - from ._models import StatefulReplicaNewHealthReportEvent - from ._models import StatefulServiceDescription - from ._models import StatefulServiceInfo - from ._models import StatefulServicePartitionInfo - from ._models import StatefulServiceReplicaHealth - from ._models import StatefulServiceReplicaHealthState - from ._models import StatefulServiceReplicaInfo - from ._models import StatefulServiceTypeDescription - from ._models import StatefulServiceUpdateDescription - from ._models import StatelessReplicaHealthReportExpiredEvent - from ._models import StatelessReplicaNewHealthReportEvent - from ._models import StatelessServiceDescription - from ._models import StatelessServiceInfo - from ._models import StatelessServiceInstanceHealth - from ._models import StatelessServiceInstanceHealthState - from ._models import StatelessServiceInstanceInfo - from ._models import StatelessServicePartitionInfo - from ._models import StatelessServiceTypeDescription - from ._models import StatelessServiceUpdateDescription - from ._models import StoppedChaosEvent - from ._models import StringPropertyValue - from ._models import SuccessfulPropertyBatchInfo - from ._models import SystemApplicationHealthEvaluation - from ._models import TcpConfig - from ._models import TestErrorChaosEvent - from ._models import TimeBasedBackupScheduleDescription - from ._models import TimeOfDay - from ._models import TimeRange - from ._models import UniformInt64RangePartitionSchemeDescription - from ._models import UnplacedReplicaInformation - from ._models import UnprovisionApplicationTypeDescriptionInfo - from ._models import UnprovisionFabricDescription - from ._models import UpdateClusterUpgradeDescription - from ._models import UpdatePartitionLoadResult - from ._models import UpgradeDomainDeltaNodesCheckHealthEvaluation - from ._models import UpgradeDomainInfo - from ._models import UpgradeDomainNodesHealthEvaluation - from ._models import UpgradeOrchestrationServiceState - from ._models import UpgradeOrchestrationServiceStateSummary - from ._models import UploadChunkRange - from ._models import UploadSession - from ._models import UploadSessionInfo - from ._models import UsageInfo - from ._models import ValidationFailedChaosEvent - from ._models import VolumeProviderParametersAzureFile - from ._models import VolumeReference - from ._models import VolumeResourceDescription - from ._models import WaitForInbuildReplicaSafetyCheck - from ._models import WaitForPrimaryPlacementSafetyCheck - from ._models import WaitForPrimarySwapSafetyCheck - from ._models import WaitForReconfigurationSafetyCheck - from ._models import WaitingChaosEvent -from ._service_fabric_client_ap_is_enums import ( + from .fabric_error_error import FabricErrorError + from .fabric_error import FabricError, FabricErrorException + from .container_logs import ContainerLogs + from .aad_metadata import AadMetadata + from .aad_metadata_object import AadMetadataObject + from .analysis_event_metadata import AnalysisEventMetadata + from .application_event import ApplicationEvent + from .service_health_state import ServiceHealthState + from .deployed_application_health_state import DeployedApplicationHealthState + from .application_health import ApplicationHealth + from .health_evaluation import HealthEvaluation + from .health_evaluation_wrapper import HealthEvaluationWrapper + from .application_health_evaluation import ApplicationHealthEvaluation + from .service_type_health_policy import ServiceTypeHealthPolicy + from .service_type_health_policy_map_item import ServiceTypeHealthPolicyMapItem + from .application_health_policy import ApplicationHealthPolicy + from .application_health_policy_map_item import ApplicationHealthPolicyMapItem + from .application_health_policies import ApplicationHealthPolicies + from .application_health_policy_map_object import ApplicationHealthPolicyMapObject + from .application_health_state import ApplicationHealthState + from .replica_health_state_chunk import ReplicaHealthStateChunk + from .replica_health_state_chunk_list import ReplicaHealthStateChunkList + from .partition_health_state_chunk import PartitionHealthStateChunk + from .partition_health_state_chunk_list import PartitionHealthStateChunkList + from .service_health_state_chunk import ServiceHealthStateChunk + from .service_health_state_chunk_list import ServiceHealthStateChunkList + from .deployed_service_package_health_state_chunk import DeployedServicePackageHealthStateChunk + from .deployed_service_package_health_state_chunk_list import DeployedServicePackageHealthStateChunkList + from .deployed_application_health_state_chunk import DeployedApplicationHealthStateChunk + from .deployed_application_health_state_chunk_list import DeployedApplicationHealthStateChunkList + from .application_health_state_chunk import ApplicationHealthStateChunk + from .application_health_state_chunk_list import ApplicationHealthStateChunkList + from .replica_health_state_filter import ReplicaHealthStateFilter + from .partition_health_state_filter import PartitionHealthStateFilter + from .service_health_state_filter import ServiceHealthStateFilter + from .deployed_service_package_health_state_filter import DeployedServicePackageHealthStateFilter + from .deployed_application_health_state_filter import DeployedApplicationHealthStateFilter + from .application_health_state_filter import ApplicationHealthStateFilter + from .application_parameter import ApplicationParameter + from .managed_application_identity import ManagedApplicationIdentity + from .managed_application_identity_description import ManagedApplicationIdentityDescription + from .application_info import ApplicationInfo + from .application_load_metric_information import ApplicationLoadMetricInformation + from .application_load_info import ApplicationLoadInfo + from .application_name_info import ApplicationNameInfo + from .applications_health_evaluation import ApplicationsHealthEvaluation + from .application_type_applications_health_evaluation import ApplicationTypeApplicationsHealthEvaluation + from .application_type_health_policy_map_item import ApplicationTypeHealthPolicyMapItem + from .application_type_info import ApplicationTypeInfo + from .paged_application_type_info_list import PagedApplicationTypeInfoList + from .application_type_manifest import ApplicationTypeManifest + from .monitoring_policy_description import MonitoringPolicyDescription + from .application_upgrade_description import ApplicationUpgradeDescription + from .upgrade_domain_info import UpgradeDomainInfo + from .safety_check import SafetyCheck + from .safety_check_wrapper import SafetyCheckWrapper + from .node_upgrade_progress_info import NodeUpgradeProgressInfo + from .current_upgrade_domain_progress_info import CurrentUpgradeDomainProgressInfo + from .failure_upgrade_domain_progress_info import FailureUpgradeDomainProgressInfo + from .application_upgrade_progress_info import ApplicationUpgradeProgressInfo + from .cluster_configuration import ClusterConfiguration + from .cluster_event import ClusterEvent + from .node_id import NodeId + from .node_health_state import NodeHealthState + from .cluster_health import ClusterHealth + from .node_health_state_chunk import NodeHealthStateChunk + from .node_health_state_chunk_list import NodeHealthStateChunkList + from .cluster_health_chunk import ClusterHealthChunk + from .node_health_state_filter import NodeHealthStateFilter + from .node_type_health_policy_map_item import NodeTypeHealthPolicyMapItem + from .cluster_health_policy import ClusterHealthPolicy + from .cluster_health_chunk_query_description import ClusterHealthChunkQueryDescription + from .cluster_health_policies import ClusterHealthPolicies + from .cluster_manifest import ClusterManifest + from .load_metric_information import LoadMetricInformation + from .cluster_load_info import ClusterLoadInfo + from .cluster_version import ClusterVersion + from .container_api_request_body import ContainerApiRequestBody + from .container_api_result import ContainerApiResult + from .container_api_response import ContainerApiResponse + from .container_instance_event import ContainerInstanceEvent + from .config_parameter_override import ConfigParameterOverride + from .deactivation_intent_description import DeactivationIntentDescription + from .delta_nodes_check_health_evaluation import DeltaNodesCheckHealthEvaluation + from .deployed_service_package_health_state import DeployedServicePackageHealthState + from .deployed_application_health import DeployedApplicationHealth + from .deployed_application_health_evaluation import DeployedApplicationHealthEvaluation + from .deployed_application_info import DeployedApplicationInfo + from .deployed_applications_health_evaluation import DeployedApplicationsHealthEvaluation + from .deployed_service_package_health import DeployedServicePackageHealth + from .deployed_service_package_health_evaluation import DeployedServicePackageHealthEvaluation + from .deployed_service_packages_health_evaluation import DeployedServicePackagesHealthEvaluation + from .deployed_service_replica_info import DeployedServiceReplicaInfo + from .reconfiguration_information import ReconfigurationInformation + from .deployed_stateful_service_replica_info import DeployedStatefulServiceReplicaInfo + from .deployed_stateless_service_instance_info import DeployedStatelessServiceInstanceInfo + from .health_event import HealthEvent + from .health_state_count import HealthStateCount + from .entity_kind_health_state_count import EntityKindHealthStateCount + from .health_statistics import HealthStatistics + from .entity_health import EntityHealth + from .entity_health_state import EntityHealthState + from .entity_health_state_chunk import EntityHealthStateChunk + from .entity_health_state_chunk_list import EntityHealthStateChunkList + from .epoch import Epoch + from .event_health_evaluation import EventHealthEvaluation + from .fabric_event import FabricEvent + from .fabric_code_version_info import FabricCodeVersionInfo + from .fabric_config_version_info import FabricConfigVersionInfo + from .cluster_configuration_upgrade_status_info import ClusterConfigurationUpgradeStatusInfo + from .health_information import HealthInformation + from .int64_range_partition_information import Int64RangePartitionInformation + from .loaded_partition_information_result import LoadedPartitionInformationResult + from .loaded_partition_information_result_list import LoadedPartitionInformationResultList + from .loaded_partition_information_query_description import LoadedPartitionInformationQueryDescription + from .named_partition_information import NamedPartitionInformation + from .node_deactivation_task_id import NodeDeactivationTaskId + from .node_deactivation_task import NodeDeactivationTask + from .node_deactivation_info import NodeDeactivationInfo + from .node_event import NodeEvent + from .node_health import NodeHealth + from .node_health_evaluation import NodeHealthEvaluation + from .node_info import NodeInfo + from .node_load_metric_information import NodeLoadMetricInformation + from .node_load_info import NodeLoadInfo + from .nodes_health_evaluation import NodesHealthEvaluation + from .paged_application_info_list import PagedApplicationInfoList + from .paged_deployed_application_info_list import PagedDeployedApplicationInfoList + from .paged_node_info_list import PagedNodeInfoList + from .partition_information import PartitionInformation + from .service_partition_info import ServicePartitionInfo + from .paged_service_partition_info_list import PagedServicePartitionInfoList + from .replica_info import ReplicaInfo + from .paged_replica_info_list import PagedReplicaInfoList + from .service_info import ServiceInfo + from .paged_service_info_list import PagedServiceInfoList + from .partition_analysis_event import PartitionAnalysisEvent + from .partition_event import PartitionEvent + from .replica_health_state import ReplicaHealthState + from .partition_health import PartitionHealth + from .partition_health_evaluation import PartitionHealthEvaluation + from .partition_health_state import PartitionHealthState + from .provision_fabric_description import ProvisionFabricDescription + from .provision_application_type_description_base import ProvisionApplicationTypeDescriptionBase + from .provision_application_type_description import ProvisionApplicationTypeDescription + from .external_store_provision_application_type_description import ExternalStoreProvisionApplicationTypeDescription + from .unprovision_fabric_description import UnprovisionFabricDescription + from .resume_cluster_upgrade_description import ResumeClusterUpgradeDescription + from .cluster_upgrade_health_policy_object import ClusterUpgradeHealthPolicyObject + from .start_cluster_upgrade_description import StartClusterUpgradeDescription + from .rolling_upgrade_update_description import RollingUpgradeUpdateDescription + from .update_cluster_upgrade_description import UpdateClusterUpgradeDescription + from .partition_safety_check import PartitionSafetyCheck + from .ensure_availability_safety_check import EnsureAvailabilitySafetyCheck + from .ensure_partition_quorum_safety_check import EnsurePartitionQuorumSafetyCheck + from .seed_node_safety_check import SeedNodeSafetyCheck + from .partitions_health_evaluation import PartitionsHealthEvaluation + from .replica_event import ReplicaEvent + from .replica_health import ReplicaHealth + from .replica_health_evaluation import ReplicaHealthEvaluation + from .replicas_health_evaluation import ReplicasHealthEvaluation + from .restart_node_description import RestartNodeDescription + from .service_event import ServiceEvent + from .service_from_template_description import ServiceFromTemplateDescription + from .service_health_evaluation import ServiceHealthEvaluation + from .service_health import ServiceHealth + from .service_name_info import ServiceNameInfo + from .service_placement_invalid_domain_policy_description import ServicePlacementInvalidDomainPolicyDescription + from .service_placement_non_partially_place_service_policy_description import ServicePlacementNonPartiallyPlaceServicePolicyDescription + from .service_placement_allow_multiple_stateless_instances_on_node_policy_description import ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription + from .service_placement_policy_description import ServicePlacementPolicyDescription + from .service_placement_prefer_primary_domain_policy_description import ServicePlacementPreferPrimaryDomainPolicyDescription + from .service_placement_required_domain_policy_description import ServicePlacementRequiredDomainPolicyDescription + from .service_placement_require_domain_distribution_policy_description import ServicePlacementRequireDomainDistributionPolicyDescription + from .services_health_evaluation import ServicesHealthEvaluation + from .service_load_metric_description import ServiceLoadMetricDescription + from .service_type_extension_description import ServiceTypeExtensionDescription + from .service_type_description import ServiceTypeDescription + from .service_type_info import ServiceTypeInfo + from .service_type_manifest import ServiceTypeManifest + from .singleton_partition_information import SingletonPartitionInformation + from .stateful_service_info import StatefulServiceInfo + from .stateful_service_partition_info import StatefulServicePartitionInfo + from .stateful_service_replica_health import StatefulServiceReplicaHealth + from .stateful_service_replica_health_state import StatefulServiceReplicaHealthState + from .stateful_service_type_description import StatefulServiceTypeDescription + from .stateless_service_info import StatelessServiceInfo + from .stateless_service_instance_health import StatelessServiceInstanceHealth + from .stateless_service_instance_health_state import StatelessServiceInstanceHealthState + from .stateless_service_partition_info import StatelessServicePartitionInfo + from .stateless_service_type_description import StatelessServiceTypeDescription + from .system_application_health_evaluation import SystemApplicationHealthEvaluation + from .upgrade_domain_delta_nodes_check_health_evaluation import UpgradeDomainDeltaNodesCheckHealthEvaluation + from .upgrade_domain_nodes_health_evaluation import UpgradeDomainNodesHealthEvaluation + from .wait_for_inbuild_replica_safety_check import WaitForInbuildReplicaSafetyCheck + from .wait_for_primary_placement_safety_check import WaitForPrimaryPlacementSafetyCheck + from .wait_for_primary_swap_safety_check import WaitForPrimarySwapSafetyCheck + from .wait_for_reconfiguration_safety_check import WaitForReconfigurationSafetyCheck + from .load_metric_report import LoadMetricReport + from .partition_load_information import PartitionLoadInformation + from .stateful_service_replica_info import StatefulServiceReplicaInfo + from .stateless_service_instance_info import StatelessServiceInstanceInfo + from .cluster_upgrade_description_object import ClusterUpgradeDescriptionObject + from .failed_upgrade_domain_progress_object import FailedUpgradeDomainProgressObject + from .cluster_upgrade_progress_object import ClusterUpgradeProgressObject + from .cluster_configuration_upgrade_description import ClusterConfigurationUpgradeDescription + from .upgrade_orchestration_service_state import UpgradeOrchestrationServiceState + from .upgrade_orchestration_service_state_summary import UpgradeOrchestrationServiceStateSummary + from .application_type_image_store_path import ApplicationTypeImageStorePath + from .unprovision_application_type_description_info import UnprovisionApplicationTypeDescriptionInfo + from .code_package_entry_point_statistics import CodePackageEntryPointStatistics + from .code_package_entry_point import CodePackageEntryPoint + from .deployed_code_package_info import DeployedCodePackageInfo + from .chaos_context import ChaosContext + from .chaos_target_filter import ChaosTargetFilter + from .chaos_parameters import ChaosParameters + from .chaos import Chaos + from .chaos_parameters_dictionary_item import ChaosParametersDictionaryItem + from .chaos_event import ChaosEvent + from .chaos_event_wrapper import ChaosEventWrapper + from .chaos_events_segment import ChaosEventsSegment + from .chaos_schedule_job_active_days_of_week import ChaosScheduleJobActiveDaysOfWeek + from .time_of_day import TimeOfDay + from .time_range import TimeRange + from .chaos_schedule_job import ChaosScheduleJob + from .chaos_schedule import ChaosSchedule + from .chaos_schedule_description import ChaosScheduleDescription + from .executing_faults_chaos_event import ExecutingFaultsChaosEvent + from .started_chaos_event import StartedChaosEvent + from .stopped_chaos_event import StoppedChaosEvent + from .test_error_chaos_event import TestErrorChaosEvent + from .validation_failed_chaos_event import ValidationFailedChaosEvent + from .waiting_chaos_event import WaitingChaosEvent + from .application_metric_description import ApplicationMetricDescription + from .application_capacity_description import ApplicationCapacityDescription + from .application_description import ApplicationDescription + from .compose_deployment_status_info import ComposeDeploymentStatusInfo + from .registry_credential import RegistryCredential + from .compose_deployment_upgrade_description import ComposeDeploymentUpgradeDescription + from .compose_deployment_upgrade_progress_info import ComposeDeploymentUpgradeProgressInfo + from .paged_compose_deployment_status_info_list import PagedComposeDeploymentStatusInfoList + from .create_compose_deployment_description import CreateComposeDeploymentDescription + from .deployed_service_package_info import DeployedServicePackageInfo + from .service_correlation_description import ServiceCorrelationDescription + from .partition_scheme_description import PartitionSchemeDescription + from .named_partition_scheme_description import NamedPartitionSchemeDescription + from .singleton_partition_scheme_description import SingletonPartitionSchemeDescription + from .uniform_int64_range_partition_scheme_description import UniformInt64RangePartitionSchemeDescription + from .scaling_trigger_description import ScalingTriggerDescription + from .scaling_mechanism_description import ScalingMechanismDescription + from .scaling_policy_description import ScalingPolicyDescription + from .node_tags_description import NodeTagsDescription + from .service_description import ServiceDescription + from .replica_lifecycle_description import ReplicaLifecycleDescription + from .stateful_service_description import StatefulServiceDescription + from .instance_lifecycle_description import InstanceLifecycleDescription + from .stateless_service_description import StatelessServiceDescription + from .replicator_queue_status import ReplicatorQueueStatus + from .replicator_status import ReplicatorStatus + from .remote_replicator_acknowledgement_detail import RemoteReplicatorAcknowledgementDetail + from .remote_replicator_acknowledgement_status import RemoteReplicatorAcknowledgementStatus + from .remote_replicator_status import RemoteReplicatorStatus + from .primary_replicator_status import PrimaryReplicatorStatus + from .secondary_replicator_status import SecondaryReplicatorStatus + from .secondary_active_replicator_status import SecondaryActiveReplicatorStatus + from .secondary_idle_replicator_status import SecondaryIdleReplicatorStatus + from .load_metric_report_info import LoadMetricReportInfo + from .deployed_service_replica_detail_info import DeployedServiceReplicaDetailInfo + from .key_value_store_replica_status import KeyValueStoreReplicaStatus + from .deployed_stateful_service_replica_detail_info import DeployedStatefulServiceReplicaDetailInfo + from .deployed_stateless_service_instance_detail_info import DeployedStatelessServiceInstanceDetailInfo + from .replica_status_base import ReplicaStatusBase + from .service_update_description import ServiceUpdateDescription + from .stateful_service_update_description import StatefulServiceUpdateDescription + from .stateless_service_update_description import StatelessServiceUpdateDescription + from .file_version import FileVersion + from .disk_info import DiskInfo + from .file_info import FileInfo + from .folder_info import FolderInfo + from .folder_size_info import FolderSizeInfo + from .usage_info import UsageInfo + from .image_store_content import ImageStoreContent + from .image_store_copy_description import ImageStoreCopyDescription + from .image_store_info import ImageStoreInfo + from .restart_deployed_code_package_description import RestartDeployedCodePackageDescription + from .deployed_service_type_info import DeployedServiceTypeInfo + from .resolved_service_endpoint import ResolvedServiceEndpoint + from .resolved_service_partition import ResolvedServicePartition + from .selected_partition import SelectedPartition + from .invoke_data_loss_result import InvokeDataLossResult + from .invoke_quorum_loss_result import InvokeQuorumLossResult + from .node_result import NodeResult + from .node_transition_result import NodeTransitionResult + from .node_transition_progress import NodeTransitionProgress + from .operation_status import OperationStatus + from .partition_data_loss_progress import PartitionDataLossProgress + from .partition_quorum_loss_progress import PartitionQuorumLossProgress + from .restart_partition_result import RestartPartitionResult + from .partition_restart_progress import PartitionRestartProgress + from .package_sharing_policy_info import PackageSharingPolicyInfo + from .deploy_service_package_to_node_description import DeployServicePackageToNodeDescription + from .resume_application_upgrade_description import ResumeApplicationUpgradeDescription + from .application_upgrade_update_description import ApplicationUpgradeUpdateDescription + from .name_description import NameDescription + from .paged_sub_name_info_list import PagedSubNameInfoList + from .property_value import PropertyValue + from .binary_property_value import BinaryPropertyValue + from .int64_property_value import Int64PropertyValue + from .double_property_value import DoublePropertyValue + from .string_property_value import StringPropertyValue + from .guid_property_value import GuidPropertyValue + from .property_metadata import PropertyMetadata + from .property_info import PropertyInfo + from .paged_property_info_list import PagedPropertyInfoList + from .property_description import PropertyDescription + from .property_batch_operation import PropertyBatchOperation + from .property_batch_description_list import PropertyBatchDescriptionList + from .check_exists_property_batch_operation import CheckExistsPropertyBatchOperation + from .check_sequence_property_batch_operation import CheckSequencePropertyBatchOperation + from .check_value_property_batch_operation import CheckValuePropertyBatchOperation + from .delete_property_batch_operation import DeletePropertyBatchOperation + from .get_property_batch_operation import GetPropertyBatchOperation + from .put_property_batch_operation import PutPropertyBatchOperation + from .property_batch_info import PropertyBatchInfo + from .successful_property_batch_info import SuccessfulPropertyBatchInfo + from .failed_property_batch_info import FailedPropertyBatchInfo + from .backup_schedule_description import BackupScheduleDescription + from .backup_storage_description import BackupStorageDescription + from .retention_policy_description import RetentionPolicyDescription + from .backup_policy_description import BackupPolicyDescription + from .paged_backup_policy_description_list import PagedBackupPolicyDescriptionList + from .basic_retention_policy_description import BasicRetentionPolicyDescription + from .disable_backup_description import DisableBackupDescription + from .application_backup_configuration_info import ApplicationBackupConfigurationInfo + from .service_backup_configuration_info import ServiceBackupConfigurationInfo + from .backup_suspension_info import BackupSuspensionInfo + from .backup_configuration_info import BackupConfigurationInfo + from .paged_backup_configuration_info_list import PagedBackupConfigurationInfoList + from .restore_partition_description import RestorePartitionDescription + from .restore_progress_info import RestoreProgressInfo + from .backup_partition_description import BackupPartitionDescription + from .backup_info import BackupInfo + from .paged_backup_info_list import PagedBackupInfoList + from .azure_blob_backup_storage_description import AzureBlobBackupStorageDescription + from .file_share_backup_storage_description import FileShareBackupStorageDescription + from .dsms_azure_blob_backup_storage_description import DsmsAzureBlobBackupStorageDescription + from .managed_identity_azure_blob_backup_storage_description import ManagedIdentityAzureBlobBackupStorageDescription + from .frequency_based_backup_schedule_description import FrequencyBasedBackupScheduleDescription + from .time_based_backup_schedule_description import TimeBasedBackupScheduleDescription + from .backup_progress_info import BackupProgressInfo + from .partition_backup_configuration_info import PartitionBackupConfigurationInfo + from .backup_entity import BackupEntity + from .application_backup_entity import ApplicationBackupEntity + from .service_backup_entity import ServiceBackupEntity + from .partition_backup_entity import PartitionBackupEntity + from .enable_backup_description import EnableBackupDescription + from .paged_backup_entity_list import PagedBackupEntityList + from .get_backup_by_storage_query_description import GetBackupByStorageQueryDescription + from .node_impact import NodeImpact + from .node_repair_impact_description import NodeRepairImpactDescription + from .node_repair_target_description import NodeRepairTargetDescription + from .repair_impact_description_base import RepairImpactDescriptionBase + from .repair_target_description_base import RepairTargetDescriptionBase + from .repair_task_history import RepairTaskHistory + from .repair_task import RepairTask + from .repair_task_approve_description import RepairTaskApproveDescription + from .repair_task_cancel_description import RepairTaskCancelDescription + from .repair_task_delete_description import RepairTaskDeleteDescription + from .repair_task_update_health_policy_description import RepairTaskUpdateHealthPolicyDescription + from .repair_task_update_info import RepairTaskUpdateInfo + from .upload_chunk_range import UploadChunkRange + from .upload_session_info import UploadSessionInfo + from .upload_session import UploadSession + from .average_partition_load_scaling_trigger import AveragePartitionLoadScalingTrigger + from .average_service_load_scaling_trigger import AverageServiceLoadScalingTrigger + from .partition_instance_count_scale_mechanism import PartitionInstanceCountScaleMechanism + from .add_remove_incremental_named_partition_scaling_mechanism import AddRemoveIncrementalNamedPartitionScalingMechanism + from .unplaced_replica_information import UnplacedReplicaInformation + from .application_created_event import ApplicationCreatedEvent + from .application_deleted_event import ApplicationDeletedEvent + from .application_new_health_report_event import ApplicationNewHealthReportEvent + from .application_health_report_expired_event import ApplicationHealthReportExpiredEvent + from .application_upgrade_completed_event import ApplicationUpgradeCompletedEvent + from .application_upgrade_domain_completed_event import ApplicationUpgradeDomainCompletedEvent + from .application_upgrade_rollback_completed_event import ApplicationUpgradeRollbackCompletedEvent + from .application_upgrade_rollback_started_event import ApplicationUpgradeRollbackStartedEvent + from .application_upgrade_started_event import ApplicationUpgradeStartedEvent + from .deployed_application_new_health_report_event import DeployedApplicationNewHealthReportEvent + from .deployed_application_health_report_expired_event import DeployedApplicationHealthReportExpiredEvent + from .application_process_exited_event import ApplicationProcessExitedEvent + from .application_container_instance_exited_event import ApplicationContainerInstanceExitedEvent + from .node_aborted_event import NodeAbortedEvent + from .node_added_to_cluster_event import NodeAddedToClusterEvent + from .node_closed_event import NodeClosedEvent + from .node_deactivate_completed_event import NodeDeactivateCompletedEvent + from .node_deactivate_started_event import NodeDeactivateStartedEvent + from .node_down_event import NodeDownEvent + from .node_new_health_report_event import NodeNewHealthReportEvent + from .node_health_report_expired_event import NodeHealthReportExpiredEvent + from .node_open_succeeded_event import NodeOpenSucceededEvent + from .node_open_failed_event import NodeOpenFailedEvent + from .node_removed_from_cluster_event import NodeRemovedFromClusterEvent + from .node_up_event import NodeUpEvent + from .partition_new_health_report_event import PartitionNewHealthReportEvent + from .partition_health_report_expired_event import PartitionHealthReportExpiredEvent + from .partition_reconfigured_event import PartitionReconfiguredEvent + from .partition_primary_move_analysis_event import PartitionPrimaryMoveAnalysisEvent + from .service_created_event import ServiceCreatedEvent + from .service_deleted_event import ServiceDeletedEvent + from .service_new_health_report_event import ServiceNewHealthReportEvent + from .service_health_report_expired_event import ServiceHealthReportExpiredEvent + from .deployed_service_package_new_health_report_event import DeployedServicePackageNewHealthReportEvent + from .deployed_service_package_health_report_expired_event import DeployedServicePackageHealthReportExpiredEvent + from .stateful_replica_new_health_report_event import StatefulReplicaNewHealthReportEvent + from .stateful_replica_health_report_expired_event import StatefulReplicaHealthReportExpiredEvent + from .stateless_replica_new_health_report_event import StatelessReplicaNewHealthReportEvent + from .stateless_replica_health_report_expired_event import StatelessReplicaHealthReportExpiredEvent + from .cluster_new_health_report_event import ClusterNewHealthReportEvent + from .cluster_health_report_expired_event import ClusterHealthReportExpiredEvent + from .cluster_upgrade_completed_event import ClusterUpgradeCompletedEvent + from .cluster_upgrade_domain_completed_event import ClusterUpgradeDomainCompletedEvent + from .cluster_upgrade_rollback_completed_event import ClusterUpgradeRollbackCompletedEvent + from .cluster_upgrade_rollback_started_event import ClusterUpgradeRollbackStartedEvent + from .cluster_upgrade_started_event import ClusterUpgradeStartedEvent + from .chaos_stopped_event import ChaosStoppedEvent + from .chaos_started_event import ChaosStartedEvent + from .chaos_code_package_restart_scheduled_event import ChaosCodePackageRestartScheduledEvent + from .chaos_replica_removal_scheduled_event import ChaosReplicaRemovalScheduledEvent + from .chaos_partition_secondary_move_scheduled_event import ChaosPartitionSecondaryMoveScheduledEvent + from .chaos_partition_primary_move_scheduled_event import ChaosPartitionPrimaryMoveScheduledEvent + from .chaos_replica_restart_scheduled_event import ChaosReplicaRestartScheduledEvent + from .chaos_node_restart_scheduled_event import ChaosNodeRestartScheduledEvent + from .metric_load_description import MetricLoadDescription + from .update_partition_load_result import UpdatePartitionLoadResult + from .paged_update_partition_load_result_list import PagedUpdatePartitionLoadResultList + from .replica_metric_load_description import ReplicaMetricLoadDescription + from .partition_metric_load_description import PartitionMetricLoadDescription + from .node_type_nodes_health_evaluation import NodeTypeNodesHealthEvaluation + from .secret_resource_properties import SecretResourceProperties + from .inlined_value_secret_resource_properties import InlinedValueSecretResourceProperties + from .secret_resource_description import SecretResourceDescription + from .paged_secret_resource_description_list import PagedSecretResourceDescriptionList + from .secret_resource_properties_base import SecretResourcePropertiesBase + from .secret_value import SecretValue + from .secret_value_properties import SecretValueProperties + from .secret_value_resource_description import SecretValueResourceDescription + from .paged_secret_value_resource_description_list import PagedSecretValueResourceDescriptionList + from .volume_provider_parameters_azure_file import VolumeProviderParametersAzureFile + from .volume_reference import VolumeReference + from .application_scoped_volume_creation_parameters import ApplicationScopedVolumeCreationParameters + from .application_scoped_volume import ApplicationScopedVolume + from .application_scoped_volume_creation_parameters_service_fabric_volume_disk import ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk + from .volume_resource_description import VolumeResourceDescription + from .paged_volume_resource_description_list import PagedVolumeResourceDescriptionList + from .endpoint_ref import EndpointRef + from .network_ref import NetworkRef + from .network_resource_properties import NetworkResourceProperties + from .local_network_resource_properties import LocalNetworkResourceProperties + from .network_resource_description import NetworkResourceDescription + from .network_resource_properties_base import NetworkResourcePropertiesBase + from .paged_network_resource_description_list import PagedNetworkResourceDescriptionList + from .gateway_destination import GatewayDestination + from .tcp_config import TcpConfig + from .http_route_match_path import HttpRouteMatchPath + from .http_route_match_header import HttpRouteMatchHeader + from .http_route_match_rule import HttpRouteMatchRule + from .http_route_config import HttpRouteConfig + from .http_host_config import HttpHostConfig + from .http_config import HttpConfig + from .gateway_resource_description import GatewayResourceDescription + from .paged_gateway_resource_description_list import PagedGatewayResourceDescriptionList + from .image_registry_credential import ImageRegistryCredential + from .environment_variable import EnvironmentVariable + from .setting import Setting + from .container_label import ContainerLabel + from .endpoint_properties import EndpointProperties + from .resource_requests import ResourceRequests + from .resource_limits import ResourceLimits + from .resource_requirements import ResourceRequirements + from .diagnostics_ref import DiagnosticsRef + from .reliable_collections_ref import ReliableCollectionsRef + from .container_state import ContainerState + from .container_event import ContainerEvent + from .container_instance_view import ContainerInstanceView + from .probe_exec import ProbeExec + from .probe_http_get_headers import ProbeHttpGetHeaders + from .probe_http_get import ProbeHttpGet + from .probe_tcp_socket import ProbeTcpSocket + from .probe import Probe + from .container_code_package_properties import ContainerCodePackageProperties + from .execution_policy import ExecutionPolicy + from .auto_scaling_trigger import AutoScalingTrigger + from .auto_scaling_mechanism import AutoScalingMechanism + from .auto_scaling_policy import AutoScalingPolicy + from .service_identity import ServiceIdentity + from .service_resource_description import ServiceResourceDescription + from .diagnostics_sink_properties import DiagnosticsSinkProperties + from .diagnostics_description import DiagnosticsDescription + from .service_upgrade_progress import ServiceUpgradeProgress + from .application_resource_upgrade_progress_info import ApplicationResourceUpgradeProgressInfo + from .azure_internal_monitoring_pipeline_sink_description import AzureInternalMonitoringPipelineSinkDescription + from .identity_item_description import IdentityItemDescription + from .identity_description import IdentityDescription + from .add_remove_replica_scaling_mechanism import AddRemoveReplicaScalingMechanism + from .auto_scaling_metric import AutoScalingMetric + from .auto_scaling_resource_metric import AutoScalingResourceMetric + from .default_execution_policy import DefaultExecutionPolicy + from .run_to_completion_execution_policy import RunToCompletionExecutionPolicy + from .service_properties import ServiceProperties + from .service_replica_properties import ServiceReplicaProperties + from .service_replica_description import ServiceReplicaDescription + from .average_load_scaling_trigger import AverageLoadScalingTrigger + from .paged_service_resource_description_list import PagedServiceResourceDescriptionList + from .paged_service_replica_description_list import PagedServiceReplicaDescriptionList + from .application_resource_description import ApplicationResourceDescription + from .paged_application_resource_description_list import PagedApplicationResourceDescriptionList +from .service_fabric_client_ap_is_enums import ( HealthState, FabricErrorCodes, ApplicationDefinitionKind, @@ -1159,522 +1159,522 @@ from ._service_fabric_client_ap_is_enums import ( ) __all__ = [ + 'FabricErrorError', + 'FabricError', 'FabricErrorException', + 'ContainerLogs', 'AadMetadata', 'AadMetadataObject', - 'AddRemoveIncrementalNamedPartitionScalingMechanism', - 'AddRemoveReplicaScalingMechanism', 'AnalysisEventMetadata', - 'ApplicationBackupConfigurationInfo', - 'ApplicationBackupEntity', - 'ApplicationCapacityDescription', - 'ApplicationContainerInstanceExitedEvent', - 'ApplicationCreatedEvent', - 'ApplicationDeletedEvent', - 'ApplicationDescription', 'ApplicationEvent', + 'ServiceHealthState', + 'DeployedApplicationHealthState', 'ApplicationHealth', + 'HealthEvaluation', + 'HealthEvaluationWrapper', 'ApplicationHealthEvaluation', - 'ApplicationHealthPolicies', + 'ServiceTypeHealthPolicy', + 'ServiceTypeHealthPolicyMapItem', 'ApplicationHealthPolicy', 'ApplicationHealthPolicyMapItem', + 'ApplicationHealthPolicies', 'ApplicationHealthPolicyMapObject', - 'ApplicationHealthReportExpiredEvent', 'ApplicationHealthState', + 'ReplicaHealthStateChunk', + 'ReplicaHealthStateChunkList', + 'PartitionHealthStateChunk', + 'PartitionHealthStateChunkList', + 'ServiceHealthStateChunk', + 'ServiceHealthStateChunkList', + 'DeployedServicePackageHealthStateChunk', + 'DeployedServicePackageHealthStateChunkList', + 'DeployedApplicationHealthStateChunk', + 'DeployedApplicationHealthStateChunkList', 'ApplicationHealthStateChunk', 'ApplicationHealthStateChunkList', + 'ReplicaHealthStateFilter', + 'PartitionHealthStateFilter', + 'ServiceHealthStateFilter', + 'DeployedServicePackageHealthStateFilter', + 'DeployedApplicationHealthStateFilter', 'ApplicationHealthStateFilter', - 'ApplicationInfo', - 'ApplicationLoadInfo', - 'ApplicationLoadMetricInformation', - 'ApplicationMetricDescription', - 'ApplicationNameInfo', - 'ApplicationNewHealthReportEvent', 'ApplicationParameter', - 'ApplicationProcessExitedEvent', - 'ApplicationResourceDescription', - 'ApplicationResourceUpgradeProgressInfo', - 'ApplicationScopedVolume', - 'ApplicationScopedVolumeCreationParameters', - 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk', + 'ManagedApplicationIdentity', + 'ManagedApplicationIdentityDescription', + 'ApplicationInfo', + 'ApplicationLoadMetricInformation', + 'ApplicationLoadInfo', + 'ApplicationNameInfo', 'ApplicationsHealthEvaluation', 'ApplicationTypeApplicationsHealthEvaluation', 'ApplicationTypeHealthPolicyMapItem', - 'ApplicationTypeImageStorePath', 'ApplicationTypeInfo', + 'PagedApplicationTypeInfoList', 'ApplicationTypeManifest', - 'ApplicationUpgradeCompletedEvent', + 'MonitoringPolicyDescription', 'ApplicationUpgradeDescription', - 'ApplicationUpgradeDomainCompletedEvent', + 'UpgradeDomainInfo', + 'SafetyCheck', + 'SafetyCheckWrapper', + 'NodeUpgradeProgressInfo', + 'CurrentUpgradeDomainProgressInfo', + 'FailureUpgradeDomainProgressInfo', 'ApplicationUpgradeProgressInfo', - 'ApplicationUpgradeRollbackCompletedEvent', - 'ApplicationUpgradeRollbackStartedEvent', - 'ApplicationUpgradeStartedEvent', - 'ApplicationUpgradeUpdateDescription', - 'AutoScalingMechanism', - 'AutoScalingMetric', - 'AutoScalingPolicy', - 'AutoScalingResourceMetric', - 'AutoScalingTrigger', - 'AverageLoadScalingTrigger', - 'AveragePartitionLoadScalingTrigger', - 'AverageServiceLoadScalingTrigger', - 'AzureBlobBackupStorageDescription', - 'AzureInternalMonitoringPipelineSinkDescription', - 'BackupConfigurationInfo', - 'BackupEntity', - 'BackupInfo', - 'BackupPartitionDescription', - 'BackupPolicyDescription', - 'BackupProgressInfo', - 'BackupScheduleDescription', - 'BackupStorageDescription', - 'BackupSuspensionInfo', - 'BasicRetentionPolicyDescription', - 'BinaryPropertyValue', - 'Chaos', - 'ChaosCodePackageRestartScheduledEvent', - 'ChaosContext', - 'ChaosEvent', - 'ChaosEventsSegment', - 'ChaosEventWrapper', - 'ChaosNodeRestartScheduledEvent', - 'ChaosParameters', - 'ChaosParametersDictionaryItem', - 'ChaosPartitionPrimaryMoveScheduledEvent', - 'ChaosPartitionSecondaryMoveScheduledEvent', - 'ChaosReplicaRemovalScheduledEvent', - 'ChaosReplicaRestartScheduledEvent', - 'ChaosSchedule', - 'ChaosScheduleDescription', - 'ChaosScheduleJob', - 'ChaosScheduleJobActiveDaysOfWeek', - 'ChaosStartedEvent', - 'ChaosStoppedEvent', - 'ChaosTargetFilter', - 'CheckExistsPropertyBatchOperation', - 'CheckSequencePropertyBatchOperation', - 'CheckValuePropertyBatchOperation', 'ClusterConfiguration', - 'ClusterConfigurationUpgradeDescription', - 'ClusterConfigurationUpgradeStatusInfo', 'ClusterEvent', + 'NodeId', + 'NodeHealthState', 'ClusterHealth', + 'NodeHealthStateChunk', + 'NodeHealthStateChunkList', 'ClusterHealthChunk', + 'NodeHealthStateFilter', + 'NodeTypeHealthPolicyMapItem', + 'ClusterHealthPolicy', 'ClusterHealthChunkQueryDescription', 'ClusterHealthPolicies', - 'ClusterHealthPolicy', - 'ClusterHealthReportExpiredEvent', - 'ClusterLoadInfo', 'ClusterManifest', - 'ClusterNewHealthReportEvent', - 'ClusterUpgradeCompletedEvent', - 'ClusterUpgradeDescriptionObject', - 'ClusterUpgradeDomainCompletedEvent', - 'ClusterUpgradeHealthPolicyObject', - 'ClusterUpgradeProgressObject', - 'ClusterUpgradeRollbackCompletedEvent', - 'ClusterUpgradeRollbackStartedEvent', - 'ClusterUpgradeStartedEvent', + 'LoadMetricInformation', + 'ClusterLoadInfo', 'ClusterVersion', - 'CodePackageEntryPoint', - 'CodePackageEntryPointStatistics', - 'ComposeDeploymentStatusInfo', - 'ComposeDeploymentUpgradeDescription', - 'ComposeDeploymentUpgradeProgressInfo', - 'ConfigParameterOverride', 'ContainerApiRequestBody', - 'ContainerApiResponse', 'ContainerApiResult', - 'ContainerCodePackageProperties', - 'ContainerEvent', + 'ContainerApiResponse', 'ContainerInstanceEvent', - 'ContainerInstanceView', - 'ContainerLabel', - 'ContainerLogs', - 'ContainerState', - 'CreateComposeDeploymentDescription', - 'CurrentUpgradeDomainProgressInfo', + 'ConfigParameterOverride', 'DeactivationIntentDescription', - 'DefaultExecutionPolicy', - 'DeletePropertyBatchOperation', 'DeltaNodesCheckHealthEvaluation', + 'DeployedServicePackageHealthState', 'DeployedApplicationHealth', 'DeployedApplicationHealthEvaluation', - 'DeployedApplicationHealthReportExpiredEvent', - 'DeployedApplicationHealthState', - 'DeployedApplicationHealthStateChunk', - 'DeployedApplicationHealthStateChunkList', - 'DeployedApplicationHealthStateFilter', 'DeployedApplicationInfo', - 'DeployedApplicationNewHealthReportEvent', 'DeployedApplicationsHealthEvaluation', - 'DeployedCodePackageInfo', 'DeployedServicePackageHealth', 'DeployedServicePackageHealthEvaluation', - 'DeployedServicePackageHealthReportExpiredEvent', - 'DeployedServicePackageHealthState', - 'DeployedServicePackageHealthStateChunk', - 'DeployedServicePackageHealthStateChunkList', - 'DeployedServicePackageHealthStateFilter', - 'DeployedServicePackageInfo', - 'DeployedServicePackageNewHealthReportEvent', 'DeployedServicePackagesHealthEvaluation', - 'DeployedServiceReplicaDetailInfo', 'DeployedServiceReplicaInfo', - 'DeployedServiceTypeInfo', - 'DeployedStatefulServiceReplicaDetailInfo', + 'ReconfigurationInformation', 'DeployedStatefulServiceReplicaInfo', - 'DeployedStatelessServiceInstanceDetailInfo', 'DeployedStatelessServiceInstanceInfo', - 'DeployServicePackageToNodeDescription', - 'DiagnosticsDescription', - 'DiagnosticsRef', - 'DiagnosticsSinkProperties', - 'DisableBackupDescription', - 'DiskInfo', - 'DoublePropertyValue', - 'DsmsAzureBlobBackupStorageDescription', - 'EnableBackupDescription', - 'EndpointProperties', - 'EndpointRef', - 'EnsureAvailabilitySafetyCheck', - 'EnsurePartitionQuorumSafetyCheck', + 'HealthEvent', + 'HealthStateCount', + 'EntityKindHealthStateCount', + 'HealthStatistics', 'EntityHealth', 'EntityHealthState', 'EntityHealthStateChunk', 'EntityHealthStateChunkList', - 'EntityKindHealthStateCount', - 'EnvironmentVariable', 'Epoch', 'EventHealthEvaluation', - 'ExecutingFaultsChaosEvent', - 'ExecutionPolicy', - 'ExternalStoreProvisionApplicationTypeDescription', + 'FabricEvent', 'FabricCodeVersionInfo', 'FabricConfigVersionInfo', - 'FabricError', 'FabricErrorException', - 'FabricErrorError', - 'FabricEvent', - 'FailedPropertyBatchInfo', + 'ClusterConfigurationUpgradeStatusInfo', + 'HealthInformation', + 'Int64RangePartitionInformation', + 'LoadedPartitionInformationResult', + 'LoadedPartitionInformationResultList', + 'LoadedPartitionInformationQueryDescription', + 'NamedPartitionInformation', + 'NodeDeactivationTaskId', + 'NodeDeactivationTask', + 'NodeDeactivationInfo', + 'NodeEvent', + 'NodeHealth', + 'NodeHealthEvaluation', + 'NodeInfo', + 'NodeLoadMetricInformation', + 'NodeLoadInfo', + 'NodesHealthEvaluation', + 'PagedApplicationInfoList', + 'PagedDeployedApplicationInfoList', + 'PagedNodeInfoList', + 'PartitionInformation', + 'ServicePartitionInfo', + 'PagedServicePartitionInfoList', + 'ReplicaInfo', + 'PagedReplicaInfoList', + 'ServiceInfo', + 'PagedServiceInfoList', + 'PartitionAnalysisEvent', + 'PartitionEvent', + 'ReplicaHealthState', + 'PartitionHealth', + 'PartitionHealthEvaluation', + 'PartitionHealthState', + 'ProvisionFabricDescription', + 'ProvisionApplicationTypeDescriptionBase', + 'ProvisionApplicationTypeDescription', + 'ExternalStoreProvisionApplicationTypeDescription', + 'UnprovisionFabricDescription', + 'ResumeClusterUpgradeDescription', + 'ClusterUpgradeHealthPolicyObject', + 'StartClusterUpgradeDescription', + 'RollingUpgradeUpdateDescription', + 'UpdateClusterUpgradeDescription', + 'PartitionSafetyCheck', + 'EnsureAvailabilitySafetyCheck', + 'EnsurePartitionQuorumSafetyCheck', + 'SeedNodeSafetyCheck', + 'PartitionsHealthEvaluation', + 'ReplicaEvent', + 'ReplicaHealth', + 'ReplicaHealthEvaluation', + 'ReplicasHealthEvaluation', + 'RestartNodeDescription', + 'ServiceEvent', + 'ServiceFromTemplateDescription', + 'ServiceHealthEvaluation', + 'ServiceHealth', + 'ServiceNameInfo', + 'ServicePlacementInvalidDomainPolicyDescription', + 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', + 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', + 'ServicePlacementPolicyDescription', + 'ServicePlacementPreferPrimaryDomainPolicyDescription', + 'ServicePlacementRequiredDomainPolicyDescription', + 'ServicePlacementRequireDomainDistributionPolicyDescription', + 'ServicesHealthEvaluation', + 'ServiceLoadMetricDescription', + 'ServiceTypeExtensionDescription', + 'ServiceTypeDescription', + 'ServiceTypeInfo', + 'ServiceTypeManifest', + 'SingletonPartitionInformation', + 'StatefulServiceInfo', + 'StatefulServicePartitionInfo', + 'StatefulServiceReplicaHealth', + 'StatefulServiceReplicaHealthState', + 'StatefulServiceTypeDescription', + 'StatelessServiceInfo', + 'StatelessServiceInstanceHealth', + 'StatelessServiceInstanceHealthState', + 'StatelessServicePartitionInfo', + 'StatelessServiceTypeDescription', + 'SystemApplicationHealthEvaluation', + 'UpgradeDomainDeltaNodesCheckHealthEvaluation', + 'UpgradeDomainNodesHealthEvaluation', + 'WaitForInbuildReplicaSafetyCheck', + 'WaitForPrimaryPlacementSafetyCheck', + 'WaitForPrimarySwapSafetyCheck', + 'WaitForReconfigurationSafetyCheck', + 'LoadMetricReport', + 'PartitionLoadInformation', + 'StatefulServiceReplicaInfo', + 'StatelessServiceInstanceInfo', + 'ClusterUpgradeDescriptionObject', 'FailedUpgradeDomainProgressObject', - 'FailureUpgradeDomainProgressInfo', - 'FileInfo', - 'FileShareBackupStorageDescription', + 'ClusterUpgradeProgressObject', + 'ClusterConfigurationUpgradeDescription', + 'UpgradeOrchestrationServiceState', + 'UpgradeOrchestrationServiceStateSummary', + 'ApplicationTypeImageStorePath', + 'UnprovisionApplicationTypeDescriptionInfo', + 'CodePackageEntryPointStatistics', + 'CodePackageEntryPoint', + 'DeployedCodePackageInfo', + 'ChaosContext', + 'ChaosTargetFilter', + 'ChaosParameters', + 'Chaos', + 'ChaosParametersDictionaryItem', + 'ChaosEvent', + 'ChaosEventWrapper', + 'ChaosEventsSegment', + 'ChaosScheduleJobActiveDaysOfWeek', + 'TimeOfDay', + 'TimeRange', + 'ChaosScheduleJob', + 'ChaosSchedule', + 'ChaosScheduleDescription', + 'ExecutingFaultsChaosEvent', + 'StartedChaosEvent', + 'StoppedChaosEvent', + 'TestErrorChaosEvent', + 'ValidationFailedChaosEvent', + 'WaitingChaosEvent', + 'ApplicationMetricDescription', + 'ApplicationCapacityDescription', + 'ApplicationDescription', + 'ComposeDeploymentStatusInfo', + 'RegistryCredential', + 'ComposeDeploymentUpgradeDescription', + 'ComposeDeploymentUpgradeProgressInfo', + 'PagedComposeDeploymentStatusInfoList', + 'CreateComposeDeploymentDescription', + 'DeployedServicePackageInfo', + 'ServiceCorrelationDescription', + 'PartitionSchemeDescription', + 'NamedPartitionSchemeDescription', + 'SingletonPartitionSchemeDescription', + 'UniformInt64RangePartitionSchemeDescription', + 'ScalingTriggerDescription', + 'ScalingMechanismDescription', + 'ScalingPolicyDescription', + 'NodeTagsDescription', + 'ServiceDescription', + 'ReplicaLifecycleDescription', + 'StatefulServiceDescription', + 'InstanceLifecycleDescription', + 'StatelessServiceDescription', + 'ReplicatorQueueStatus', + 'ReplicatorStatus', + 'RemoteReplicatorAcknowledgementDetail', + 'RemoteReplicatorAcknowledgementStatus', + 'RemoteReplicatorStatus', + 'PrimaryReplicatorStatus', + 'SecondaryReplicatorStatus', + 'SecondaryActiveReplicatorStatus', + 'SecondaryIdleReplicatorStatus', + 'LoadMetricReportInfo', + 'DeployedServiceReplicaDetailInfo', + 'KeyValueStoreReplicaStatus', + 'DeployedStatefulServiceReplicaDetailInfo', + 'DeployedStatelessServiceInstanceDetailInfo', + 'ReplicaStatusBase', + 'ServiceUpdateDescription', + 'StatefulServiceUpdateDescription', + 'StatelessServiceUpdateDescription', 'FileVersion', + 'DiskInfo', + 'FileInfo', 'FolderInfo', 'FolderSizeInfo', - 'FrequencyBasedBackupScheduleDescription', - 'GatewayDestination', - 'GatewayResourceDescription', - 'GetBackupByStorageQueryDescription', - 'GetPropertyBatchOperation', - 'GuidPropertyValue', - 'HealthEvaluation', - 'HealthEvaluationWrapper', - 'HealthEvent', - 'HealthInformation', - 'HealthStateCount', - 'HealthStatistics', - 'HttpConfig', - 'HttpHostConfig', - 'HttpRouteConfig', - 'HttpRouteMatchHeader', - 'HttpRouteMatchPath', - 'HttpRouteMatchRule', - 'IdentityDescription', - 'IdentityItemDescription', - 'ImageRegistryCredential', + 'UsageInfo', 'ImageStoreContent', 'ImageStoreCopyDescription', 'ImageStoreInfo', - 'InlinedValueSecretResourceProperties', - 'InstanceLifecycleDescription', - 'Int64PropertyValue', - 'Int64RangePartitionInformation', + 'RestartDeployedCodePackageDescription', + 'DeployedServiceTypeInfo', + 'ResolvedServiceEndpoint', + 'ResolvedServicePartition', + 'SelectedPartition', 'InvokeDataLossResult', 'InvokeQuorumLossResult', - 'KeyValueStoreReplicaStatus', - 'LoadedPartitionInformationQueryDescription', - 'LoadedPartitionInformationResult', - 'LoadedPartitionInformationResultList', - 'LoadMetricInformation', - 'LoadMetricReport', - 'LoadMetricReportInfo', - 'LocalNetworkResourceProperties', - 'ManagedApplicationIdentity', - 'ManagedApplicationIdentityDescription', - 'ManagedIdentityAzureBlobBackupStorageDescription', - 'MetricLoadDescription', - 'MonitoringPolicyDescription', + 'NodeResult', + 'NodeTransitionResult', + 'NodeTransitionProgress', + 'OperationStatus', + 'PartitionDataLossProgress', + 'PartitionQuorumLossProgress', + 'RestartPartitionResult', + 'PartitionRestartProgress', + 'PackageSharingPolicyInfo', + 'DeployServicePackageToNodeDescription', + 'ResumeApplicationUpgradeDescription', + 'ApplicationUpgradeUpdateDescription', 'NameDescription', - 'NamedPartitionInformation', - 'NamedPartitionSchemeDescription', - 'NetworkRef', - 'NetworkResourceDescription', - 'NetworkResourceProperties', - 'NetworkResourcePropertiesBase', + 'PagedSubNameInfoList', + 'PropertyValue', + 'BinaryPropertyValue', + 'Int64PropertyValue', + 'DoublePropertyValue', + 'StringPropertyValue', + 'GuidPropertyValue', + 'PropertyMetadata', + 'PropertyInfo', + 'PagedPropertyInfoList', + 'PropertyDescription', + 'PropertyBatchOperation', + 'PropertyBatchDescriptionList', + 'CheckExistsPropertyBatchOperation', + 'CheckSequencePropertyBatchOperation', + 'CheckValuePropertyBatchOperation', + 'DeletePropertyBatchOperation', + 'GetPropertyBatchOperation', + 'PutPropertyBatchOperation', + 'PropertyBatchInfo', + 'SuccessfulPropertyBatchInfo', + 'FailedPropertyBatchInfo', + 'BackupScheduleDescription', + 'BackupStorageDescription', + 'RetentionPolicyDescription', + 'BackupPolicyDescription', + 'PagedBackupPolicyDescriptionList', + 'BasicRetentionPolicyDescription', + 'DisableBackupDescription', + 'ApplicationBackupConfigurationInfo', + 'ServiceBackupConfigurationInfo', + 'BackupSuspensionInfo', + 'BackupConfigurationInfo', + 'PagedBackupConfigurationInfoList', + 'RestorePartitionDescription', + 'RestoreProgressInfo', + 'BackupPartitionDescription', + 'BackupInfo', + 'PagedBackupInfoList', + 'AzureBlobBackupStorageDescription', + 'FileShareBackupStorageDescription', + 'DsmsAzureBlobBackupStorageDescription', + 'ManagedIdentityAzureBlobBackupStorageDescription', + 'FrequencyBasedBackupScheduleDescription', + 'TimeBasedBackupScheduleDescription', + 'BackupProgressInfo', + 'PartitionBackupConfigurationInfo', + 'BackupEntity', + 'ApplicationBackupEntity', + 'ServiceBackupEntity', + 'PartitionBackupEntity', + 'EnableBackupDescription', + 'PagedBackupEntityList', + 'GetBackupByStorageQueryDescription', + 'NodeImpact', + 'NodeRepairImpactDescription', + 'NodeRepairTargetDescription', + 'RepairImpactDescriptionBase', + 'RepairTargetDescriptionBase', + 'RepairTaskHistory', + 'RepairTask', + 'RepairTaskApproveDescription', + 'RepairTaskCancelDescription', + 'RepairTaskDeleteDescription', + 'RepairTaskUpdateHealthPolicyDescription', + 'RepairTaskUpdateInfo', + 'UploadChunkRange', + 'UploadSessionInfo', + 'UploadSession', + 'AveragePartitionLoadScalingTrigger', + 'AverageServiceLoadScalingTrigger', + 'PartitionInstanceCountScaleMechanism', + 'AddRemoveIncrementalNamedPartitionScalingMechanism', + 'UnplacedReplicaInformation', + 'ApplicationCreatedEvent', + 'ApplicationDeletedEvent', + 'ApplicationNewHealthReportEvent', + 'ApplicationHealthReportExpiredEvent', + 'ApplicationUpgradeCompletedEvent', + 'ApplicationUpgradeDomainCompletedEvent', + 'ApplicationUpgradeRollbackCompletedEvent', + 'ApplicationUpgradeRollbackStartedEvent', + 'ApplicationUpgradeStartedEvent', + 'DeployedApplicationNewHealthReportEvent', + 'DeployedApplicationHealthReportExpiredEvent', + 'ApplicationProcessExitedEvent', + 'ApplicationContainerInstanceExitedEvent', 'NodeAbortedEvent', 'NodeAddedToClusterEvent', 'NodeClosedEvent', 'NodeDeactivateCompletedEvent', 'NodeDeactivateStartedEvent', - 'NodeDeactivationInfo', - 'NodeDeactivationTask', - 'NodeDeactivationTaskId', 'NodeDownEvent', - 'NodeEvent', - 'NodeHealth', - 'NodeHealthEvaluation', - 'NodeHealthReportExpiredEvent', - 'NodeHealthState', - 'NodeHealthStateChunk', - 'NodeHealthStateChunkList', - 'NodeHealthStateFilter', - 'NodeId', - 'NodeImpact', - 'NodeInfo', - 'NodeLoadInfo', - 'NodeLoadMetricInformation', 'NodeNewHealthReportEvent', - 'NodeOpenFailedEvent', + 'NodeHealthReportExpiredEvent', 'NodeOpenSucceededEvent', + 'NodeOpenFailedEvent', 'NodeRemovedFromClusterEvent', - 'NodeRepairImpactDescription', - 'NodeRepairTargetDescription', - 'NodeResult', - 'NodesHealthEvaluation', - 'NodeTagsDescription', - 'NodeTransitionProgress', - 'NodeTransitionResult', - 'NodeTypeHealthPolicyMapItem', - 'NodeTypeNodesHealthEvaluation', 'NodeUpEvent', - 'NodeUpgradeProgressInfo', - 'OperationStatus', - 'PackageSharingPolicyInfo', - 'PagedApplicationInfoList', - 'PagedApplicationResourceDescriptionList', - 'PagedApplicationTypeInfoList', - 'PagedBackupConfigurationInfoList', - 'PagedBackupEntityList', - 'PagedBackupInfoList', - 'PagedBackupPolicyDescriptionList', - 'PagedComposeDeploymentStatusInfoList', - 'PagedDeployedApplicationInfoList', - 'PagedGatewayResourceDescriptionList', - 'PagedNetworkResourceDescriptionList', - 'PagedNodeInfoList', - 'PagedPropertyInfoList', - 'PagedReplicaInfoList', - 'PagedSecretResourceDescriptionList', - 'PagedSecretValueResourceDescriptionList', - 'PagedServiceInfoList', - 'PagedServicePartitionInfoList', - 'PagedServiceReplicaDescriptionList', - 'PagedServiceResourceDescriptionList', - 'PagedSubNameInfoList', - 'PagedUpdatePartitionLoadResultList', - 'PagedVolumeResourceDescriptionList', - 'PartitionAnalysisEvent', - 'PartitionBackupConfigurationInfo', - 'PartitionBackupEntity', - 'PartitionDataLossProgress', - 'PartitionEvent', - 'PartitionHealth', - 'PartitionHealthEvaluation', - 'PartitionHealthReportExpiredEvent', - 'PartitionHealthState', - 'PartitionHealthStateChunk', - 'PartitionHealthStateChunkList', - 'PartitionHealthStateFilter', - 'PartitionInformation', - 'PartitionInstanceCountScaleMechanism', - 'PartitionLoadInformation', - 'PartitionMetricLoadDescription', 'PartitionNewHealthReportEvent', - 'PartitionPrimaryMoveAnalysisEvent', - 'PartitionQuorumLossProgress', + 'PartitionHealthReportExpiredEvent', 'PartitionReconfiguredEvent', - 'PartitionRestartProgress', - 'PartitionSafetyCheck', - 'PartitionSchemeDescription', - 'PartitionsHealthEvaluation', - 'PrimaryReplicatorStatus', - 'Probe', - 'ProbeExec', - 'ProbeHttpGet', - 'ProbeHttpGetHeaders', - 'ProbeTcpSocket', - 'PropertyBatchDescriptionList', - 'PropertyBatchInfo', - 'PropertyBatchOperation', - 'PropertyDescription', - 'PropertyInfo', - 'PropertyMetadata', - 'PropertyValue', - 'ProvisionApplicationTypeDescription', - 'ProvisionApplicationTypeDescriptionBase', - 'ProvisionFabricDescription', - 'PutPropertyBatchOperation', - 'ReconfigurationInformation', - 'RegistryCredential', - 'ReliableCollectionsRef', - 'RemoteReplicatorAcknowledgementDetail', - 'RemoteReplicatorAcknowledgementStatus', - 'RemoteReplicatorStatus', - 'RepairImpactDescriptionBase', - 'RepairTargetDescriptionBase', - 'RepairTask', - 'RepairTaskApproveDescription', - 'RepairTaskCancelDescription', - 'RepairTaskDeleteDescription', - 'RepairTaskHistory', - 'RepairTaskUpdateHealthPolicyDescription', - 'RepairTaskUpdateInfo', - 'ReplicaEvent', - 'ReplicaHealth', - 'ReplicaHealthEvaluation', - 'ReplicaHealthState', - 'ReplicaHealthStateChunk', - 'ReplicaHealthStateChunkList', - 'ReplicaHealthStateFilter', - 'ReplicaInfo', - 'ReplicaLifecycleDescription', + 'PartitionPrimaryMoveAnalysisEvent', + 'ServiceCreatedEvent', + 'ServiceDeletedEvent', + 'ServiceNewHealthReportEvent', + 'ServiceHealthReportExpiredEvent', + 'DeployedServicePackageNewHealthReportEvent', + 'DeployedServicePackageHealthReportExpiredEvent', + 'StatefulReplicaNewHealthReportEvent', + 'StatefulReplicaHealthReportExpiredEvent', + 'StatelessReplicaNewHealthReportEvent', + 'StatelessReplicaHealthReportExpiredEvent', + 'ClusterNewHealthReportEvent', + 'ClusterHealthReportExpiredEvent', + 'ClusterUpgradeCompletedEvent', + 'ClusterUpgradeDomainCompletedEvent', + 'ClusterUpgradeRollbackCompletedEvent', + 'ClusterUpgradeRollbackStartedEvent', + 'ClusterUpgradeStartedEvent', + 'ChaosStoppedEvent', + 'ChaosStartedEvent', + 'ChaosCodePackageRestartScheduledEvent', + 'ChaosReplicaRemovalScheduledEvent', + 'ChaosPartitionSecondaryMoveScheduledEvent', + 'ChaosPartitionPrimaryMoveScheduledEvent', + 'ChaosReplicaRestartScheduledEvent', + 'ChaosNodeRestartScheduledEvent', + 'MetricLoadDescription', + 'UpdatePartitionLoadResult', + 'PagedUpdatePartitionLoadResultList', 'ReplicaMetricLoadDescription', - 'ReplicasHealthEvaluation', - 'ReplicaStatusBase', - 'ReplicatorQueueStatus', - 'ReplicatorStatus', - 'ResolvedServiceEndpoint', - 'ResolvedServicePartition', - 'ResourceLimits', - 'ResourceRequests', - 'ResourceRequirements', - 'RestartDeployedCodePackageDescription', - 'RestartNodeDescription', - 'RestartPartitionResult', - 'RestorePartitionDescription', - 'RestoreProgressInfo', - 'ResumeApplicationUpgradeDescription', - 'ResumeClusterUpgradeDescription', - 'RetentionPolicyDescription', - 'RollingUpgradeUpdateDescription', - 'RunToCompletionExecutionPolicy', - 'SafetyCheck', - 'SafetyCheckWrapper', - 'ScalingMechanismDescription', - 'ScalingPolicyDescription', - 'ScalingTriggerDescription', - 'SecondaryActiveReplicatorStatus', - 'SecondaryIdleReplicatorStatus', - 'SecondaryReplicatorStatus', - 'SecretResourceDescription', + 'PartitionMetricLoadDescription', + 'NodeTypeNodesHealthEvaluation', 'SecretResourceProperties', + 'InlinedValueSecretResourceProperties', + 'SecretResourceDescription', + 'PagedSecretResourceDescriptionList', 'SecretResourcePropertiesBase', 'SecretValue', 'SecretValueProperties', 'SecretValueResourceDescription', - 'SeedNodeSafetyCheck', - 'SelectedPartition', - 'ServiceBackupConfigurationInfo', - 'ServiceBackupEntity', - 'ServiceCorrelationDescription', - 'ServiceCreatedEvent', - 'ServiceDeletedEvent', - 'ServiceDescription', - 'ServiceEvent', - 'ServiceFromTemplateDescription', - 'ServiceHealth', - 'ServiceHealthEvaluation', - 'ServiceHealthReportExpiredEvent', - 'ServiceHealthState', - 'ServiceHealthStateChunk', - 'ServiceHealthStateChunkList', - 'ServiceHealthStateFilter', - 'ServiceIdentity', - 'ServiceInfo', - 'ServiceLoadMetricDescription', - 'ServiceNameInfo', - 'ServiceNewHealthReportEvent', - 'ServicePartitionInfo', - 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', - 'ServicePlacementInvalidDomainPolicyDescription', - 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', - 'ServicePlacementPolicyDescription', - 'ServicePlacementPreferPrimaryDomainPolicyDescription', - 'ServicePlacementRequiredDomainPolicyDescription', - 'ServicePlacementRequireDomainDistributionPolicyDescription', - 'ServiceProperties', - 'ServiceReplicaDescription', - 'ServiceReplicaProperties', - 'ServiceResourceDescription', - 'ServicesHealthEvaluation', - 'ServiceTypeDescription', - 'ServiceTypeExtensionDescription', - 'ServiceTypeHealthPolicy', - 'ServiceTypeHealthPolicyMapItem', - 'ServiceTypeInfo', - 'ServiceTypeManifest', - 'ServiceUpdateDescription', - 'ServiceUpgradeProgress', - 'Setting', - 'SingletonPartitionInformation', - 'SingletonPartitionSchemeDescription', - 'StartClusterUpgradeDescription', - 'StartedChaosEvent', - 'StatefulReplicaHealthReportExpiredEvent', - 'StatefulReplicaNewHealthReportEvent', - 'StatefulServiceDescription', - 'StatefulServiceInfo', - 'StatefulServicePartitionInfo', - 'StatefulServiceReplicaHealth', - 'StatefulServiceReplicaHealthState', - 'StatefulServiceReplicaInfo', - 'StatefulServiceTypeDescription', - 'StatefulServiceUpdateDescription', - 'StatelessReplicaHealthReportExpiredEvent', - 'StatelessReplicaNewHealthReportEvent', - 'StatelessServiceDescription', - 'StatelessServiceInfo', - 'StatelessServiceInstanceHealth', - 'StatelessServiceInstanceHealthState', - 'StatelessServiceInstanceInfo', - 'StatelessServicePartitionInfo', - 'StatelessServiceTypeDescription', - 'StatelessServiceUpdateDescription', - 'StoppedChaosEvent', - 'StringPropertyValue', - 'SuccessfulPropertyBatchInfo', - 'SystemApplicationHealthEvaluation', - 'TcpConfig', - 'TestErrorChaosEvent', - 'TimeBasedBackupScheduleDescription', - 'TimeOfDay', - 'TimeRange', - 'UniformInt64RangePartitionSchemeDescription', - 'UnplacedReplicaInformation', - 'UnprovisionApplicationTypeDescriptionInfo', - 'UnprovisionFabricDescription', - 'UpdateClusterUpgradeDescription', - 'UpdatePartitionLoadResult', - 'UpgradeDomainDeltaNodesCheckHealthEvaluation', - 'UpgradeDomainInfo', - 'UpgradeDomainNodesHealthEvaluation', - 'UpgradeOrchestrationServiceState', - 'UpgradeOrchestrationServiceStateSummary', - 'UploadChunkRange', - 'UploadSession', - 'UploadSessionInfo', - 'UsageInfo', - 'ValidationFailedChaosEvent', + 'PagedSecretValueResourceDescriptionList', 'VolumeProviderParametersAzureFile', 'VolumeReference', + 'ApplicationScopedVolumeCreationParameters', + 'ApplicationScopedVolume', + 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk', 'VolumeResourceDescription', - 'WaitForInbuildReplicaSafetyCheck', - 'WaitForPrimaryPlacementSafetyCheck', - 'WaitForPrimarySwapSafetyCheck', - 'WaitForReconfigurationSafetyCheck', - 'WaitingChaosEvent', + 'PagedVolumeResourceDescriptionList', + 'EndpointRef', + 'NetworkRef', + 'NetworkResourceProperties', + 'LocalNetworkResourceProperties', + 'NetworkResourceDescription', + 'NetworkResourcePropertiesBase', + 'PagedNetworkResourceDescriptionList', + 'GatewayDestination', + 'TcpConfig', + 'HttpRouteMatchPath', + 'HttpRouteMatchHeader', + 'HttpRouteMatchRule', + 'HttpRouteConfig', + 'HttpHostConfig', + 'HttpConfig', + 'GatewayResourceDescription', + 'PagedGatewayResourceDescriptionList', + 'ImageRegistryCredential', + 'EnvironmentVariable', + 'Setting', + 'ContainerLabel', + 'EndpointProperties', + 'ResourceRequests', + 'ResourceLimits', + 'ResourceRequirements', + 'DiagnosticsRef', + 'ReliableCollectionsRef', + 'ContainerState', + 'ContainerEvent', + 'ContainerInstanceView', + 'ProbeExec', + 'ProbeHttpGetHeaders', + 'ProbeHttpGet', + 'ProbeTcpSocket', + 'Probe', + 'ContainerCodePackageProperties', + 'ExecutionPolicy', + 'AutoScalingTrigger', + 'AutoScalingMechanism', + 'AutoScalingPolicy', + 'ServiceIdentity', + 'ServiceResourceDescription', + 'DiagnosticsSinkProperties', + 'DiagnosticsDescription', + 'ServiceUpgradeProgress', + 'ApplicationResourceUpgradeProgressInfo', + 'AzureInternalMonitoringPipelineSinkDescription', + 'IdentityItemDescription', + 'IdentityDescription', + 'AddRemoveReplicaScalingMechanism', + 'AutoScalingMetric', + 'AutoScalingResourceMetric', + 'DefaultExecutionPolicy', + 'RunToCompletionExecutionPolicy', + 'ServiceProperties', + 'ServiceReplicaProperties', + 'ServiceReplicaDescription', + 'AverageLoadScalingTrigger', + 'PagedServiceResourceDescriptionList', + 'PagedServiceReplicaDescriptionList', + 'ApplicationResourceDescription', + 'PagedApplicationResourceDescriptionList', 'HealthState', 'FabricErrorCodes', 'ApplicationDefinitionKind', diff --git a/customSDK/servicefabric/models/_models.py b/customSDK/servicefabric/models/_models.py deleted file mode 100644 index 008439d..0000000 --- a/customSDK/servicefabric/models/_models.py +++ /dev/null @@ -1,23493 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class AadMetadata(Model): - """Azure Active Directory metadata used for secured connection to cluster. - - :param authority: The AAD authority url. - :type authority: str - :param client: The AAD client application Id. - :type client: str - :param cluster: The AAD cluster application Id. - :type cluster: str - :param login: The AAD login url. - :type login: str - :param redirect: The client application redirect address. - :type redirect: str - :param tenant: The AAD tenant Id. - :type tenant: str - """ - - _attribute_map = { - 'authority': {'key': 'authority', 'type': 'str'}, - 'client': {'key': 'client', 'type': 'str'}, - 'cluster': {'key': 'cluster', 'type': 'str'}, - 'login': {'key': 'login', 'type': 'str'}, - 'redirect': {'key': 'redirect', 'type': 'str'}, - 'tenant': {'key': 'tenant', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AadMetadata, self).__init__(**kwargs) - self.authority = kwargs.get('authority', None) - self.client = kwargs.get('client', None) - self.cluster = kwargs.get('cluster', None) - self.login = kwargs.get('login', None) - self.redirect = kwargs.get('redirect', None) - self.tenant = kwargs.get('tenant', None) - - -class AadMetadataObject(Model): - """Azure Active Directory metadata object used for secured connection to - cluster. - - :param type: The client authentication method. - :type type: str - :param metadata: Azure Active Directory metadata used for secured - connection to cluster. - :type metadata: ~azure.servicefabric.models.AadMetadata - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'metadata': {'key': 'metadata', 'type': 'AadMetadata'}, - } - - def __init__(self, **kwargs): - super(AadMetadataObject, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.metadata = kwargs.get('metadata', None) - - -class ScalingMechanismDescription(Model): - """Describes the mechanism for performing a scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionInstanceCountScaleMechanism, - AddRemoveIncrementalNamedPartitionScalingMechanism - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'PartitionInstanceCount': 'PartitionInstanceCountScaleMechanism', 'AddRemoveIncrementalNamedPartition': 'AddRemoveIncrementalNamedPartitionScalingMechanism'} - } - - def __init__(self, **kwargs): - super(ScalingMechanismDescription, self).__init__(**kwargs) - self.kind = None - - -class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription): - """Represents a scaling mechanism for adding or removing named partitions of a - stateless service. Partition names are in the format '0','1''N-1'. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param min_partition_count: Required. Minimum number of named partitions - of the service. - :type min_partition_count: int - :param max_partition_count: Required. Maximum number of named partitions - of the service. - :type max_partition_count: int - :param scale_increment: Required. The number of instances to add or remove - during a scaling operation. - :type scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_partition_count': {'required': True}, - 'max_partition_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'}, - 'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'}, - 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs) - self.min_partition_count = kwargs.get('min_partition_count', None) - self.max_partition_count = kwargs.get('max_partition_count', None) - self.scale_increment = kwargs.get('scale_increment', None) - self.kind = 'AddRemoveIncrementalNamedPartition' - - -class AutoScalingMechanism(Model): - """Describes the mechanism for performing auto scaling operation. Derived - classes will describe the actual mechanism. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AddRemoveReplicaScalingMechanism - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AddRemoveReplica': 'AddRemoveReplicaScalingMechanism'} - } - - def __init__(self, **kwargs): - super(AutoScalingMechanism, self).__init__(**kwargs) - self.kind = None - - -class AddRemoveReplicaScalingMechanism(AutoScalingMechanism): - """Describes the horizontal auto scaling mechanism that adds or removes - replicas (containers or container groups). - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param min_count: Required. Minimum number of containers (scale down won't - be performed below this number). - :type min_count: int - :param max_count: Required. Maximum number of containers (scale up won't - be performed above this number). - :type max_count: int - :param scale_increment: Required. Each time auto scaling is performed, - this number of containers will be added or removed. - :type scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_count': {'required': True}, - 'max_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'scale_increment': {'key': 'scaleIncrement', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(AddRemoveReplicaScalingMechanism, self).__init__(**kwargs) - self.min_count = kwargs.get('min_count', None) - self.max_count = kwargs.get('max_count', None) - self.scale_increment = kwargs.get('scale_increment', None) - self.kind = 'AddRemoveReplica' - - -class AnalysisEventMetadata(Model): - """Metadata about an Analysis Event. - - :param delay: The analysis delay. - :type delay: timedelta - :param duration: The duration of analysis. - :type duration: timedelta - """ - - _attribute_map = { - 'delay': {'key': 'Delay', 'type': 'duration'}, - 'duration': {'key': 'Duration', 'type': 'duration'}, - } - - def __init__(self, **kwargs): - super(AnalysisEventMetadata, self).__init__(**kwargs) - self.delay = kwargs.get('delay', None) - self.duration = kwargs.get('duration', None) - - -class BackupConfigurationInfo(Model): - """Describes the backup configuration information. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationBackupConfigurationInfo, - ServiceBackupConfigurationInfo, PartitionBackupConfigurationInfo - - All required parameters must be populated in order to send to Azure. - - :param policy_name: The name of the backup policy which is applicable to - this Service Fabric application or service or partition. - :type policy_name: str - :param policy_inherited_from: Specifies the scope at which the backup - policy is applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type policy_inherited_from: str or - ~azure.servicefabric.models.BackupPolicyScope - :param suspension_info: Describes the backup suspension details. - :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Application': 'ApplicationBackupConfigurationInfo', 'Service': 'ServiceBackupConfigurationInfo', 'Partition': 'PartitionBackupConfigurationInfo'} - } - - def __init__(self, **kwargs): - super(BackupConfigurationInfo, self).__init__(**kwargs) - self.policy_name = kwargs.get('policy_name', None) - self.policy_inherited_from = kwargs.get('policy_inherited_from', None) - self.suspension_info = kwargs.get('suspension_info', None) - self.kind = None - - -class ApplicationBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information for a specific Service Fabric application - specifying what backup policy is being applied and suspend description, if - any. - - All required parameters must be populated in order to send to Azure. - - :param policy_name: The name of the backup policy which is applicable to - this Service Fabric application or service or partition. - :type policy_name: str - :param policy_inherited_from: Specifies the scope at which the backup - policy is applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type policy_inherited_from: str or - ~azure.servicefabric.models.BackupPolicyScope - :param suspension_info: Describes the backup suspension details. - :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :param kind: Required. Constant filled by server. - :type kind: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationBackupConfigurationInfo, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.kind = 'Application' - - -class BackupEntity(Model): - """Describes the Service Fabric entity that is configured for backup. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationBackupEntity, ServiceBackupEntity, - PartitionBackupEntity - - All required parameters must be populated in order to send to Azure. - - :param entity_kind: Required. Constant filled by server. - :type entity_kind: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - } - - _subtype_map = { - 'entity_kind': {'Application': 'ApplicationBackupEntity', 'Service': 'ServiceBackupEntity', 'Partition': 'PartitionBackupEntity'} - } - - def __init__(self, **kwargs): - super(BackupEntity, self).__init__(**kwargs) - self.entity_kind = None - - -class ApplicationBackupEntity(BackupEntity): - """Identifies the Service Fabric application which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :param entity_kind: Required. Constant filled by server. - :type entity_kind: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationBackupEntity, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.entity_kind = 'Application' - - -class ApplicationCapacityDescription(Model): - """Describes capacity information for services of this application. This - description can be used for describing the following. - - Reserving the capacity for the services on the nodes - - Limiting the total number of nodes that services of this application can - run on - - Limiting the custom capacity metrics to limit the total consumption of - this metric by the services of this application. - - :param minimum_nodes: The minimum number of nodes where Service Fabric - will reserve capacity for this application. Note that this does not mean - that the services of this application will be placed on all of those - nodes. If this property is set to zero, no capacity will be reserved. The - value of this property cannot be more than the value of the MaximumNodes - property. - :type minimum_nodes: long - :param maximum_nodes: The maximum number of nodes where Service Fabric - will reserve capacity for this application. Note that this does not mean - that the services of this application will be placed on all of those - nodes. By default, the value of this property is zero and it means that - the services can be placed on any node. Default value: 0 . - :type maximum_nodes: long - :param application_metrics: List of application capacity metric - description. - :type application_metrics: - list[~azure.servicefabric.models.ApplicationMetricDescription] - """ - - _validation = { - 'minimum_nodes': {'minimum': 0}, - 'maximum_nodes': {'minimum': 0}, - } - - _attribute_map = { - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, - } - - def __init__(self, **kwargs): - super(ApplicationCapacityDescription, self).__init__(**kwargs) - self.minimum_nodes = kwargs.get('minimum_nodes', None) - self.maximum_nodes = kwargs.get('maximum_nodes', 0) - self.application_metrics = kwargs.get('application_metrics', None) - - -class FabricEvent(Model): - """Represents the base for all Fabric Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationEvent, ClusterEvent, ContainerInstanceEvent, - NodeEvent, PartitionEvent, ReplicaEvent, ServiceEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ApplicationEvent': 'ApplicationEvent', 'ClusterEvent': 'ClusterEvent', 'ContainerInstanceEvent': 'ContainerInstanceEvent', 'NodeEvent': 'NodeEvent', 'PartitionEvent': 'PartitionEvent', 'ReplicaEvent': 'ReplicaEvent', 'ServiceEvent': 'ServiceEvent'} - } - - def __init__(self, **kwargs): - super(FabricEvent, self).__init__(**kwargs) - self.event_instance_id = kwargs.get('event_instance_id', None) - self.category = kwargs.get('category', None) - self.time_stamp = kwargs.get('time_stamp', None) - self.has_correlated_events = kwargs.get('has_correlated_events', None) - self.kind = None - - -class ApplicationEvent(FabricEvent): - """Represents the base for all Application Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationCreatedEvent, ApplicationDeletedEvent, - ApplicationNewHealthReportEvent, ApplicationHealthReportExpiredEvent, - ApplicationUpgradeCompletedEvent, ApplicationUpgradeDomainCompletedEvent, - ApplicationUpgradeRollbackCompletedEvent, - ApplicationUpgradeRollbackStartedEvent, ApplicationUpgradeStartedEvent, - DeployedApplicationNewHealthReportEvent, - DeployedApplicationHealthReportExpiredEvent, ApplicationProcessExitedEvent, - ApplicationContainerInstanceExitedEvent, - DeployedServicePackageNewHealthReportEvent, - DeployedServicePackageHealthReportExpiredEvent, - ChaosCodePackageRestartScheduledEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ApplicationCreated': 'ApplicationCreatedEvent', 'ApplicationDeleted': 'ApplicationDeletedEvent', 'ApplicationNewHealthReport': 'ApplicationNewHealthReportEvent', 'ApplicationHealthReportExpired': 'ApplicationHealthReportExpiredEvent', 'ApplicationUpgradeCompleted': 'ApplicationUpgradeCompletedEvent', 'ApplicationUpgradeDomainCompleted': 'ApplicationUpgradeDomainCompletedEvent', 'ApplicationUpgradeRollbackCompleted': 'ApplicationUpgradeRollbackCompletedEvent', 'ApplicationUpgradeRollbackStarted': 'ApplicationUpgradeRollbackStartedEvent', 'ApplicationUpgradeStarted': 'ApplicationUpgradeStartedEvent', 'DeployedApplicationNewHealthReport': 'DeployedApplicationNewHealthReportEvent', 'DeployedApplicationHealthReportExpired': 'DeployedApplicationHealthReportExpiredEvent', 'ApplicationProcessExited': 'ApplicationProcessExitedEvent', 'ApplicationContainerInstanceExited': 'ApplicationContainerInstanceExitedEvent', 'DeployedServicePackageNewHealthReport': 'DeployedServicePackageNewHealthReportEvent', 'DeployedServicePackageHealthReportExpired': 'DeployedServicePackageHealthReportExpiredEvent', 'ChaosCodePackageRestartScheduled': 'ChaosCodePackageRestartScheduledEvent'} - } - - def __init__(self, **kwargs): - super(ApplicationEvent, self).__init__(**kwargs) - self.application_id = kwargs.get('application_id', None) - self.kind = 'ApplicationEvent' - - -class ApplicationContainerInstanceExitedEvent(ApplicationEvent): - """Container Exited event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param service_name: Required. Name of Service. - :type service_name: str - :param service_package_name: Required. Name of Service package. - :type service_package_name: str - :param service_package_activation_id: Required. Activation Id of Service - package. - :type service_package_activation_id: str - :param is_exclusive: Required. Indicates IsExclusive flag. - :type is_exclusive: bool - :param code_package_name: Required. Name of Code package. - :type code_package_name: str - :param entry_point_type: Required. Type of EntryPoint. - :type entry_point_type: str - :param image_name: Required. Name of Container image. - :type image_name: str - :param container_name: Required. Name of Container. - :type container_name: str - :param host_id: Required. Host Id. - :type host_id: str - :param exit_code: Required. Exit code of process. - :type exit_code: long - :param unexpected_termination: Required. Indicates if termination is - unexpected. - :type unexpected_termination: bool - :param start_time: Required. Start time of process. - :type start_time: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_name': {'required': True}, - 'service_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'is_exclusive': {'required': True}, - 'code_package_name': {'required': True}, - 'entry_point_type': {'required': True}, - 'image_name': {'required': True}, - 'container_name': {'required': True}, - 'host_id': {'required': True}, - 'exit_code': {'required': True}, - 'unexpected_termination': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, - 'image_name': {'key': 'ImageName', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - 'host_id': {'key': 'HostId', 'type': 'str'}, - 'exit_code': {'key': 'ExitCode', 'type': 'long'}, - 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ApplicationContainerInstanceExitedEvent, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.service_package_name = kwargs.get('service_package_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.is_exclusive = kwargs.get('is_exclusive', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.entry_point_type = kwargs.get('entry_point_type', None) - self.image_name = kwargs.get('image_name', None) - self.container_name = kwargs.get('container_name', None) - self.host_id = kwargs.get('host_id', None) - self.exit_code = kwargs.get('exit_code', None) - self.unexpected_termination = kwargs.get('unexpected_termination', None) - self.start_time = kwargs.get('start_time', None) - self.kind = 'ApplicationContainerInstanceExited' - - -class ApplicationCreatedEvent(ApplicationEvent): - """Application Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param application_type_version: Required. Application type version. - :type application_type_version: str - :param application_definition_kind: Required. Application definition kind. - :type application_definition_kind: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'application_definition_kind': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationCreatedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.application_definition_kind = kwargs.get('application_definition_kind', None) - self.kind = 'ApplicationCreated' - - -class ApplicationDeletedEvent(ApplicationEvent): - """Application Deleted event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param application_type_version: Required. Application type version. - :type application_type_version: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationDeletedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.kind = 'ApplicationDeleted' - - -class ApplicationDescription(Model): - """Describes a Service Fabric application. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the application, including the - 'fabric:' URI scheme. - :type name: str - :param type_name: Required. The application type name as defined in the - application manifest. - :type type_name: str - :param type_version: Required. The version of the application type as - defined in the application manifest. - :type type_version: str - :param parameter_list: List of application parameters with overridden - values from their default values specified in the application manifest. - :type parameter_list: - list[~azure.servicefabric.models.ApplicationParameter] - :param application_capacity: Describes capacity information for services - of this application. This description can be used for describing the - following. - - Reserving the capacity for the services on the nodes - - Limiting the total number of nodes that services of this application can - run on - - Limiting the custom capacity metrics to limit the total consumption of - this metric by the services of this application - :type application_capacity: - ~azure.servicefabric.models.ApplicationCapacityDescription - :param managed_application_identity: Managed application identity - description. - :type managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - - _validation = { - 'name': {'required': True}, - 'type_name': {'required': True}, - 'type_version': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'parameter_list': {'key': 'ParameterList', 'type': '[ApplicationParameter]'}, - 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'ApplicationCapacityDescription'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__(self, **kwargs): - super(ApplicationDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.type_version = kwargs.get('type_version', None) - self.parameter_list = kwargs.get('parameter_list', None) - self.application_capacity = kwargs.get('application_capacity', None) - self.managed_application_identity = kwargs.get('managed_application_identity', None) - - -class EntityHealth(Model): - """Health information common to all entities in the cluster. It contains the - aggregated health state, health events and unhealthy evaluation. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - } - - def __init__(self, **kwargs): - super(EntityHealth, self).__init__(**kwargs) - self.aggregated_health_state = kwargs.get('aggregated_health_state', None) - self.health_events = kwargs.get('health_events', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.health_statistics = kwargs.get('health_statistics', None) - - -class ApplicationHealth(EntityHealth): - """Represents the health of the application. Contains the application - aggregated health state and the service and deployed application health - states. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - :param service_health_states: Service health states as found in the health - store. - :type service_health_states: - list[~azure.servicefabric.models.ServiceHealthState] - :param deployed_application_health_states: Deployed application health - states as found in the health store. - :type deployed_application_health_states: - list[~azure.servicefabric.models.DeployedApplicationHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'service_health_states': {'key': 'ServiceHealthStates', 'type': '[ServiceHealthState]'}, - 'deployed_application_health_states': {'key': 'DeployedApplicationHealthStates', 'type': '[DeployedApplicationHealthState]'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealth, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.service_health_states = kwargs.get('service_health_states', None) - self.deployed_application_health_states = kwargs.get('deployed_application_health_states', None) - - -class HealthEvaluation(Model): - """Represents a health evaluation which describes the data and the algorithm - used by health manager to evaluate the health of an entity. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationHealthEvaluation, ApplicationsHealthEvaluation, - ApplicationTypeApplicationsHealthEvaluation, - DeltaNodesCheckHealthEvaluation, DeployedApplicationHealthEvaluation, - DeployedApplicationsHealthEvaluation, - DeployedServicePackageHealthEvaluation, - DeployedServicePackagesHealthEvaluation, EventHealthEvaluation, - NodeHealthEvaluation, NodesHealthEvaluation, PartitionHealthEvaluation, - PartitionsHealthEvaluation, ReplicaHealthEvaluation, - ReplicasHealthEvaluation, ServiceHealthEvaluation, - ServicesHealthEvaluation, SystemApplicationHealthEvaluation, - UpgradeDomainDeltaNodesCheckHealthEvaluation, - UpgradeDomainNodesHealthEvaluation, NodeTypeNodesHealthEvaluation - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Application': 'ApplicationHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation', 'NodeTypeNodes': 'NodeTypeNodesHealthEvaluation'} - } - - def __init__(self, **kwargs): - super(HealthEvaluation, self).__init__(**kwargs) - self.aggregated_health_state = kwargs.get('aggregated_health_state', None) - self.description = kwargs.get('description', None) - self.kind = None - - -class ApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for an application, containing information - about the data and the algorithm used by the health store to evaluate - health. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the application. The types of the - unhealthy evaluations can be DeployedApplicationsHealthEvaluation, - ServicesHealthEvaluation or EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthEvaluation, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Application' - - -class ApplicationHealthPolicies(Model): - """Defines the application health policy map used to evaluate the health of an - application or one of its children entities. - - :param application_health_policy_map: The wrapper that contains the map - with application health policies used to evaluate specific applications in - the cluster. - :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthPolicies, self).__init__(**kwargs) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) - - -class ApplicationHealthPolicy(Model): - """Defines a health policy used to evaluate the health of an application or - one of its children entities. - - :param consider_warning_as_error: Indicates whether warnings are treated - with the same severity as errors. Default value: False . - :type consider_warning_as_error: bool - :param max_percent_unhealthy_deployed_applications: The maximum allowed - percentage of unhealthy deployed applications. Allowed values are Byte - values from zero to 100. - The percentage represents the maximum tolerated percentage of deployed - applications that can be unhealthy before the application is considered in - error. - This is calculated by dividing the number of unhealthy deployed - applications over the number of nodes where the application is currently - deployed on in the cluster. - The computation rounds up to tolerate one failure on small numbers of - nodes. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_deployed_applications: int - :param default_service_type_health_policy: The health policy used by - default to evaluate the health of a service type. - :type default_service_type_health_policy: - ~azure.servicefabric.models.ServiceTypeHealthPolicy - :param service_type_health_policy_map: The map with service type health - policy per service type name. The map is empty by default. - :type service_type_health_policy_map: - list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem] - """ - - _attribute_map = { - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'default_service_type_health_policy': {'key': 'DefaultServiceTypeHealthPolicy', 'type': 'ServiceTypeHealthPolicy'}, - 'service_type_health_policy_map': {'key': 'ServiceTypeHealthPolicyMap', 'type': '[ServiceTypeHealthPolicyMapItem]'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthPolicy, self).__init__(**kwargs) - self.consider_warning_as_error = kwargs.get('consider_warning_as_error', False) - self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', 0) - self.default_service_type_health_policy = kwargs.get('default_service_type_health_policy', None) - self.service_type_health_policy_map = kwargs.get('service_type_health_policy_map', None) - - -class ApplicationHealthPolicyMapItem(Model): - """Defines an item in ApplicationHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key of the application health policy map item. - This is the name of the application. - :type key: str - :param value: Required. The value of the application health policy map - item. This is the ApplicationHealthPolicy for this application. - :type value: ~azure.servicefabric.models.ApplicationHealthPolicy - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ApplicationHealthPolicy'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthPolicyMapItem, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) - - -class ApplicationHealthPolicyMapObject(Model): - """Represents the map of application health policies for a ServiceFabric - cluster upgrade. - - :param application_health_policy_map: Defines a map that contains specific - application health policies for different applications. - Each entry specifies as key the application name and as value an - ApplicationHealthPolicy used to evaluate the application health. - If an application is not specified in the map, the application health - evaluation uses the ApplicationHealthPolicy found in its application - manifest or the default application health policy (if no health policy is - defined in the manifest). - The map is empty by default. - :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthPolicyMapObject, self).__init__(**kwargs) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) - - -class ApplicationHealthReportExpiredEvent(ApplicationEvent): - """Application Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_instance_id: Required. Id of Application instance. - :type application_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthReportExpiredEvent, self).__init__(**kwargs) - self.application_instance_id = kwargs.get('application_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ApplicationHealthReportExpired' - - -class EntityHealthState(Model): - """A base type for the health state of various entities in the cluster. It - contains the aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EntityHealthState, self).__init__(**kwargs) - self.aggregated_health_state = kwargs.get('aggregated_health_state', None) - - -class ApplicationHealthState(EntityHealthState): - """Represents the health state of an application, which contains the - application identifier and the aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthState, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class EntityHealthStateChunk(Model): - """A base type for the health state chunk of various entities in the cluster. - It contains the aggregated health state. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EntityHealthStateChunk, self).__init__(**kwargs) - self.health_state = kwargs.get('health_state', None) - - -class ApplicationHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a application. - The application health state chunk contains the application name, its - aggregated health state and any children services and deployed applications - that respect the filters in cluster health chunk query description. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param application_type_name: The application type name as defined in the - application manifest. - :type application_type_name: str - :param service_health_state_chunks: The list of service health state - chunks in the cluster that respect the filters in the cluster health chunk - query description. - :type service_health_state_chunks: - ~azure.servicefabric.models.ServiceHealthStateChunkList - :param deployed_application_health_state_chunks: The list of deployed - application health state chunks in the cluster that respect the filters in - the cluster health chunk query description. - :type deployed_application_health_state_chunks: - ~azure.servicefabric.models.DeployedApplicationHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_health_state_chunks': {'key': 'ServiceHealthStateChunks', 'type': 'ServiceHealthStateChunkList'}, - 'deployed_application_health_state_chunks': {'key': 'DeployedApplicationHealthStateChunks', 'type': 'DeployedApplicationHealthStateChunkList'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthStateChunk, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.application_type_name = kwargs.get('application_type_name', None) - self.service_health_state_chunks = kwargs.get('service_health_state_chunks', None) - self.deployed_application_health_state_chunks = kwargs.get('deployed_application_health_state_chunks', None) - - -class EntityHealthStateChunkList(Model): - """A base type for the list of health state chunks found in the cluster. It - contains the total number of health states that match the input filters. - - :param total_count: Total number of entity health state objects that match - the specified filters from the cluster health chunk query description. - :type total_count: long - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(EntityHealthStateChunkList, self).__init__(**kwargs) - self.total_count = kwargs.get('total_count', None) - - -class ApplicationHealthStateChunkList(EntityHealthStateChunkList): - """The list of application health state chunks in the cluster that respect the - input filters in the chunk query. Returned by get cluster health state - chunks query. - - :param total_count: Total number of entity health state objects that match - the specified filters from the cluster health chunk query description. - :type total_count: long - :param items: The list of application health state chunks that respect the - input filters in the chunk query. - :type items: list[~azure.servicefabric.models.ApplicationHealthStateChunk] - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'items': {'key': 'Items', 'type': '[ApplicationHealthStateChunk]'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) - - -class ApplicationHealthStateFilter(Model): - """Defines matching criteria to determine whether a application should be - included in the cluster health chunk. - One filter can match zero, one or multiple applications, depending on its - properties. - - :param application_name_filter: The name of the application that matches - the filter, as a fabric uri. The filter is applied only to the specified - application, if it exists. - If the application doesn't exist, no application is returned in the - cluster health chunk based on this filter. - If the application exists, it is included in the cluster health chunk if - it respects the other filter properties. - If not specified, all applications are matched against the other filter - members, like health state filter. - :type application_name_filter: str - :param application_type_name_filter: The name of the application type that - matches the filter. - If specified, the filter is applied only to applications of the selected - application type, if any exists. - If no applications of the specified application type exists, no - application is returned in the cluster health chunk based on this filter. - Each application of the specified application type is included in the - cluster health chunk if it respects the other filter properties. - If not specified, all applications are matched against the other filter - members, like health state filter. - :type application_type_name_filter: str - :param health_state_filter: The filter for the health state of the - applications. It allows selecting applications if they match the desired - health states. - The possible values are integer value of one of the following health - states. Only applications that match the filter are returned. All - applications are used to evaluate the cluster aggregated health state. - If not specified, default value is None, unless the application name or - the application type name are specified. If the filter has default value - and application name is specified, the matching application is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches applications with - HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - :param service_filters: Defines a list of filters that specify which - services to be included in the returned cluster health chunk as children - of the application. The services are returned only if the parent - application matches a filter. - If the list is empty, no services are returned. All the services are used - to evaluate the parent application aggregated health state, regardless of - the input filters. - The application filter may specify multiple service filters. - For example, it can specify a filter to return all services with health - state Error and another filter to always include a service identified by - its service name. - :type service_filters: - list[~azure.servicefabric.models.ServiceHealthStateFilter] - :param deployed_application_filters: Defines a list of filters that - specify which deployed applications to be included in the returned cluster - health chunk as children of the application. The deployed applications are - returned only if the parent application matches a filter. - If the list is empty, no deployed applications are returned. All the - deployed applications are used to evaluate the parent application - aggregated health state, regardless of the input filters. - The application filter may specify multiple deployed application filters. - For example, it can specify a filter to return all deployed applications - with health state Error and another filter to always include a deployed - application on a specified node. - :type deployed_application_filters: - list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter] - """ - - _attribute_map = { - 'application_name_filter': {'key': 'ApplicationNameFilter', 'type': 'str'}, - 'application_type_name_filter': {'key': 'ApplicationTypeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'service_filters': {'key': 'ServiceFilters', 'type': '[ServiceHealthStateFilter]'}, - 'deployed_application_filters': {'key': 'DeployedApplicationFilters', 'type': '[DeployedApplicationHealthStateFilter]'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthStateFilter, self).__init__(**kwargs) - self.application_name_filter = kwargs.get('application_name_filter', None) - self.application_type_name_filter = kwargs.get('application_type_name_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - self.service_filters = kwargs.get('service_filters', None) - self.deployed_application_filters = kwargs.get('deployed_application_filters', None) - - -class ApplicationInfo(Model): - """Information about a Service Fabric application. - - :param id: The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to - identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type id: str - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - :param type_name: The application type name as defined in the application - manifest. - :type type_name: str - :param type_version: The version of the application type as defined in the - application manifest. - :type type_version: str - :param status: The status of the application. Possible values include: - 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :type status: str or ~azure.servicefabric.models.ApplicationStatus - :param parameters: List of application parameters with overridden values - from their default values specified in the application manifest. - :type parameters: list[~azure.servicefabric.models.ApplicationParameter] - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param application_definition_kind: The mechanism used to define a Service - Fabric application. Possible values include: 'Invalid', - 'ServiceFabricApplicationDescription', 'Compose' - :type application_definition_kind: str or - ~azure.servicefabric.models.ApplicationDefinitionKind - :param managed_application_identity: Managed application identity - description. - :type managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__(self, **kwargs): - super(ApplicationInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.type_version = kwargs.get('type_version', None) - self.status = kwargs.get('status', None) - self.parameters = kwargs.get('parameters', None) - self.health_state = kwargs.get('health_state', None) - self.application_definition_kind = kwargs.get('application_definition_kind', None) - self.managed_application_identity = kwargs.get('managed_application_identity', None) - - -class ApplicationLoadInfo(Model): - """Load Information about a Service Fabric application. - - :param id: The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to - identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type id: str - :param minimum_nodes: The minimum number of nodes for this application. - It is the number of nodes where Service Fabric will reserve Capacity in - the cluster which equals to ReservedLoad * MinimumNodes for this - Application instance. - For applications that do not have application capacity defined this value - will be zero. - :type minimum_nodes: long - :param maximum_nodes: The maximum number of nodes where this application - can be instantiated. - It is the number of nodes this application is allowed to span. - For applications that do not have application capacity defined this value - will be zero. - :type maximum_nodes: long - :param node_count: The number of nodes on which this application is - instantiated. - For applications that do not have application capacity defined this value - will be zero. - :type node_count: long - :param application_load_metric_information: List of application load - metric information. - :type application_load_metric_information: - list[~azure.servicefabric.models.ApplicationLoadMetricInformation] - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'node_count': {'key': 'NodeCount', 'type': 'long'}, - 'application_load_metric_information': {'key': 'ApplicationLoadMetricInformation', 'type': '[ApplicationLoadMetricInformation]'}, - } - - def __init__(self, **kwargs): - super(ApplicationLoadInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.minimum_nodes = kwargs.get('minimum_nodes', None) - self.maximum_nodes = kwargs.get('maximum_nodes', None) - self.node_count = kwargs.get('node_count', None) - self.application_load_metric_information = kwargs.get('application_load_metric_information', None) - - -class ApplicationLoadMetricInformation(Model): - """Describes load information for a custom resource balancing metric. This can - be used to limit the total consumption of this metric by the services of - this application. - - :param name: The name of the metric. - :type name: str - :param reservation_capacity: This is the capacity reserved in the cluster - for the application. - It's the product of NodeReservationCapacity and MinimumNodes. - If set to zero, no capacity is reserved for this metric. - When setting application capacity or when updating application capacity - this value must be smaller than or equal to MaximumCapacity for each - metric. - :type reservation_capacity: long - :param application_capacity: Total capacity for this metric in this - application instance. - :type application_capacity: long - :param application_load: Current load for this metric in this application - instance. - :type application_load: long - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, - 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'long'}, - 'application_load': {'key': 'ApplicationLoad', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(ApplicationLoadMetricInformation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.reservation_capacity = kwargs.get('reservation_capacity', None) - self.application_capacity = kwargs.get('application_capacity', None) - self.application_load = kwargs.get('application_load', None) - - -class ApplicationMetricDescription(Model): - """Describes capacity information for a custom resource balancing metric. This - can be used to limit the total consumption of this metric by the services - of this application. - - :param name: The name of the metric. - :type name: str - :param maximum_capacity: The maximum node capacity for Service Fabric - application. - This is the maximum Load for an instance of this application on a single - node. Even if the capacity of node is greater than this value, Service - Fabric will limit the total load of services within the application on - each node to this value. - If set to zero, capacity for this metric is unlimited on each node. - When creating a new application with application capacity defined, the - product of MaximumNodes and this value must always be smaller than or - equal to TotalApplicationCapacity. - When updating existing application with application capacity, the product - of MaximumNodes and this value must always be smaller than or equal to - TotalApplicationCapacity. - :type maximum_capacity: long - :param reservation_capacity: The node reservation capacity for Service - Fabric application. - This is the amount of load which is reserved on nodes which have instances - of this application. - If MinimumNodes is specified, then the product of these values will be the - capacity reserved in the cluster for the application. - If set to zero, no capacity is reserved for this metric. - When setting application capacity or when updating application capacity; - this value must be smaller than or equal to MaximumCapacity for each - metric. - :type reservation_capacity: long - :param total_application_capacity: The total metric capacity for Service - Fabric application. - This is the total metric capacity for this application in the cluster. - Service Fabric will try to limit the sum of loads of services within the - application to this value. - When creating a new application with application capacity defined, the - product of MaximumNodes and MaximumCapacity must always be smaller than or - equal to this value. - :type total_application_capacity: long - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'maximum_capacity': {'key': 'MaximumCapacity', 'type': 'long'}, - 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, - 'total_application_capacity': {'key': 'TotalApplicationCapacity', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(ApplicationMetricDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.maximum_capacity = kwargs.get('maximum_capacity', None) - self.reservation_capacity = kwargs.get('reservation_capacity', None) - self.total_application_capacity = kwargs.get('total_application_capacity', None) - - -class ApplicationNameInfo(Model): - """Information about the application name. - - :param id: The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to - identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type id: str - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationNameInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - - -class ApplicationNewHealthReportEvent(ApplicationEvent): - """Application Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_instance_id: Required. Id of Application instance. - :type application_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ApplicationNewHealthReportEvent, self).__init__(**kwargs) - self.application_instance_id = kwargs.get('application_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ApplicationNewHealthReport' - - -class ApplicationParameter(Model): - """Describes an application parameter override to be applied when creating or - upgrading an application. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The name of the parameter. - :type key: str - :param value: Required. The value of the parameter. - :type value: str - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationParameter, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) - - -class ApplicationProcessExitedEvent(ApplicationEvent): - """Process Exited event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param service_name: Required. Name of Service. - :type service_name: str - :param service_package_name: Required. Name of Service package. - :type service_package_name: str - :param service_package_activation_id: Required. Activation Id of Service - package. - :type service_package_activation_id: str - :param is_exclusive: Required. Indicates IsExclusive flag. - :type is_exclusive: bool - :param code_package_name: Required. Name of Code package. - :type code_package_name: str - :param entry_point_type: Required. Type of EntryPoint. - :type entry_point_type: str - :param exe_name: Required. Name of executable. - :type exe_name: str - :param process_id: Required. Process Id. - :type process_id: long - :param host_id: Required. Host Id. - :type host_id: str - :param exit_code: Required. Exit code of process. - :type exit_code: long - :param unexpected_termination: Required. Indicates if termination is - unexpected. - :type unexpected_termination: bool - :param start_time: Required. Start time of process. - :type start_time: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_name': {'required': True}, - 'service_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'is_exclusive': {'required': True}, - 'code_package_name': {'required': True}, - 'entry_point_type': {'required': True}, - 'exe_name': {'required': True}, - 'process_id': {'required': True}, - 'host_id': {'required': True}, - 'exit_code': {'required': True}, - 'unexpected_termination': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, - 'exe_name': {'key': 'ExeName', 'type': 'str'}, - 'process_id': {'key': 'ProcessId', 'type': 'long'}, - 'host_id': {'key': 'HostId', 'type': 'str'}, - 'exit_code': {'key': 'ExitCode', 'type': 'long'}, - 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ApplicationProcessExitedEvent, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.service_package_name = kwargs.get('service_package_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.is_exclusive = kwargs.get('is_exclusive', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.entry_point_type = kwargs.get('entry_point_type', None) - self.exe_name = kwargs.get('exe_name', None) - self.process_id = kwargs.get('process_id', None) - self.host_id = kwargs.get('host_id', None) - self.exit_code = kwargs.get('exit_code', None) - self.unexpected_termination = kwargs.get('unexpected_termination', None) - self.start_time = kwargs.get('start_time', None) - self.kind = 'ApplicationProcessExited' - - -class ApplicationResourceDescription(Model): - """This type describes a application resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Application resource. - :type name: str - :param description: User readable description of the application. - :type description: str - :param services: Describes the services in the application. This property - is used to create or modify services of the application. On get only the - name of the service is returned. The service description can be obtained - by querying for the service resource. - :type services: - list[~azure.servicefabric.models.ServiceResourceDescription] - :param diagnostics: Describes the diagnostics definition and usage for an - application resource. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsDescription - :param debug_params: Internal - used by Visual Studio to setup the - debugging session on the local development environment. - :type debug_params: str - :ivar service_names: Names of the services in the application. - :vartype service_names: list[str] - :ivar status: Status of the application. Possible values include: - 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the application. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the application's health state is not - 'Ok', this additional details from service fabric Health Manager for the - user to know why the application is marked unhealthy. - :vartype unhealthy_evaluation: str - :param identity: Describes the identity of the application. - :type identity: ~azure.servicefabric.models.IdentityDescription - """ - - _validation = { - 'name': {'required': True}, - 'service_names': {'readonly': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, - 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, - 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'IdentityDescription'}, - } - - def __init__(self, **kwargs): - super(ApplicationResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) - self.services = kwargs.get('services', None) - self.diagnostics = kwargs.get('diagnostics', None) - self.debug_params = kwargs.get('debug_params', None) - self.service_names = None - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity = kwargs.get('identity', None) - - -class ApplicationResourceUpgradeProgressInfo(Model): - """This type describes an application resource upgrade. - - :param name: Name of the Application resource. - :type name: str - :param target_application_type_version: The target application version for - the application upgrade. - :type target_application_type_version: str - :param start_timestamp_utc: The estimated UTC datetime when the upgrade - started. - :type start_timestamp_utc: str - :param upgrade_state: The state of the application resource upgrade. - Possible values include: 'Invalid', 'ProvisioningTarget', - 'RollingForward', 'UnprovisioningCurrent', 'CompletedRollforward', - 'RollingBack', 'UnprovisioningTarget', 'CompletedRollback', 'Failed' - :type upgrade_state: str or - ~azure.servicefabric.models.ApplicationResourceUpgradeState - :param percent_completed: The estimated percent of replicas are completed - in the upgrade. - :type percent_completed: str - :param service_upgrade_progress: List of service upgrade progresses. - :type service_upgrade_progress: - list[~azure.servicefabric.models.ServiceUpgradeProgress] - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "Monitored" . - :type rolling_upgrade_mode: str or - ~azure.servicefabric.models.RollingUpgradeMode - :param upgrade_duration: The estimated amount of time that the overall - upgrade elapsed. It is first interpreted as a string representing an ISO - 8601 duration. If that fails, then it is interpreted as a number - representing the total number of milliseconds. Default value: "PT0H2M0S" . - :type upgrade_duration: str - :param application_upgrade_status_details: Additional detailed information - about the status of the pending upgrade. - :type application_upgrade_status_details: str - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). Default value: 42949672925 . - :type upgrade_replica_set_check_timeout_in_seconds: long - :param failure_timestamp_utc: The estimated UTC datetime when the upgrade - failed and FailureAction was executed. - :type failure_timestamp_utc: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'percent_completed': {'key': 'PercentCompleted', 'type': 'str'}, - 'service_upgrade_progress': {'key': 'ServiceUpgradeProgress', 'type': '[ServiceUpgradeProgress]'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationResourceUpgradeProgressInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.target_application_type_version = kwargs.get('target_application_type_version', None) - self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.percent_completed = kwargs.get('percent_completed', None) - self.service_upgrade_progress = kwargs.get('service_upgrade_progress', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "Monitored") - self.upgrade_duration = kwargs.get('upgrade_duration', "PT0H2M0S") - self.application_upgrade_status_details = kwargs.get('application_upgrade_status_details', None) - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925) - self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) - - -class VolumeReference(Model): - """Describes a reference to a volume resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the volume being referenced. - :type name: str - :param read_only: The flag indicating whether the volume is read only. - Default is 'false'. - :type read_only: bool - :param destination_path: Required. The path within the container at which - the volume should be mounted. Only valid path characters are allowed. - :type destination_path: str - """ - - _validation = { - 'name': {'required': True}, - 'destination_path': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'destination_path': {'key': 'destinationPath', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VolumeReference, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.read_only = kwargs.get('read_only', None) - self.destination_path = kwargs.get('destination_path', None) - - -class ApplicationScopedVolume(VolumeReference): - """Describes a volume whose lifetime is scoped to the application's lifetime. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the volume being referenced. - :type name: str - :param read_only: The flag indicating whether the volume is read only. - Default is 'false'. - :type read_only: bool - :param destination_path: Required. The path within the container at which - the volume should be mounted. Only valid path characters are allowed. - :type destination_path: str - :param creation_parameters: Required. Describes parameters for creating - application-scoped volumes. - :type creation_parameters: - ~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters - """ - - _validation = { - 'name': {'required': True}, - 'destination_path': {'required': True}, - 'creation_parameters': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'destination_path': {'key': 'destinationPath', 'type': 'str'}, - 'creation_parameters': {'key': 'creationParameters', 'type': 'ApplicationScopedVolumeCreationParameters'}, - } - - def __init__(self, **kwargs): - super(ApplicationScopedVolume, self).__init__(**kwargs) - self.creation_parameters = kwargs.get('creation_parameters', None) - - -class ApplicationScopedVolumeCreationParameters(Model): - """Describes parameters for creating application-scoped volumes. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: - ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk - - All required parameters must be populated in order to send to Azure. - - :param description: User readable description of the volume. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ServiceFabricVolumeDisk': 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk'} - } - - def __init__(self, **kwargs): - super(ApplicationScopedVolumeCreationParameters, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.kind = None - - -class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk(ApplicationScopedVolumeCreationParameters): - """Describes parameters for creating application-scoped volumes provided by - Service Fabric Volume Disks. - - All required parameters must be populated in order to send to Azure. - - :param description: User readable description of the volume. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param size_disk: Required. Volume size. Possible values include: 'Small', - 'Medium', 'Large' - :type size_disk: str or ~azure.servicefabric.models.SizeTypes - """ - - _validation = { - 'kind': {'required': True}, - 'size_disk': {'required': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'size_disk': {'key': 'sizeDisk', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__(**kwargs) - self.size_disk = kwargs.get('size_disk', None) - self.kind = 'ServiceFabricVolumeDisk' - - -class ApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for applications, containing health - evaluations for each unhealthy application that impacted current aggregated - health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_applications: Maximum allowed percentage of - unhealthy applications from the ClusterHealthPolicy. - :type max_percent_unhealthy_applications: int - :param total_count: Total number of applications from the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - ApplicationHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(ApplicationsHealthEvaluation, self).__init__(**kwargs) - self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Applications' - - -class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for applications of a particular application - type. The application type applications evaluation can be returned when - cluster health evaluation returns unhealthy aggregated health state, either - Error or Warning. It contains health evaluations for each unhealthy - application of the included application type that impacted current - aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param application_type_name: The application type name as defined in the - application manifest. - :type application_type_name: str - :param max_percent_unhealthy_applications: Maximum allowed percentage of - unhealthy applications for the application type, specified as an entry in - ApplicationTypeHealthPolicyMap. - :type max_percent_unhealthy_applications: int - :param total_count: Total number of applications of the application type - found in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - ApplicationHealthEvaluation of this application type that impacted the - aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(ApplicationTypeApplicationsHealthEvaluation, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'ApplicationTypeApplications' - - -class ApplicationTypeHealthPolicyMapItem(Model): - """Defines an item in ApplicationTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key of the application type health policy map - item. This is the name of the application type. - :type key: str - :param value: Required. The value of the application type health policy - map item. - The max percent unhealthy applications allowed for the application type. - Must be between zero and 100. - :type value: int - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ApplicationTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) - - -class ApplicationTypeImageStorePath(Model): - """Path description for the application package in the image store specified - during the prior copy operation. - - All required parameters must be populated in order to send to Azure. - - :param application_type_build_path: Required. The relative image store - path to the application package. - :type application_type_build_path: str - """ - - _validation = { - 'application_type_build_path': {'required': True}, - } - - _attribute_map = { - 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationTypeImageStorePath, self).__init__(**kwargs) - self.application_type_build_path = kwargs.get('application_type_build_path', None) - - -class ApplicationTypeInfo(Model): - """Information about an application type. - - :param name: The application type name as defined in the application - manifest. - :type name: str - :param version: The version of the application type as defined in the - application manifest. - :type version: str - :param default_parameter_list: List of application type parameters that - can be overridden when creating or updating the application. - :type default_parameter_list: - list[~azure.servicefabric.models.ApplicationParameter] - :param status: The status of the application type. Possible values - include: 'Invalid', 'Provisioning', 'Available', 'Unprovisioning', - 'Failed' - :type status: str or ~azure.servicefabric.models.ApplicationTypeStatus - :param status_details: Additional detailed information about the status of - the application type. - :type status_details: str - :param application_type_definition_kind: The mechanism used to define a - Service Fabric application type. Possible values include: 'Invalid', - 'ServiceFabricApplicationPackage', 'Compose' - :type application_type_definition_kind: str or - ~azure.servicefabric.models.ApplicationTypeDefinitionKind - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'default_parameter_list': {'key': 'DefaultParameterList', 'type': '[ApplicationParameter]'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - 'application_type_definition_kind': {'key': 'ApplicationTypeDefinitionKind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationTypeInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) - self.default_parameter_list = kwargs.get('default_parameter_list', None) - self.status = kwargs.get('status', None) - self.status_details = kwargs.get('status_details', None) - self.application_type_definition_kind = kwargs.get('application_type_definition_kind', None) - - -class ApplicationTypeManifest(Model): - """Contains the manifest describing an application type registered in a - Service Fabric cluster. - - :param manifest: The XML manifest as a string. - :type manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationTypeManifest, self).__init__(**kwargs) - self.manifest = kwargs.get('manifest', None) - - -class ApplicationUpgradeCompletedEvent(ApplicationEvent): - """Application Upgrade Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param application_type_version: Required. Application type version. - :type application_type_version: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time - in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ApplicationUpgradeCompletedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ApplicationUpgradeCompleted' - - -class ApplicationUpgradeDescription(Model): - """Describes the parameters for an application upgrade. Note that upgrade - description replaces the existing application description. This means that - if the parameters are not specified, the existing parameters on the - applications will be overwritten with the empty parameters list. This would - result in the application using the default value of the parameters from - the application manifest. If you do not want to change any existing - parameter values, please get the application parameters first using the - GetApplicationInfo query and then supply those values as Parameters in this - ApplicationUpgradeDescription. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the target application, including the - 'fabric:' URI scheme. - :type name: str - :param target_application_type_version: Required. The target application - type version (found in the application manifest) for the application - upgrade. - :type target_application_type_version: str - :param parameters: List of application parameters with overridden values - from their default values specified in the application manifest. - :type parameters: list[~azure.servicefabric.models.ApplicationParameter] - :param upgrade_kind: Required. The kind of upgrade out of the following - possible values. Possible values include: 'Invalid', 'Rolling'. Default - value: "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param sort_order: Defines the order in which an upgrade proceeds through - the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', - 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default - value: "Default" . - :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param instance_close_delay_duration_in_seconds: Duration in seconds, to - wait before a stateless instance is closed, to allow the active requests - to drain gracefully. This would be effective when the instance is closing - during the application/cluster - upgrade, only for those instances which have a non-zero delay duration - configured in the service description. See - InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is - 4294967295, which indicates that the behavior will entirely depend on the - delay configured in the stateless service description. - :type instance_close_delay_duration_in_seconds: long - :param managed_application_identity: Managed application identity - description. - :type managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - - _validation = { - 'name': {'required': True}, - 'target_application_type_version': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__(self, **kwargs): - super(ApplicationUpgradeDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.target_application_type_version = kwargs.get('target_application_type_version', None) - self.parameters = kwargs.get('parameters', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) - self.force_restart = kwargs.get('force_restart', None) - self.sort_order = kwargs.get('sort_order', "Default") - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.application_health_policy = kwargs.get('application_health_policy', None) - self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', None) - self.managed_application_identity = kwargs.get('managed_application_identity', None) - - -class ApplicationUpgradeDomainCompletedEvent(ApplicationEvent): - """Application Upgrade Domain Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param current_application_type_version: Required. Current Application - type version. - :type current_application_type_version: str - :param application_type_version: Required. Target Application type - version. - :type application_type_version: str - :param upgrade_state: Required. State of upgrade. - :type upgrade_state: str - :param upgrade_domains: Required. Upgrade domains. - :type upgrade_domains: str - :param upgrade_domain_elapsed_time_in_ms: Required. Upgrade time of domain - in milli-seconds. - :type upgrade_domain_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'upgrade_state': {'required': True}, - 'upgrade_domains': {'required': True}, - 'upgrade_domain_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, - 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ApplicationUpgradeDomainCompletedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.current_application_type_version = kwargs.get('current_application_type_version', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.upgrade_domains = kwargs.get('upgrade_domains', None) - self.upgrade_domain_elapsed_time_in_ms = kwargs.get('upgrade_domain_elapsed_time_in_ms', None) - self.kind = 'ApplicationUpgradeDomainCompleted' - - -class ApplicationUpgradeProgressInfo(Model): - """Describes the parameters for an application upgrade. - - :param name: The name of the target application, including the 'fabric:' - URI scheme. - :type name: str - :param type_name: The application type name as defined in the application - manifest. - :type type_name: str - :param target_application_type_version: The target application type - version (found in the application manifest) for the application upgrade. - :type target_application_type_version: str - :param upgrade_domains: List of upgrade domains and their statuses. - :type upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] - :param upgrade_state: The state of the upgrade domain. Possible values - include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', - 'RollingForwardPending', 'RollingForwardInProgress', - 'RollingForwardCompleted', 'Failed' - :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :param next_upgrade_domain: The name of the next upgrade domain to be - processed. - :type next_upgrade_domain: str - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_description: Describes the parameters for an application - upgrade. Note that upgrade description replaces the existing application - description. This means that if the parameters are not specified, the - existing parameters on the applications will be overwritten with the empty - parameters list. This would result in the application using the default - value of the parameters from the application manifest. If you do not want - to change any existing parameter values, please get the application - parameters first using the GetApplicationInfo query and then supply those - values as Parameters in this ApplicationUpgradeDescription. - :type upgrade_description: - ~azure.servicefabric.models.ApplicationUpgradeDescription - :param upgrade_duration_in_milliseconds: The estimated total amount of - time spent processing the overall upgrade. - :type upgrade_duration_in_milliseconds: str - :param upgrade_domain_duration_in_milliseconds: The estimated total amount - of time spent processing the current upgrade domain. - :type upgrade_domain_duration_in_milliseconds: str - :param unhealthy_evaluations: List of health evaluations that resulted in - the current aggregated health state. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param current_upgrade_domain_progress: Information about the current - in-progress upgrade domain. - :type current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :param start_timestamp_utc: The estimated UTC datetime when the upgrade - started. - :type start_timestamp_utc: str - :param failure_timestamp_utc: The estimated UTC datetime when the upgrade - failed and FailureAction was executed. - :type failure_timestamp_utc: str - :param failure_reason: The cause of an upgrade failure that resulted in - FailureAction being executed. Possible values include: 'None', - 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', - 'OverallUpgradeTimeout' - :type failure_reason: str or ~azure.servicefabric.models.FailureReason - :param upgrade_domain_progress_at_failure: Information about the upgrade - domain progress at the time of upgrade failure. - :type upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo - :param upgrade_status_details: Additional detailed information about the - status of the pending upgrade. - :type upgrade_status_details: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ApplicationUpgradeDescription'}, - 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, - 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, - 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationUpgradeProgressInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.target_application_type_version = kwargs.get('target_application_type_version', None) - self.upgrade_domains = kwargs.get('upgrade_domains', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.next_upgrade_domain = kwargs.get('next_upgrade_domain', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_description = kwargs.get('upgrade_description', None) - self.upgrade_duration_in_milliseconds = kwargs.get('upgrade_duration_in_milliseconds', None) - self.upgrade_domain_duration_in_milliseconds = kwargs.get('upgrade_domain_duration_in_milliseconds', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) - self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) - self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) - self.upgrade_status_details = kwargs.get('upgrade_status_details', None) - - -class ApplicationUpgradeRollbackCompletedEvent(ApplicationEvent): - """Application Upgrade Rollback Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param application_type_version: Required. Application type version. - :type application_type_version: str - :param failure_reason: Required. Describes reason of failure. - :type failure_reason: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time - in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ApplicationUpgradeRollbackCompletedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ApplicationUpgradeRollbackCompleted' - - -class ApplicationUpgradeRollbackStartedEvent(ApplicationEvent): - """Application Upgrade Rollback Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param current_application_type_version: Required. Current Application - type version. - :type current_application_type_version: str - :param application_type_version: Required. Target Application type - version. - :type application_type_version: str - :param failure_reason: Required. Describes reason of failure. - :type failure_reason: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time - in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ApplicationUpgradeRollbackStartedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.current_application_type_version = kwargs.get('current_application_type_version', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ApplicationUpgradeRollbackStarted' - - -class ApplicationUpgradeStartedEvent(ApplicationEvent): - """Application Upgrade Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param current_application_type_version: Required. Current Application - type version. - :type current_application_type_version: str - :param application_type_version: Required. Target Application type - version. - :type application_type_version: str - :param upgrade_type: Required. Type of upgrade. - :type upgrade_type: str - :param rolling_upgrade_mode: Required. Mode of upgrade. - :type rolling_upgrade_mode: str - :param failure_action: Required. Action if failed. - :type failure_action: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'upgrade_type': {'required': True}, - 'rolling_upgrade_mode': {'required': True}, - 'failure_action': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationUpgradeStartedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.current_application_type_version = kwargs.get('current_application_type_version', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.upgrade_type = kwargs.get('upgrade_type', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', None) - self.failure_action = kwargs.get('failure_action', None) - self.kind = 'ApplicationUpgradeStarted' - - -class ApplicationUpgradeUpdateDescription(Model): - """Describes the parameters for updating an ongoing application upgrade. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the application, including the - 'fabric:' URI scheme. - :type name: str - :param upgrade_kind: Required. The kind of upgrade out of the following - possible values. Possible values include: 'Invalid', 'Rolling'. Default - value: "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param update_description: Describes the parameters for updating a rolling - upgrade of application or cluster. - :type update_description: - ~azure.servicefabric.models.RollingUpgradeUpdateDescription - """ - - _validation = { - 'name': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, - } - - def __init__(self, **kwargs): - super(ApplicationUpgradeUpdateDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.application_health_policy = kwargs.get('application_health_policy', None) - self.update_description = kwargs.get('update_description', None) - - -class AutoScalingMetric(Model): - """Describes the metric that is used for triggering auto scaling operation. - Derived classes will describe resources or metrics. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AutoScalingResourceMetric - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Resource': 'AutoScalingResourceMetric'} - } - - def __init__(self, **kwargs): - super(AutoScalingMetric, self).__init__(**kwargs) - self.kind = None - - -class AutoScalingPolicy(Model): - """Describes the auto scaling policy. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the auto scaling policy. - :type name: str - :param trigger: Required. Determines when auto scaling operation will be - invoked. - :type trigger: ~azure.servicefabric.models.AutoScalingTrigger - :param mechanism: Required. The mechanism that is used to scale when auto - scaling operation is invoked. - :type mechanism: ~azure.servicefabric.models.AutoScalingMechanism - """ - - _validation = { - 'name': {'required': True}, - 'trigger': {'required': True}, - 'mechanism': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'trigger': {'key': 'trigger', 'type': 'AutoScalingTrigger'}, - 'mechanism': {'key': 'mechanism', 'type': 'AutoScalingMechanism'}, - } - - def __init__(self, **kwargs): - super(AutoScalingPolicy, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.trigger = kwargs.get('trigger', None) - self.mechanism = kwargs.get('mechanism', None) - - -class AutoScalingResourceMetric(AutoScalingMetric): - """Describes the resource that is used for triggering auto scaling. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param name: Required. Name of the resource. Possible values include: - 'cpu', 'memoryInGB' - :type name: str or - ~azure.servicefabric.models.AutoScalingResourceMetricName - """ - - _validation = { - 'kind': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AutoScalingResourceMetric, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.kind = 'Resource' - - -class AutoScalingTrigger(Model): - """Describes the trigger for performing auto scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AverageLoadScalingTrigger - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AverageLoad': 'AverageLoadScalingTrigger'} - } - - def __init__(self, **kwargs): - super(AutoScalingTrigger, self).__init__(**kwargs) - self.kind = None - - -class AverageLoadScalingTrigger(AutoScalingTrigger): - """Describes the average load trigger used for auto scaling. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param metric: Required. Description of the metric that is used for - scaling. - :type metric: ~azure.servicefabric.models.AutoScalingMetric - :param lower_load_threshold: Required. Lower load threshold (if average - load is below this threshold, service will scale down). - :type lower_load_threshold: float - :param upper_load_threshold: Required. Upper load threshold (if average - load is above this threshold, service will scale up). - :type upper_load_threshold: float - :param scale_interval_in_seconds: Required. Scale interval that indicates - how often will this trigger be checked. - :type scale_interval_in_seconds: int - """ - - _validation = { - 'kind': {'required': True}, - 'metric': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'minimum': 60}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'metric': {'key': 'metric', 'type': 'AutoScalingMetric'}, - 'lower_load_threshold': {'key': 'lowerLoadThreshold', 'type': 'float'}, - 'upper_load_threshold': {'key': 'upperLoadThreshold', 'type': 'float'}, - 'scale_interval_in_seconds': {'key': 'scaleIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(AverageLoadScalingTrigger, self).__init__(**kwargs) - self.metric = kwargs.get('metric', None) - self.lower_load_threshold = kwargs.get('lower_load_threshold', None) - self.upper_load_threshold = kwargs.get('upper_load_threshold', None) - self.scale_interval_in_seconds = kwargs.get('scale_interval_in_seconds', None) - self.kind = 'AverageLoad' - - -class ScalingTriggerDescription(Model): - """Describes the trigger for performing a scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AveragePartitionLoadScalingTrigger, - AverageServiceLoadScalingTrigger - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AveragePartitionLoad': 'AveragePartitionLoadScalingTrigger', 'AverageServiceLoad': 'AverageServiceLoadScalingTrigger'} - } - - def __init__(self, **kwargs): - super(ScalingTriggerDescription, self).__init__(**kwargs) - self.kind = None - - -class AveragePartitionLoadScalingTrigger(ScalingTriggerDescription): - """Represents a scaling trigger related to an average load of a - metric/resource of a partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param metric_name: Required. The name of the metric for which usage - should be tracked. - :type metric_name: str - :param lower_load_threshold: Required. The lower limit of the load below - which a scale in operation should be performed. - :type lower_load_threshold: str - :param upper_load_threshold: Required. The upper limit of the load beyond - which a scale out operation should be performed. - :type upper_load_threshold: str - :param scale_interval_in_seconds: Required. The period in seconds on which - a decision is made whether to scale or not. - :type scale_interval_in_seconds: long - """ - - _validation = { - 'kind': {'required': True}, - 'metric_name': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, - 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, - 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(AveragePartitionLoadScalingTrigger, self).__init__(**kwargs) - self.metric_name = kwargs.get('metric_name', None) - self.lower_load_threshold = kwargs.get('lower_load_threshold', None) - self.upper_load_threshold = kwargs.get('upper_load_threshold', None) - self.scale_interval_in_seconds = kwargs.get('scale_interval_in_seconds', None) - self.kind = 'AveragePartitionLoad' - - -class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): - """Represents a scaling policy related to an average load of a metric/resource - of a service. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param metric_name: Required. The name of the metric for which usage - should be tracked. - :type metric_name: str - :param lower_load_threshold: Required. The lower limit of the load below - which a scale in operation should be performed. - :type lower_load_threshold: str - :param upper_load_threshold: Required. The upper limit of the load beyond - which a scale out operation should be performed. - :type upper_load_threshold: str - :param scale_interval_in_seconds: Required. The period in seconds on which - a decision is made whether to scale or not. - :type scale_interval_in_seconds: long - :param use_only_primary_load: Required. Flag determines whether only the - load of primary replica should be considered for scaling. - If set to true, then trigger will only consider the load of primary - replicas of stateful service. - If set to false, trigger will consider load of all replicas. - This parameter cannot be set to true for stateless service. - :type use_only_primary_load: bool - """ - - _validation = { - 'kind': {'required': True}, - 'metric_name': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, - 'use_only_primary_load': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, - 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, - 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, - 'use_only_primary_load': {'key': 'UseOnlyPrimaryLoad', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AverageServiceLoadScalingTrigger, self).__init__(**kwargs) - self.metric_name = kwargs.get('metric_name', None) - self.lower_load_threshold = kwargs.get('lower_load_threshold', None) - self.upper_load_threshold = kwargs.get('upper_load_threshold', None) - self.scale_interval_in_seconds = kwargs.get('scale_interval_in_seconds', None) - self.use_only_primary_load = kwargs.get('use_only_primary_load', None) - self.kind = 'AverageServiceLoad' - - -class BackupStorageDescription(Model): - """Describes the parameters for the backup storage. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureBlobBackupStorageDescription, - FileShareBackupStorageDescription, DsmsAzureBlobBackupStorageDescription, - ManagedIdentityAzureBlobBackupStorageDescription - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - """ - - _validation = { - 'storage_kind': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - } - - _subtype_map = { - 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription', 'ManagedIdentityAzureBlobStore': 'ManagedIdentityAzureBlobBackupStorageDescription'} - } - - def __init__(self, **kwargs): - super(BackupStorageDescription, self).__init__(**kwargs) - self.friendly_name = kwargs.get('friendly_name', None) - self.storage_kind = None - - -class AzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Azure blob store used for storing and - enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - :param connection_string: Required. The connection string to connect to - the Azure blob store. - :type connection_string: str - :param container_name: Required. The name of the container in the blob - store to store and enumerate backups from. - :type container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'connection_string': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'connection_string': {'key': 'ConnectionString', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureBlobBackupStorageDescription, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.container_name = kwargs.get('container_name', None) - self.storage_kind = 'AzureBlobStore' - - -class DiagnosticsSinkProperties(Model): - """Properties of a DiagnosticsSink. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureInternalMonitoringPipelineSinkDescription - - All required parameters must be populated in order to send to Azure. - - :param name: Name of the sink. This value is referenced by - DiagnosticsReferenceDescription - :type name: str - :param description: A description of the sink. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AzureInternalMonitoringPipeline': 'AzureInternalMonitoringPipelineSinkDescription'} - } - - def __init__(self, **kwargs): - super(DiagnosticsSinkProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) - self.kind = None - - -class AzureInternalMonitoringPipelineSinkDescription(DiagnosticsSinkProperties): - """Diagnostics settings for Geneva. - - All required parameters must be populated in order to send to Azure. - - :param name: Name of the sink. This value is referenced by - DiagnosticsReferenceDescription - :type name: str - :param description: A description of the sink. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param account_name: Azure Internal monitoring pipeline account. - :type account_name: str - :param namespace: Azure Internal monitoring pipeline account namespace. - :type namespace: str - :param ma_config_url: Azure Internal monitoring agent configuration. - :type ma_config_url: str - :param fluentd_config_url: Azure Internal monitoring agent fluentd - configuration. - :type fluentd_config_url: str - :param auto_key_config_url: Azure Internal monitoring pipeline autokey - associated with the certificate. - :type auto_key_config_url: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'ma_config_url': {'key': 'maConfigUrl', 'type': 'str'}, - 'fluentd_config_url': {'key': 'fluentdConfigUrl', 'type': 'str'}, - 'auto_key_config_url': {'key': 'autoKeyConfigUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureInternalMonitoringPipelineSinkDescription, self).__init__(**kwargs) - self.account_name = kwargs.get('account_name', None) - self.namespace = kwargs.get('namespace', None) - self.ma_config_url = kwargs.get('ma_config_url', None) - self.fluentd_config_url = kwargs.get('fluentd_config_url', None) - self.auto_key_config_url = kwargs.get('auto_key_config_url', None) - self.kind = 'AzureInternalMonitoringPipeline' - - -class BackupInfo(Model): - """Represents a backup point which can be used to trigger a restore. - - :param backup_id: Unique backup ID . - :type backup_id: str - :param backup_chain_id: Unique backup chain ID. All backups part of the - same chain has the same backup chain id. A backup chain is comprised of 1 - full backup and multiple incremental backups. - :type backup_chain_id: str - :param application_name: Name of the Service Fabric application this - partition backup belongs to. - :type application_name: str - :param service_name: Name of the Service Fabric service this partition - backup belongs to. - :type service_name: str - :param partition_information: Information about the partition to which - this backup belongs to - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param backup_location: Location of the backup, relative to the backup - store. - :type backup_location: str - :param backup_type: Describes the type of backup, whether its full or - incremental. Possible values include: 'Invalid', 'Full', 'Incremental' - :type backup_type: str or ~azure.servicefabric.models.BackupType - :param epoch_of_last_backup_record: Epoch of the last record in this - backup. - :type epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch - :param lsn_of_last_backup_record: LSN of the last record in this backup. - :type lsn_of_last_backup_record: str - :param creation_time_utc: The date time when this backup was taken. - :type creation_time_utc: datetime - :param service_manifest_version: Manifest Version of the service this - partition backup belongs to. - :type service_manifest_version: str - :param failure_error: Denotes the failure encountered in getting backup - point information. - :type failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_chain_id': {'key': 'BackupChainId', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'backup_type': {'key': 'BackupType', 'type': 'str'}, - 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, - 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, - 'creation_time_utc': {'key': 'CreationTimeUtc', 'type': 'iso-8601'}, - 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__(self, **kwargs): - super(BackupInfo, self).__init__(**kwargs) - self.backup_id = kwargs.get('backup_id', None) - self.backup_chain_id = kwargs.get('backup_chain_id', None) - self.application_name = kwargs.get('application_name', None) - self.service_name = kwargs.get('service_name', None) - self.partition_information = kwargs.get('partition_information', None) - self.backup_location = kwargs.get('backup_location', None) - self.backup_type = kwargs.get('backup_type', None) - self.epoch_of_last_backup_record = kwargs.get('epoch_of_last_backup_record', None) - self.lsn_of_last_backup_record = kwargs.get('lsn_of_last_backup_record', None) - self.creation_time_utc = kwargs.get('creation_time_utc', None) - self.service_manifest_version = kwargs.get('service_manifest_version', None) - self.failure_error = kwargs.get('failure_error', None) - - -class BackupPartitionDescription(Model): - """Describes the parameters for triggering partition's backup. - - :param backup_storage: Specifies the details of the backup storage where - to save the backup. - :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription - """ - - _attribute_map = { - 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, - } - - def __init__(self, **kwargs): - super(BackupPartitionDescription, self).__init__(**kwargs) - self.backup_storage = kwargs.get('backup_storage', None) - - -class BackupPolicyDescription(Model): - """Describes a backup policy for configuring periodic backup. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The unique name identifying this backup policy. - :type name: str - :param auto_restore_on_data_loss: Required. Specifies whether to trigger - restore automatically using the latest available backup in case the - partition experiences a data loss event. - :type auto_restore_on_data_loss: bool - :param max_incremental_backups: Required. Defines the maximum number of - incremental backups to be taken between two full backups. This is just the - upper limit. A full backup may be taken before specified number of - incremental backups are completed in one of the following conditions - - The replica has never taken a full backup since it has become primary, - - Some of the log records since the last backup has been truncated, or - - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. - :type max_incremental_backups: int - :param schedule: Required. Describes the backup schedule parameters. - :type schedule: ~azure.servicefabric.models.BackupScheduleDescription - :param storage: Required. Describes the details of backup storage where to - store the periodic backups. - :type storage: ~azure.servicefabric.models.BackupStorageDescription - :param retention_policy: Describes the policy to retain backups in - storage. - :type retention_policy: - ~azure.servicefabric.models.RetentionPolicyDescription - """ - - _validation = { - 'name': {'required': True}, - 'auto_restore_on_data_loss': {'required': True}, - 'max_incremental_backups': {'required': True, 'maximum': 255, 'minimum': 0}, - 'schedule': {'required': True}, - 'storage': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'auto_restore_on_data_loss': {'key': 'AutoRestoreOnDataLoss', 'type': 'bool'}, - 'max_incremental_backups': {'key': 'MaxIncrementalBackups', 'type': 'int'}, - 'schedule': {'key': 'Schedule', 'type': 'BackupScheduleDescription'}, - 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, - 'retention_policy': {'key': 'RetentionPolicy', 'type': 'RetentionPolicyDescription'}, - } - - def __init__(self, **kwargs): - super(BackupPolicyDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.auto_restore_on_data_loss = kwargs.get('auto_restore_on_data_loss', None) - self.max_incremental_backups = kwargs.get('max_incremental_backups', None) - self.schedule = kwargs.get('schedule', None) - self.storage = kwargs.get('storage', None) - self.retention_policy = kwargs.get('retention_policy', None) - - -class BackupProgressInfo(Model): - """Describes the progress of a partition's backup. - - :param backup_state: Represents the current state of the partition backup - operation. Possible values include: 'Invalid', 'Accepted', - 'BackupInProgress', 'Success', 'Failure', 'Timeout' - :type backup_state: str or ~azure.servicefabric.models.BackupState - :param time_stamp_utc: TimeStamp in UTC when operation succeeded or - failed. - :type time_stamp_utc: datetime - :param backup_id: Unique ID of the newly created backup. - :type backup_id: str - :param backup_location: Location, relative to the backup store, of the - newly created backup. - :type backup_location: str - :param epoch_of_last_backup_record: Specifies the epoch of the last record - included in backup. - :type epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch - :param lsn_of_last_backup_record: The LSN of last record included in - backup. - :type lsn_of_last_backup_record: str - :param failure_error: Denotes the failure encountered in performing backup - operation. - :type failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'backup_state': {'key': 'BackupState', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, - 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__(self, **kwargs): - super(BackupProgressInfo, self).__init__(**kwargs) - self.backup_state = kwargs.get('backup_state', None) - self.time_stamp_utc = kwargs.get('time_stamp_utc', None) - self.backup_id = kwargs.get('backup_id', None) - self.backup_location = kwargs.get('backup_location', None) - self.epoch_of_last_backup_record = kwargs.get('epoch_of_last_backup_record', None) - self.lsn_of_last_backup_record = kwargs.get('lsn_of_last_backup_record', None) - self.failure_error = kwargs.get('failure_error', None) - - -class BackupScheduleDescription(Model): - """Describes the backup schedule parameters. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: FrequencyBasedBackupScheduleDescription, - TimeBasedBackupScheduleDescription - - All required parameters must be populated in order to send to Azure. - - :param schedule_kind: Required. Constant filled by server. - :type schedule_kind: str - """ - - _validation = { - 'schedule_kind': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - } - - _subtype_map = { - 'schedule_kind': {'FrequencyBased': 'FrequencyBasedBackupScheduleDescription', 'TimeBased': 'TimeBasedBackupScheduleDescription'} - } - - def __init__(self, **kwargs): - super(BackupScheduleDescription, self).__init__(**kwargs) - self.schedule_kind = None - - -class BackupSuspensionInfo(Model): - """Describes the backup suspension details. - - :param is_suspended: Indicates whether periodic backup is suspended at - this level or not. - :type is_suspended: bool - :param suspension_inherited_from: Specifies the scope at which the backup - suspension was applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type suspension_inherited_from: str or - ~azure.servicefabric.models.BackupSuspensionScope - """ - - _attribute_map = { - 'is_suspended': {'key': 'IsSuspended', 'type': 'bool'}, - 'suspension_inherited_from': {'key': 'SuspensionInheritedFrom', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BackupSuspensionInfo, self).__init__(**kwargs) - self.is_suspended = kwargs.get('is_suspended', None) - self.suspension_inherited_from = kwargs.get('suspension_inherited_from', None) - - -class RetentionPolicyDescription(Model): - """Describes the retention policy configured. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BasicRetentionPolicyDescription - - All required parameters must be populated in order to send to Azure. - - :param retention_policy_type: Required. Constant filled by server. - :type retention_policy_type: str - """ - - _validation = { - 'retention_policy_type': {'required': True}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, - } - - _subtype_map = { - 'retention_policy_type': {'Basic': 'BasicRetentionPolicyDescription'} - } - - def __init__(self, **kwargs): - super(RetentionPolicyDescription, self).__init__(**kwargs) - self.retention_policy_type = None - - -class BasicRetentionPolicyDescription(RetentionPolicyDescription): - """Describes basic retention policy. - - All required parameters must be populated in order to send to Azure. - - :param retention_policy_type: Required. Constant filled by server. - :type retention_policy_type: str - :param retention_duration: Required. It is the minimum duration for which - a backup created, will remain stored in the storage and might get deleted - after that span of time. It should be specified in ISO8601 format. - :type retention_duration: timedelta - :param minimum_number_of_backups: It is the minimum number of backups to - be retained at any point of time. If specified with a non zero value, - backups will not be deleted even if the backups have gone past retention - duration and have number of backups less than or equal to it. - :type minimum_number_of_backups: int - """ - - _validation = { - 'retention_policy_type': {'required': True}, - 'retention_duration': {'required': True}, - 'minimum_number_of_backups': {'minimum': 0}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, - 'retention_duration': {'key': 'RetentionDuration', 'type': 'duration'}, - 'minimum_number_of_backups': {'key': 'MinimumNumberOfBackups', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BasicRetentionPolicyDescription, self).__init__(**kwargs) - self.retention_duration = kwargs.get('retention_duration', None) - self.minimum_number_of_backups = kwargs.get('minimum_number_of_backups', None) - self.retention_policy_type = 'Basic' - - -class PropertyValue(Model): - """Describes a Service Fabric property value. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BinaryPropertyValue, Int64PropertyValue, - DoublePropertyValue, StringPropertyValue, GuidPropertyValue - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Binary': 'BinaryPropertyValue', 'Int64': 'Int64PropertyValue', 'Double': 'DoublePropertyValue', 'String': 'StringPropertyValue', 'Guid': 'GuidPropertyValue'} - } - - def __init__(self, **kwargs): - super(PropertyValue, self).__init__(**kwargs) - self.kind = None - - -class BinaryPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Binary. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. Array of bytes to be sent as an integer array. Each - element of array is a number between 0 and 255. - :type data: list[int] - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': '[int]'}, - } - - def __init__(self, **kwargs): - super(BinaryPropertyValue, self).__init__(**kwargs) - self.data = kwargs.get('data', None) - self.kind = 'Binary' - - -class Chaos(Model): - """Contains a description of Chaos. - - :param chaos_parameters: If Chaos is running, these are the parameters - Chaos is running with. - :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters - :param status: Current status of the Chaos run. Possible values include: - 'Invalid', 'Running', 'Stopped' - :type status: str or ~azure.servicefabric.models.ChaosStatus - :param schedule_status: Current status of the schedule. Possible values - include: 'Invalid', 'Stopped', 'Active', 'Expired', 'Pending' - :type schedule_status: str or - ~azure.servicefabric.models.ChaosScheduleStatus - """ - - _attribute_map = { - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'schedule_status': {'key': 'ScheduleStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Chaos, self).__init__(**kwargs) - self.chaos_parameters = kwargs.get('chaos_parameters', None) - self.status = kwargs.get('status', None) - self.schedule_status = kwargs.get('schedule_status', None) - - -class ChaosCodePackageRestartScheduledEvent(ApplicationEvent): - """Chaos Restart Code Package Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param service_manifest_name: Required. Service manifest name. - :type service_manifest_name: str - :param code_package_name: Required. Code package name. - :type code_package_name: str - :param service_package_activation_id: Required. Id of Service package - activation. - :type service_package_activation_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'node_name': {'required': True}, - 'service_manifest_name': {'required': True}, - 'code_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ChaosCodePackageRestartScheduledEvent, self).__init__(**kwargs) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.node_name = kwargs.get('node_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.kind = 'ChaosCodePackageRestartScheduled' - - -class ChaosContext(Model): - """Describes a map, which is a collection of (string, string) type key-value - pairs. The map can be used to record information about - the Chaos run. There cannot be more than 100 such pairs and each string - (key or value) can be at most 4095 characters long. - This map is set by the starter of the Chaos run to optionally store the - context about the specific run. - - :param map: Describes a map that contains a collection of - ChaosContextMapItem's. - :type map: dict[str, str] - """ - - _attribute_map = { - 'map': {'key': 'Map', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ChaosContext, self).__init__(**kwargs) - self.map = kwargs.get('map', None) - - -class ChaosEvent(Model): - """Represents an event generated during a Chaos run. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ExecutingFaultsChaosEvent, StartedChaosEvent, - StoppedChaosEvent, TestErrorChaosEvent, ValidationFailedChaosEvent, - WaitingChaosEvent - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ExecutingFaults': 'ExecutingFaultsChaosEvent', 'Started': 'StartedChaosEvent', 'Stopped': 'StoppedChaosEvent', 'TestError': 'TestErrorChaosEvent', 'ValidationFailed': 'ValidationFailedChaosEvent', 'Waiting': 'WaitingChaosEvent'} - } - - def __init__(self, **kwargs): - super(ChaosEvent, self).__init__(**kwargs) - self.time_stamp_utc = kwargs.get('time_stamp_utc', None) - self.kind = None - - -class ChaosEventsSegment(Model): - """Contains the list of Chaos events and the continuation token to get the - next segment. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param history: List of Chaos events that meet the user-supplied criteria. - :type history: list[~azure.servicefabric.models.ChaosEventWrapper] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'history': {'key': 'History', 'type': '[ChaosEventWrapper]'}, - } - - def __init__(self, **kwargs): - super(ChaosEventsSegment, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.history = kwargs.get('history', None) - - -class ChaosEventWrapper(Model): - """Wrapper object for Chaos event. - - :param chaos_event: Represents an event generated during a Chaos run. - :type chaos_event: ~azure.servicefabric.models.ChaosEvent - """ - - _attribute_map = { - 'chaos_event': {'key': 'ChaosEvent', 'type': 'ChaosEvent'}, - } - - def __init__(self, **kwargs): - super(ChaosEventWrapper, self).__init__(**kwargs) - self.chaos_event = kwargs.get('chaos_event', None) - - -class NodeEvent(FabricEvent): - """Represents the base for all Node Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NodeAbortedEvent, NodeAddedToClusterEvent, - NodeClosedEvent, NodeDeactivateCompletedEvent, NodeDeactivateStartedEvent, - NodeDownEvent, NodeNewHealthReportEvent, NodeHealthReportExpiredEvent, - NodeOpenSucceededEvent, NodeOpenFailedEvent, NodeRemovedFromClusterEvent, - NodeUpEvent, ChaosNodeRestartScheduledEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'NodeAborted': 'NodeAbortedEvent', 'NodeAddedToCluster': 'NodeAddedToClusterEvent', 'NodeClosed': 'NodeClosedEvent', 'NodeDeactivateCompleted': 'NodeDeactivateCompletedEvent', 'NodeDeactivateStarted': 'NodeDeactivateStartedEvent', 'NodeDown': 'NodeDownEvent', 'NodeNewHealthReport': 'NodeNewHealthReportEvent', 'NodeHealthReportExpired': 'NodeHealthReportExpiredEvent', 'NodeOpenSucceeded': 'NodeOpenSucceededEvent', 'NodeOpenFailed': 'NodeOpenFailedEvent', 'NodeRemovedFromCluster': 'NodeRemovedFromClusterEvent', 'NodeUp': 'NodeUpEvent', 'ChaosNodeRestartScheduled': 'ChaosNodeRestartScheduledEvent'} - } - - def __init__(self, **kwargs): - super(NodeEvent, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.kind = 'NodeEvent' - - -class ChaosNodeRestartScheduledEvent(NodeEvent): - """Chaos Restart Node Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: Required. Id of Node instance. - :type node_instance_id: long - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ChaosNodeRestartScheduledEvent, self).__init__(**kwargs) - self.node_instance_id = kwargs.get('node_instance_id', None) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.kind = 'ChaosNodeRestartScheduled' - - -class ChaosParameters(Model): - """Defines all the parameters to configure a Chaos run. - - :param time_to_run_in_seconds: Total time (in seconds) for which Chaos - will run before automatically stopping. The maximum allowed value is - 4,294,967,295 (System.UInt32.MaxValue). Default value: "4294967295" . - :type time_to_run_in_seconds: str - :param max_cluster_stabilization_timeout_in_seconds: The maximum amount of - time to wait for all cluster entities to become stable and healthy. Chaos - executes in iterations and at the start of each iteration it validates the - health of cluster entities. - During validation if a cluster entity is not stable and healthy within - MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation - failed event. Default value: 60 . - :type max_cluster_stabilization_timeout_in_seconds: long - :param max_concurrent_faults: MaxConcurrentFaults is the maximum number of - concurrent faults induced per iteration. - Chaos executes in iterations and two consecutive iterations are separated - by a validation phase. - The higher the concurrency, the more aggressive the injection of faults, - leading to inducing more complex series of states to uncover bugs. - The recommendation is to start with a value of 2 or 3 and to exercise - caution while moving up. Default value: 1 . - :type max_concurrent_faults: long - :param enable_move_replica_faults: Enables or disables the move primary - and move secondary faults. Default value: True . - :type enable_move_replica_faults: bool - :param wait_time_between_faults_in_seconds: Wait time (in seconds) between - consecutive faults within a single iteration. - The larger the value, the lower the overlapping between faults and the - simpler the sequence of state transitions that the cluster goes through. - The recommendation is to start with a value between 1 and 5 and exercise - caution while moving up. Default value: 20 . - :type wait_time_between_faults_in_seconds: long - :param wait_time_between_iterations_in_seconds: Time-separation (in - seconds) between two consecutive iterations of Chaos. - The larger the value, the lower the fault injection rate. Default value: - 30 . - :type wait_time_between_iterations_in_seconds: long - :param cluster_health_policy: Passed-in cluster health policy is used to - validate health of the cluster in between Chaos iterations. If the cluster - health is in error or if an unexpected exception happens during fault - execution--to provide the cluster with some time to recuperate--Chaos will - wait for 30 minutes before the next health-check. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param context: Describes a map, which is a collection of (string, string) - type key-value pairs. The map can be used to record information about - the Chaos run. There cannot be more than 100 such pairs and each string - (key or value) can be at most 4095 characters long. - This map is set by the starter of the Chaos run to optionally store the - context about the specific run. - :type context: ~azure.servicefabric.models.ChaosContext - :param chaos_target_filter: List of cluster entities to target for Chaos - faults. - This filter can be used to target Chaos faults only to certain node types - or only to certain application instances. If ChaosTargetFilter is not - used, Chaos faults all cluster entities. - If ChaosTargetFilter is used, Chaos faults only the entities that meet the - ChaosTargetFilter specification. - :type chaos_target_filter: ~azure.servicefabric.models.ChaosTargetFilter - """ - - _validation = { - 'max_cluster_stabilization_timeout_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'max_concurrent_faults': {'maximum': 4294967295, 'minimum': 0}, - 'wait_time_between_faults_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'wait_time_between_iterations_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'str'}, - 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'long'}, - 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, - 'enable_move_replica_faults': {'key': 'EnableMoveReplicaFaults', 'type': 'bool'}, - 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'long'}, - 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'long'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'context': {'key': 'Context', 'type': 'ChaosContext'}, - 'chaos_target_filter': {'key': 'ChaosTargetFilter', 'type': 'ChaosTargetFilter'}, - } - - def __init__(self, **kwargs): - super(ChaosParameters, self).__init__(**kwargs) - self.time_to_run_in_seconds = kwargs.get('time_to_run_in_seconds', "4294967295") - self.max_cluster_stabilization_timeout_in_seconds = kwargs.get('max_cluster_stabilization_timeout_in_seconds', 60) - self.max_concurrent_faults = kwargs.get('max_concurrent_faults', 1) - self.enable_move_replica_faults = kwargs.get('enable_move_replica_faults', True) - self.wait_time_between_faults_in_seconds = kwargs.get('wait_time_between_faults_in_seconds', 20) - self.wait_time_between_iterations_in_seconds = kwargs.get('wait_time_between_iterations_in_seconds', 30) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.context = kwargs.get('context', None) - self.chaos_target_filter = kwargs.get('chaos_target_filter', None) - - -class ChaosParametersDictionaryItem(Model): - """Defines an item in ChaosParametersDictionary of the Chaos Schedule. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key identifying the Chaos Parameter in the - dictionary. This key is referenced by Chaos Schedule Jobs. - :type key: str - :param value: Required. Defines all the parameters to configure a Chaos - run. - :type value: ~azure.servicefabric.models.ChaosParameters - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ChaosParameters'}, - } - - def __init__(self, **kwargs): - super(ChaosParametersDictionaryItem, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) - - -class PartitionEvent(FabricEvent): - """Represents the base for all Partition Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionAnalysisEvent, PartitionNewHealthReportEvent, - PartitionHealthReportExpiredEvent, PartitionReconfiguredEvent, - ChaosPartitionSecondaryMoveScheduledEvent, - ChaosPartitionPrimaryMoveScheduledEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'PartitionAnalysisEvent': 'PartitionAnalysisEvent', 'PartitionNewHealthReport': 'PartitionNewHealthReportEvent', 'PartitionHealthReportExpired': 'PartitionHealthReportExpiredEvent', 'PartitionReconfigured': 'PartitionReconfiguredEvent', 'ChaosPartitionSecondaryMoveScheduled': 'ChaosPartitionSecondaryMoveScheduledEvent', 'ChaosPartitionPrimaryMoveScheduled': 'ChaosPartitionPrimaryMoveScheduledEvent'} - } - - def __init__(self, **kwargs): - super(PartitionEvent, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.kind = 'PartitionEvent' - - -class ChaosPartitionPrimaryMoveScheduledEvent(PartitionEvent): - """Chaos Move Primary Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param service_name: Required. Service name. - :type service_name: str - :param node_to: Required. The name of a Service Fabric node. - :type node_to: str - :param forced_move: Required. Indicates a forced move. - :type forced_move: bool - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_name': {'required': True}, - 'node_to': {'required': True}, - 'forced_move': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'node_to': {'key': 'NodeTo', 'type': 'str'}, - 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ChaosPartitionPrimaryMoveScheduledEvent, self).__init__(**kwargs) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.service_name = kwargs.get('service_name', None) - self.node_to = kwargs.get('node_to', None) - self.forced_move = kwargs.get('forced_move', None) - self.kind = 'ChaosPartitionPrimaryMoveScheduled' - - -class ChaosPartitionSecondaryMoveScheduledEvent(PartitionEvent): - """Chaos Move Secondary Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param service_name: Required. Service name. - :type service_name: str - :param source_node: Required. The name of a Service Fabric node. - :type source_node: str - :param destination_node: Required. The name of a Service Fabric node. - :type destination_node: str - :param forced_move: Required. Indicates a forced move. - :type forced_move: bool - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_name': {'required': True}, - 'source_node': {'required': True}, - 'destination_node': {'required': True}, - 'forced_move': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'source_node': {'key': 'SourceNode', 'type': 'str'}, - 'destination_node': {'key': 'DestinationNode', 'type': 'str'}, - 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ChaosPartitionSecondaryMoveScheduledEvent, self).__init__(**kwargs) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.service_name = kwargs.get('service_name', None) - self.source_node = kwargs.get('source_node', None) - self.destination_node = kwargs.get('destination_node', None) - self.forced_move = kwargs.get('forced_move', None) - self.kind = 'ChaosPartitionSecondaryMoveScheduled' - - -class ReplicaEvent(FabricEvent): - """Represents the base for all Replica Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulReplicaNewHealthReportEvent, - StatefulReplicaHealthReportExpiredEvent, - StatelessReplicaNewHealthReportEvent, - StatelessReplicaHealthReportExpiredEvent, - ChaosReplicaRemovalScheduledEvent, ChaosReplicaRestartScheduledEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - } - - _subtype_map = { - 'kind': {'StatefulReplicaNewHealthReport': 'StatefulReplicaNewHealthReportEvent', 'StatefulReplicaHealthReportExpired': 'StatefulReplicaHealthReportExpiredEvent', 'StatelessReplicaNewHealthReport': 'StatelessReplicaNewHealthReportEvent', 'StatelessReplicaHealthReportExpired': 'StatelessReplicaHealthReportExpiredEvent', 'ChaosReplicaRemovalScheduled': 'ChaosReplicaRemovalScheduledEvent', 'ChaosReplicaRestartScheduled': 'ChaosReplicaRestartScheduledEvent'} - } - - def __init__(self, **kwargs): - super(ReplicaEvent, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.replica_id = kwargs.get('replica_id', None) - self.kind = 'ReplicaEvent' - - -class ChaosReplicaRemovalScheduledEvent(ReplicaEvent): - """Chaos Remove Replica Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param service_uri: Required. Service name. - :type service_uri: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_uri': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ChaosReplicaRemovalScheduledEvent, self).__init__(**kwargs) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.service_uri = kwargs.get('service_uri', None) - self.kind = 'ChaosReplicaRemovalScheduled' - - -class ChaosReplicaRestartScheduledEvent(ReplicaEvent): - """Chaos Restart Replica Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param service_uri: Required. Service name. - :type service_uri: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_uri': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ChaosReplicaRestartScheduledEvent, self).__init__(**kwargs) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.service_uri = kwargs.get('service_uri', None) - self.kind = 'ChaosReplicaRestartScheduled' - - -class ChaosSchedule(Model): - """Defines the schedule used by Chaos. - - :param start_date: The date and time Chaos will start using this schedule. - Default value: "1601-01-01T00:00:00Z" . - :type start_date: datetime - :param expiry_date: The date and time Chaos will continue to use this - schedule until. Default value: "9999-12-31T23:59:59.999Z" . - :type expiry_date: datetime - :param chaos_parameters_dictionary: A mapping of string names to Chaos - Parameters to be referenced by Chaos Schedule Jobs. - :type chaos_parameters_dictionary: - list[~azure.servicefabric.models.ChaosParametersDictionaryItem] - :param jobs: A list of all Chaos Schedule Jobs that will be automated by - the schedule. - :type jobs: list[~azure.servicefabric.models.ChaosScheduleJob] - """ - - _attribute_map = { - 'start_date': {'key': 'StartDate', 'type': 'iso-8601'}, - 'expiry_date': {'key': 'ExpiryDate', 'type': 'iso-8601'}, - 'chaos_parameters_dictionary': {'key': 'ChaosParametersDictionary', 'type': '[ChaosParametersDictionaryItem]'}, - 'jobs': {'key': 'Jobs', 'type': '[ChaosScheduleJob]'}, - } - - def __init__(self, **kwargs): - super(ChaosSchedule, self).__init__(**kwargs) - self.start_date = kwargs.get('start_date', "1601-01-01T00:00:00Z") - self.expiry_date = kwargs.get('expiry_date', "9999-12-31T23:59:59.999Z") - self.chaos_parameters_dictionary = kwargs.get('chaos_parameters_dictionary', None) - self.jobs = kwargs.get('jobs', None) - - -class ChaosScheduleDescription(Model): - """Defines the Chaos Schedule used by Chaos and the version of the Chaos - Schedule. The version value wraps back to 0 after surpassing 2,147,483,647. - - :param version: The version number of the Schedule. - :type version: int - :param schedule: Defines the schedule used by Chaos. - :type schedule: ~azure.servicefabric.models.ChaosSchedule - """ - - _validation = { - 'version': {'minimum': 0}, - } - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'int'}, - 'schedule': {'key': 'Schedule', 'type': 'ChaosSchedule'}, - } - - def __init__(self, **kwargs): - super(ChaosScheduleDescription, self).__init__(**kwargs) - self.version = kwargs.get('version', None) - self.schedule = kwargs.get('schedule', None) - - -class ChaosScheduleJob(Model): - """Defines a repetition rule and parameters of Chaos to be used with the Chaos - Schedule. - - :param chaos_parameters: A reference to which Chaos Parameters of the - Chaos Schedule to use. - :type chaos_parameters: str - :param days: Defines the days of the week that a Chaos Schedule Job will - run for. - :type days: ~azure.servicefabric.models.ChaosScheduleJobActiveDaysOfWeek - :param times: A list of Time Ranges that specify when during active days - that this job will run. The times are interpreted as UTC. - :type times: list[~azure.servicefabric.models.TimeRange] - """ - - _attribute_map = { - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'str'}, - 'days': {'key': 'Days', 'type': 'ChaosScheduleJobActiveDaysOfWeek'}, - 'times': {'key': 'Times', 'type': '[TimeRange]'}, - } - - def __init__(self, **kwargs): - super(ChaosScheduleJob, self).__init__(**kwargs) - self.chaos_parameters = kwargs.get('chaos_parameters', None) - self.days = kwargs.get('days', None) - self.times = kwargs.get('times', None) - - -class ChaosScheduleJobActiveDaysOfWeek(Model): - """Defines the days of the week that a Chaos Schedule Job will run for. - - :param sunday: Indicates if the Chaos Schedule Job will run on Sunday. - Default value: False . - :type sunday: bool - :param monday: Indicates if the Chaos Schedule Job will run on Monday. - Default value: False . - :type monday: bool - :param tuesday: Indicates if the Chaos Schedule Job will run on Tuesday. - Default value: False . - :type tuesday: bool - :param wednesday: Indicates if the Chaos Schedule Job will run on - Wednesday. Default value: False . - :type wednesday: bool - :param thursday: Indicates if the Chaos Schedule Job will run on Thursday. - Default value: False . - :type thursday: bool - :param friday: Indicates if the Chaos Schedule Job will run on Friday. - Default value: False . - :type friday: bool - :param saturday: Indicates if the Chaos Schedule Job will run on Saturday. - Default value: False . - :type saturday: bool - """ - - _attribute_map = { - 'sunday': {'key': 'Sunday', 'type': 'bool'}, - 'monday': {'key': 'Monday', 'type': 'bool'}, - 'tuesday': {'key': 'Tuesday', 'type': 'bool'}, - 'wednesday': {'key': 'Wednesday', 'type': 'bool'}, - 'thursday': {'key': 'Thursday', 'type': 'bool'}, - 'friday': {'key': 'Friday', 'type': 'bool'}, - 'saturday': {'key': 'Saturday', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ChaosScheduleJobActiveDaysOfWeek, self).__init__(**kwargs) - self.sunday = kwargs.get('sunday', False) - self.monday = kwargs.get('monday', False) - self.tuesday = kwargs.get('tuesday', False) - self.wednesday = kwargs.get('wednesday', False) - self.thursday = kwargs.get('thursday', False) - self.friday = kwargs.get('friday', False) - self.saturday = kwargs.get('saturday', False) - - -class ClusterEvent(FabricEvent): - """Represents the base for all Cluster Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ClusterNewHealthReportEvent, - ClusterHealthReportExpiredEvent, ClusterUpgradeCompletedEvent, - ClusterUpgradeDomainCompletedEvent, ClusterUpgradeRollbackCompletedEvent, - ClusterUpgradeRollbackStartedEvent, ClusterUpgradeStartedEvent, - ChaosStoppedEvent, ChaosStartedEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ClusterNewHealthReport': 'ClusterNewHealthReportEvent', 'ClusterHealthReportExpired': 'ClusterHealthReportExpiredEvent', 'ClusterUpgradeCompleted': 'ClusterUpgradeCompletedEvent', 'ClusterUpgradeDomainCompleted': 'ClusterUpgradeDomainCompletedEvent', 'ClusterUpgradeRollbackCompleted': 'ClusterUpgradeRollbackCompletedEvent', 'ClusterUpgradeRollbackStarted': 'ClusterUpgradeRollbackStartedEvent', 'ClusterUpgradeStarted': 'ClusterUpgradeStartedEvent', 'ChaosStopped': 'ChaosStoppedEvent', 'ChaosStarted': 'ChaosStartedEvent'} - } - - def __init__(self, **kwargs): - super(ClusterEvent, self).__init__(**kwargs) - self.kind = 'ClusterEvent' - - -class ChaosStartedEvent(ClusterEvent): - """Chaos Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param max_concurrent_faults: Required. Maximum number of concurrent - faults. - :type max_concurrent_faults: long - :param time_to_run_in_seconds: Required. Time to run in seconds. - :type time_to_run_in_seconds: float - :param max_cluster_stabilization_timeout_in_seconds: Required. Maximum - timeout for cluster stabilization in seconds. - :type max_cluster_stabilization_timeout_in_seconds: float - :param wait_time_between_iterations_in_seconds: Required. Wait time - between iterations in seconds. - :type wait_time_between_iterations_in_seconds: float - :param wait_time_between_faults_in_seconds: Required. Wait time between - faults in seconds. - :type wait_time_between_faults_in_seconds: float - :param move_replica_fault_enabled: Required. Indicates MoveReplica fault - is enabled. - :type move_replica_fault_enabled: bool - :param included_node_type_list: Required. List of included Node types. - :type included_node_type_list: str - :param included_application_list: Required. List of included Applications. - :type included_application_list: str - :param cluster_health_policy: Required. Health policy. - :type cluster_health_policy: str - :param chaos_context: Required. Chaos Context. - :type chaos_context: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'max_concurrent_faults': {'required': True}, - 'time_to_run_in_seconds': {'required': True}, - 'max_cluster_stabilization_timeout_in_seconds': {'required': True}, - 'wait_time_between_iterations_in_seconds': {'required': True}, - 'wait_time_between_faults_in_seconds': {'required': True}, - 'move_replica_fault_enabled': {'required': True}, - 'included_node_type_list': {'required': True}, - 'included_application_list': {'required': True}, - 'cluster_health_policy': {'required': True}, - 'chaos_context': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, - 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'float'}, - 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'float'}, - 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'float'}, - 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'float'}, - 'move_replica_fault_enabled': {'key': 'MoveReplicaFaultEnabled', 'type': 'bool'}, - 'included_node_type_list': {'key': 'IncludedNodeTypeList', 'type': 'str'}, - 'included_application_list': {'key': 'IncludedApplicationList', 'type': 'str'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'str'}, - 'chaos_context': {'key': 'ChaosContext', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ChaosStartedEvent, self).__init__(**kwargs) - self.max_concurrent_faults = kwargs.get('max_concurrent_faults', None) - self.time_to_run_in_seconds = kwargs.get('time_to_run_in_seconds', None) - self.max_cluster_stabilization_timeout_in_seconds = kwargs.get('max_cluster_stabilization_timeout_in_seconds', None) - self.wait_time_between_iterations_in_seconds = kwargs.get('wait_time_between_iterations_in_seconds', None) - self.wait_time_between_faults_in_seconds = kwargs.get('wait_time_between_faults_in_seconds', None) - self.move_replica_fault_enabled = kwargs.get('move_replica_fault_enabled', None) - self.included_node_type_list = kwargs.get('included_node_type_list', None) - self.included_application_list = kwargs.get('included_application_list', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.chaos_context = kwargs.get('chaos_context', None) - self.kind = 'ChaosStarted' - - -class ChaosStoppedEvent(ClusterEvent): - """Chaos Stopped event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Required. Describes reason. - :type reason: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'reason': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ChaosStoppedEvent, self).__init__(**kwargs) - self.reason = kwargs.get('reason', None) - self.kind = 'ChaosStopped' - - -class ChaosTargetFilter(Model): - """Defines all filters for targeted Chaos faults, for example, faulting only - certain node types or faulting only certain applications. - If ChaosTargetFilter is not used, Chaos faults all cluster entities. If - ChaosTargetFilter is used, Chaos faults only the entities that meet the - ChaosTargetFilter - specification. NodeTypeInclusionList and ApplicationInclusionList allow a - union semantics only. It is not possible to specify an intersection - of NodeTypeInclusionList and ApplicationInclusionList. For example, it is - not possible to specify "fault this application only when it is on that - node type." - Once an entity is included in either NodeTypeInclusionList or - ApplicationInclusionList, that entity cannot be excluded using - ChaosTargetFilter. Even if - applicationX does not appear in ApplicationInclusionList, in some Chaos - iteration applicationX can be faulted because it happens to be on a node of - nodeTypeY that is included - in NodeTypeInclusionList. If both NodeTypeInclusionList and - ApplicationInclusionList are null or empty, an ArgumentException is thrown. - - :param node_type_inclusion_list: A list of node types to include in Chaos - faults. - All types of faults (restart node, restart code package, remove replica, - restart replica, move primary, and move secondary) are enabled for the - nodes of these node types. - If a node type (say NodeTypeX) does not appear in the - NodeTypeInclusionList, then node level faults (like NodeRestart) will - never be enabled for the nodes of - NodeTypeX, but code package and replica faults can still be enabled for - NodeTypeX if an application in the ApplicationInclusionList. - happens to reside on a node of NodeTypeX. - At most 100 node type names can be included in this list, to increase this - number, a config upgrade is required for - MaxNumberOfNodeTypesInChaosEntityFilter configuration. - :type node_type_inclusion_list: list[str] - :param application_inclusion_list: A list of application URIs to include - in Chaos faults. - All replicas belonging to services of these applications are amenable to - replica faults (restart replica, remove replica, move primary, and move - secondary) by Chaos. - Chaos may restart a code package only if the code package hosts replicas - of these applications only. - If an application does not appear in this list, it can still be faulted in - some Chaos iteration if the application ends up on a node of a node type - that is included in NodeTypeInclusionList. - However, if applicationX is tied to nodeTypeY through placement - constraints and applicationX is absent from ApplicationInclusionList and - nodeTypeY is absent from NodeTypeInclusionList, then applicationX will - never be faulted. - At most 1000 application names can be included in this list, to increase - this number, a config upgrade is required for - MaxNumberOfApplicationsInChaosEntityFilter configuration. - :type application_inclusion_list: list[str] - """ - - _attribute_map = { - 'node_type_inclusion_list': {'key': 'NodeTypeInclusionList', 'type': '[str]'}, - 'application_inclusion_list': {'key': 'ApplicationInclusionList', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ChaosTargetFilter, self).__init__(**kwargs) - self.node_type_inclusion_list = kwargs.get('node_type_inclusion_list', None) - self.application_inclusion_list = kwargs.get('application_inclusion_list', None) - - -class PropertyBatchOperation(Model): - """Represents the base type for property operations that can be put into a - batch and submitted. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CheckExistsPropertyBatchOperation, - CheckSequencePropertyBatchOperation, CheckValuePropertyBatchOperation, - DeletePropertyBatchOperation, GetPropertyBatchOperation, - PutPropertyBatchOperation - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'CheckExists': 'CheckExistsPropertyBatchOperation', 'CheckSequence': 'CheckSequencePropertyBatchOperation', 'CheckValue': 'CheckValuePropertyBatchOperation', 'Delete': 'DeletePropertyBatchOperation', 'Get': 'GetPropertyBatchOperation', 'Put': 'PutPropertyBatchOperation'} - } - - def __init__(self, **kwargs): - super(PropertyBatchOperation, self).__init__(**kwargs) - self.property_name = kwargs.get('property_name', None) - self.kind = None - - -class CheckExistsPropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that compares the Boolean existence of - a property with the Exists argument. - The PropertyBatchOperation operation fails if the property's existence is - not equal to the Exists argument. - The CheckExistsPropertyBatchOperation is generally used as a precondition - for the write operations in the batch. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param exists: Required. Whether or not the property should exist for the - operation to pass. - :type exists: bool - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'exists': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'exists': {'key': 'Exists', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(CheckExistsPropertyBatchOperation, self).__init__(**kwargs) - self.exists = kwargs.get('exists', None) - self.kind = 'CheckExists' - - -class CheckSequencePropertyBatchOperation(PropertyBatchOperation): - """Compares the Sequence Number of a property with the SequenceNumber - argument. - A property's sequence number can be thought of as that property's version. - Every time the property is modified, its sequence number is increased. - The sequence number can be found in a property's metadata. - The comparison fails if the sequence numbers are not equal. - CheckSequencePropertyBatchOperation is generally used as a precondition for - the write operations in the batch. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param sequence_number: Required. The expected sequence number. - :type sequence_number: str - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'sequence_number': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CheckSequencePropertyBatchOperation, self).__init__(**kwargs) - self.sequence_number = kwargs.get('sequence_number', None) - self.kind = 'CheckSequence' - - -class CheckValuePropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that compares the value of the property - with the expected value. - The CheckValuePropertyBatchOperation is generally used as a precondition - for the write operations in the batch. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param value: Required. The expected property value. - :type value: ~azure.servicefabric.models.PropertyValue - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - } - - def __init__(self, **kwargs): - super(CheckValuePropertyBatchOperation, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.kind = 'CheckValue' - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class ClusterConfiguration(Model): - """Information about the standalone cluster configuration. - - :param cluster_configuration: The contents of the cluster configuration - file. - :type cluster_configuration: str - """ - - _attribute_map = { - 'cluster_configuration': {'key': 'ClusterConfiguration', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ClusterConfiguration, self).__init__(**kwargs) - self.cluster_configuration = kwargs.get('cluster_configuration', None) - - -class ClusterConfigurationUpgradeDescription(Model): - """Describes the parameters for a standalone cluster configuration upgrade. - - All required parameters must be populated in order to send to Azure. - - :param cluster_config: Required. The cluster configuration as a JSON - string. For example, [this - file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) - contains JSON describing the [nodes and other properties of the - cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). - :type cluster_config: str - :param health_check_retry_timeout: The length of time between attempts to - perform health checks if the application or cluster is not healthy. - Default value: "PT0H0M0S" . - :type health_check_retry_timeout: timedelta - :param health_check_wait_duration_in_seconds: The length of time to wait - after completing an upgrade domain before starting the health checks - process. Default value: "PT0H0M0S" . - :type health_check_wait_duration_in_seconds: timedelta - :param health_check_stable_duration_in_seconds: The length of time that - the application or cluster must remain healthy before the upgrade proceeds - to the next upgrade domain. Default value: "PT0H0M0S" . - :type health_check_stable_duration_in_seconds: timedelta - :param upgrade_domain_timeout_in_seconds: The timeout for the upgrade - domain. Default value: "PT0H0M0S" . - :type upgrade_domain_timeout_in_seconds: timedelta - :param upgrade_timeout_in_seconds: The upgrade timeout. Default value: - "PT0H0M0S" . - :type upgrade_timeout_in_seconds: timedelta - :param max_percent_unhealthy_applications: The maximum allowed percentage - of unhealthy applications during the upgrade. Allowed values are integer - values from zero to 100. Default value: 0 . - :type max_percent_unhealthy_applications: int - :param max_percent_unhealthy_nodes: The maximum allowed percentage of - unhealthy nodes during the upgrade. Allowed values are integer values from - zero to 100. Default value: 0 . - :type max_percent_unhealthy_nodes: int - :param max_percent_delta_unhealthy_nodes: The maximum allowed percentage - of delta health degradation during the upgrade. Allowed values are integer - values from zero to 100. Default value: 0 . - :type max_percent_delta_unhealthy_nodes: int - :param max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum - allowed percentage of upgrade domain delta health degradation during the - upgrade. Allowed values are integer values from zero to 100. Default - value: 0 . - :type max_percent_upgrade_domain_delta_unhealthy_nodes: int - :param application_health_policies: Defines the application health policy - map used to evaluate the health of an application or one of its children - entities. - :type application_health_policies: - ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _validation = { - 'cluster_config': {'required': True}, - } - - _attribute_map = { - 'cluster_config': {'key': 'ClusterConfig', 'type': 'str'}, - 'health_check_retry_timeout': {'key': 'HealthCheckRetryTimeout', 'type': 'duration'}, - 'health_check_wait_duration_in_seconds': {'key': 'HealthCheckWaitDurationInSeconds', 'type': 'duration'}, - 'health_check_stable_duration_in_seconds': {'key': 'HealthCheckStableDurationInSeconds', 'type': 'duration'}, - 'upgrade_domain_timeout_in_seconds': {'key': 'UpgradeDomainTimeoutInSeconds', 'type': 'duration'}, - 'upgrade_timeout_in_seconds': {'key': 'UpgradeTimeoutInSeconds', 'type': 'duration'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, - 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__(self, **kwargs): - super(ClusterConfigurationUpgradeDescription, self).__init__(**kwargs) - self.cluster_config = kwargs.get('cluster_config', None) - self.health_check_retry_timeout = kwargs.get('health_check_retry_timeout', "PT0H0M0S") - self.health_check_wait_duration_in_seconds = kwargs.get('health_check_wait_duration_in_seconds', "PT0H0M0S") - self.health_check_stable_duration_in_seconds = kwargs.get('health_check_stable_duration_in_seconds', "PT0H0M0S") - self.upgrade_domain_timeout_in_seconds = kwargs.get('upgrade_domain_timeout_in_seconds', "PT0H0M0S") - self.upgrade_timeout_in_seconds = kwargs.get('upgrade_timeout_in_seconds', "PT0H0M0S") - self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', 0) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', 0) - self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', 0) - self.max_percent_upgrade_domain_delta_unhealthy_nodes = kwargs.get('max_percent_upgrade_domain_delta_unhealthy_nodes', 0) - self.application_health_policies = kwargs.get('application_health_policies', None) - - -class ClusterConfigurationUpgradeStatusInfo(Model): - """Information about a standalone cluster configuration upgrade status. - - :param upgrade_state: The state of the upgrade domain. Possible values - include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', - 'RollingForwardPending', 'RollingForwardInProgress', - 'RollingForwardCompleted', 'Failed' - :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :param progress_status: The cluster manifest version. - :type progress_status: int - :param config_version: The cluster configuration version. - :type config_version: str - :param details: The cluster upgrade status details. - :type details: str - """ - - _attribute_map = { - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'progress_status': {'key': 'ProgressStatus', 'type': 'int'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'details': {'key': 'Details', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ClusterConfigurationUpgradeStatusInfo, self).__init__(**kwargs) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.progress_status = kwargs.get('progress_status', None) - self.config_version = kwargs.get('config_version', None) - self.details = kwargs.get('details', None) - - -class ClusterHealth(EntityHealth): - """Represents the health of the cluster. - Contains the cluster aggregated health state, the cluster application and - node health states as well as the health events and the unhealthy - evaluations. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param node_health_states: Cluster node health states as found in the - health store. - :type node_health_states: - list[~azure.servicefabric.models.NodeHealthState] - :param application_health_states: Cluster application health states as - found in the health store. - :type application_health_states: - list[~azure.servicefabric.models.ApplicationHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'node_health_states': {'key': 'NodeHealthStates', 'type': '[NodeHealthState]'}, - 'application_health_states': {'key': 'ApplicationHealthStates', 'type': '[ApplicationHealthState]'}, - } - - def __init__(self, **kwargs): - super(ClusterHealth, self).__init__(**kwargs) - self.node_health_states = kwargs.get('node_health_states', None) - self.application_health_states = kwargs.get('application_health_states', None) - - -class ClusterHealthChunk(Model): - """Represents the health chunk of the cluster. - Contains the cluster aggregated health state, and the cluster entities that - respect the input filter. - - :param health_state: The HealthState representing the aggregated health - state of the cluster computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired cluster health policy and - the application health policies. Possible values include: 'Invalid', 'Ok', - 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_health_state_chunks: The list of node health state chunks in - the cluster that respect the filters in the cluster health chunk query - description. - :type node_health_state_chunks: - ~azure.servicefabric.models.NodeHealthStateChunkList - :param application_health_state_chunks: The list of application health - state chunks in the cluster that respect the filters in the cluster health - chunk query description. - :type application_health_state_chunks: - ~azure.servicefabric.models.ApplicationHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_health_state_chunks': {'key': 'NodeHealthStateChunks', 'type': 'NodeHealthStateChunkList'}, - 'application_health_state_chunks': {'key': 'ApplicationHealthStateChunks', 'type': 'ApplicationHealthStateChunkList'}, - } - - def __init__(self, **kwargs): - super(ClusterHealthChunk, self).__init__(**kwargs) - self.health_state = kwargs.get('health_state', None) - self.node_health_state_chunks = kwargs.get('node_health_state_chunks', None) - self.application_health_state_chunks = kwargs.get('application_health_state_chunks', None) - - -class ClusterHealthChunkQueryDescription(Model): - """The cluster health chunk query description, which can specify the health - policies to evaluate cluster health and very expressive filters to select - which cluster entities to include in response. - - :param node_filters: Defines a list of filters that specify which nodes to - be included in the returned cluster health chunk. - If no filters are specified, no nodes are returned. All the nodes are used - to evaluate the cluster's aggregated health state, regardless of the input - filters. - The cluster health chunk query may specify multiple node filters. - For example, it can specify a filter to return all nodes with health state - Error and another filter to always include a node identified by its - NodeName. - :type node_filters: - list[~azure.servicefabric.models.NodeHealthStateFilter] - :param application_filters: Defines a list of filters that specify which - applications to be included in the returned cluster health chunk. - If no filters are specified, no applications are returned. All the - applications are used to evaluate the cluster's aggregated health state, - regardless of the input filters. - The cluster health chunk query may specify multiple application filters. - For example, it can specify a filter to return all applications with - health state Error and another filter to always include applications of a - specified application type. - :type application_filters: - list[~azure.servicefabric.models.ApplicationHealthStateFilter] - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param application_health_policies: Defines the application health policy - map used to evaluate the health of an application or one of its children - entities. - :type application_health_policies: - ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _attribute_map = { - 'node_filters': {'key': 'NodeFilters', 'type': '[NodeHealthStateFilter]'}, - 'application_filters': {'key': 'ApplicationFilters', 'type': '[ApplicationHealthStateFilter]'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__(self, **kwargs): - super(ClusterHealthChunkQueryDescription, self).__init__(**kwargs) - self.node_filters = kwargs.get('node_filters', None) - self.application_filters = kwargs.get('application_filters', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.application_health_policies = kwargs.get('application_health_policies', None) - - -class ClusterHealthPolicies(Model): - """Health policies to evaluate cluster health. - - :param application_health_policy_map: Defines a map that contains specific - application health policies for different applications. - Each entry specifies as key the application name and as value an - ApplicationHealthPolicy used to evaluate the application health. - If an application is not specified in the map, the application health - evaluation uses the ApplicationHealthPolicy found in its application - manifest or the default application health policy (if no health policy is - defined in the manifest). - The map is empty by default. - :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - } - - def __init__(self, **kwargs): - super(ClusterHealthPolicies, self).__init__(**kwargs) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - - -class ClusterHealthPolicy(Model): - """Defines a health policy used to evaluate the health of the cluster or of a - cluster node. - - :param consider_warning_as_error: Indicates whether warnings are treated - with the same severity as errors. Default value: False . - :type consider_warning_as_error: bool - :param max_percent_unhealthy_nodes: The maximum allowed percentage of - unhealthy nodes before reporting an error. For example, to allow 10% of - nodes to be unhealthy, this value would be 10. - The percentage represents the maximum tolerated percentage of nodes that - can be unhealthy before the cluster is considered in error. - If the percentage is respected but there is at least one unhealthy node, - the health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy nodes - over the total number of nodes in the cluster. - The computation rounds up to tolerate one failure on small numbers of - nodes. Default percentage is zero. - In large clusters, some nodes will always be down or out for repairs, so - this percentage should be configured to tolerate that. Default value: 0 . - :type max_percent_unhealthy_nodes: int - :param max_percent_unhealthy_applications: The maximum allowed percentage - of unhealthy applications before reporting an error. For example, to allow - 10% of applications to be unhealthy, this value would be 10. - The percentage represents the maximum tolerated percentage of applications - that can be unhealthy before the cluster is considered in error. - If the percentage is respected but there is at least one unhealthy - application, the health is evaluated as Warning. - This is calculated by dividing the number of unhealthy applications over - the total number of application instances in the cluster, excluding - applications of application types that are included in the - ApplicationTypeHealthPolicyMap. - The computation rounds up to tolerate one failure on small numbers of - applications. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_applications: int - :param application_type_health_policy_map: Defines a map with max - percentage unhealthy applications for specific application types. - Each entry specifies as key the application type name and as value an - integer that represents the MaxPercentUnhealthyApplications percentage - used to evaluate the applications of the specified application type. - The application type health policy map can be used during cluster health - evaluation to describe special application types. - The application types included in the map are evaluated against the - percentage specified in the map, and not with the global - MaxPercentUnhealthyApplications defined in the cluster health policy. - The applications of application types specified in the map are not counted - against the global pool of applications. - For example, if some applications of a type are critical, the cluster - administrator can add an entry to the map for that application type - and assign it a value of 0% (that is, do not tolerate any failures). - All other applications can be evaluated with - MaxPercentUnhealthyApplications set to 20% to tolerate some failures out - of the thousands of application instances. - The application type health policy map is used only if the cluster - manifest enables application type health evaluation using the - configuration entry for - HealthManager/EnableApplicationTypeHealthEvaluation. - :type application_type_health_policy_map: - list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] - :param node_type_health_policy_map: Defines a map with max percentage - unhealthy nodes for specific node types. - Each entry specifies as key the node type name and as value an integer - that represents the MaxPercentUnhealthyNodes percentage used to evaluate - the nodes of the specified node type. - The node type health policy map can be used during cluster health - evaluation to describe special node types. - They are evaluated against the percentages associated with their node type - name in the map. - Setting this has no impact on the global pool of nodes used for - MaxPercentUnhealthyNodes. - The node type health policy map is used only if the cluster manifest - enables node type health evaluation using the configuration entry for - HealthManager/EnableNodeTypeHealthEvaluation. - For example, given a cluster with many nodes of different types, with - important work hosted on node type "SpecialNodeType" that should not - tolerate any nodes down. - You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some - failures for all nodes, but for the node type "SpecialNodeType", set the - MaxPercentUnhealthyNodes to 0 by - setting the value in the key value pair in NodeTypeHealthPolicyMapItem. - The key is the node type name. - This way, as long as no nodes of type "SpecialNodeType" are in Error - state, - even if some of the many nodes in the global pool are in Error state, but - below the global unhealthy percentage, the cluster would be evaluated to - Warning. - A Warning health state does not impact cluster upgrade or other monitoring - triggered by Error health state. - But even one node of type SpecialNodeType in Error would make cluster - unhealthy (in Error rather than Warning/Ok), which triggers rollback or - pauses the cluster upgrade, depending on the upgrade configuration. - Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting - SpecialNodeType's max percent unhealthy nodes to 100, - with one node of type SpecialNodeType in Error state would still put the - cluster in an Error state, since the global restriction is more strict in - this case. - :type node_type_health_policy_map: - list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] - """ - - _attribute_map = { - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'application_type_health_policy_map': {'key': 'ApplicationTypeHealthPolicyMap', 'type': '[ApplicationTypeHealthPolicyMapItem]'}, - 'node_type_health_policy_map': {'key': 'NodeTypeHealthPolicyMap', 'type': '[NodeTypeHealthPolicyMapItem]'}, - } - - def __init__(self, **kwargs): - super(ClusterHealthPolicy, self).__init__(**kwargs) - self.consider_warning_as_error = kwargs.get('consider_warning_as_error', False) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', 0) - self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', 0) - self.application_type_health_policy_map = kwargs.get('application_type_health_policy_map', None) - self.node_type_health_policy_map = kwargs.get('node_type_health_policy_map', None) - - -class ClusterHealthReportExpiredEvent(ClusterEvent): - """Cluster Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ClusterHealthReportExpiredEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ClusterHealthReportExpired' - - -class ClusterLoadInfo(Model): - """Information about load in a Service Fabric cluster. It holds a summary of - all metrics and their load in a cluster. - - :param last_balancing_start_time_utc: The starting time of last resource - balancing run. - :type last_balancing_start_time_utc: datetime - :param last_balancing_end_time_utc: The end time of last resource - balancing run. - :type last_balancing_end_time_utc: datetime - :param load_metric_information: List that contains metrics and their load - information in this cluster. - :type load_metric_information: - list[~azure.servicefabric.models.LoadMetricInformation] - """ - - _attribute_map = { - 'last_balancing_start_time_utc': {'key': 'LastBalancingStartTimeUtc', 'type': 'iso-8601'}, - 'last_balancing_end_time_utc': {'key': 'LastBalancingEndTimeUtc', 'type': 'iso-8601'}, - 'load_metric_information': {'key': 'LoadMetricInformation', 'type': '[LoadMetricInformation]'}, - } - - def __init__(self, **kwargs): - super(ClusterLoadInfo, self).__init__(**kwargs) - self.last_balancing_start_time_utc = kwargs.get('last_balancing_start_time_utc', None) - self.last_balancing_end_time_utc = kwargs.get('last_balancing_end_time_utc', None) - self.load_metric_information = kwargs.get('load_metric_information', None) - - -class ClusterManifest(Model): - """Information about the cluster manifest. - - :param manifest: The contents of the cluster manifest file. - :type manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ClusterManifest, self).__init__(**kwargs) - self.manifest = kwargs.get('manifest', None) - - -class ClusterNewHealthReportEvent(ClusterEvent): - """Cluster Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ClusterNewHealthReportEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ClusterNewHealthReport' - - -class ClusterUpgradeCompletedEvent(ClusterEvent): - """Cluster Upgrade Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of - upgrade in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ClusterUpgradeCompletedEvent, self).__init__(**kwargs) - self.target_cluster_version = kwargs.get('target_cluster_version', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ClusterUpgradeCompleted' - - -class ClusterUpgradeDescriptionObject(Model): - """Represents a ServiceFabric cluster upgrade. - - :param config_version: The cluster configuration version (specified in the - cluster manifest). - :type config_version: str - :param code_version: The ServiceFabric code version of the cluster. - :type code_version: str - :param upgrade_kind: The kind of upgrade out of the following possible - values. Possible values include: 'Invalid', 'Rolling'. Default value: - "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param sort_order: Defines the order in which an upgrade proceeds through - the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', - 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default - value: "Default" . - :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :param enable_delta_health_evaluation: When true, enables delta health - evaluation rather than absolute health evaluation after completion of each - upgrade domain. - :type enable_delta_health_evaluation: bool - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param cluster_upgrade_health_policy: Defines a health policy used to - evaluate the health of the cluster during a cluster upgrade. - :type cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :param application_health_policy_map: Represents the map of application - health policies for a ServiceFabric cluster upgrade - :type application_health_policy_map: - ~azure.servicefabric.models.ApplicationHealthPolicyMapObject - """ - - _attribute_map = { - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicyMapObject'}, - } - - def __init__(self, **kwargs): - super(ClusterUpgradeDescriptionObject, self).__init__(**kwargs) - self.config_version = kwargs.get('config_version', None) - self.code_version = kwargs.get('code_version', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) - self.force_restart = kwargs.get('force_restart', None) - self.sort_order = kwargs.get('sort_order', "Default") - self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) - - -class ClusterUpgradeDomainCompletedEvent(ClusterEvent): - """Cluster Upgrade Domain Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param upgrade_state: Required. State of upgrade. - :type upgrade_state: str - :param upgrade_domains: Required. Upgrade domains. - :type upgrade_domains: str - :param upgrade_domain_elapsed_time_in_ms: Required. Duration of domain - upgrade in milli-seconds. - :type upgrade_domain_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'upgrade_state': {'required': True}, - 'upgrade_domains': {'required': True}, - 'upgrade_domain_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, - 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ClusterUpgradeDomainCompletedEvent, self).__init__(**kwargs) - self.target_cluster_version = kwargs.get('target_cluster_version', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.upgrade_domains = kwargs.get('upgrade_domains', None) - self.upgrade_domain_elapsed_time_in_ms = kwargs.get('upgrade_domain_elapsed_time_in_ms', None) - self.kind = 'ClusterUpgradeDomainCompleted' - - -class ClusterUpgradeHealthPolicyObject(Model): - """Defines a health policy used to evaluate the health of the cluster during a - cluster upgrade. - - :param max_percent_delta_unhealthy_nodes: The maximum allowed percentage - of nodes health degradation allowed during cluster upgrades. The delta is - measured between the state of the nodes at the beginning of upgrade and - the state of the nodes at the time of the health evaluation. The check is - performed after every upgrade domain upgrade completion to make sure the - global state of the cluster is within tolerated limits. The default value - is 10%. - :type max_percent_delta_unhealthy_nodes: int - :param max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum - allowed percentage of upgrade domain nodes health degradation allowed - during cluster upgrades. The delta is measured between the state of the - upgrade domain nodes at the beginning of upgrade and the state of the - upgrade domain nodes at the time of the health evaluation. The check is - performed after every upgrade domain upgrade completion for all completed - upgrade domains to make sure the state of the upgrade domains is within - tolerated limits. The default value is 15%. - :type max_percent_upgrade_domain_delta_unhealthy_nodes: int - """ - - _validation = { - 'max_percent_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ClusterUpgradeHealthPolicyObject, self).__init__(**kwargs) - self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) - self.max_percent_upgrade_domain_delta_unhealthy_nodes = kwargs.get('max_percent_upgrade_domain_delta_unhealthy_nodes', None) - - -class ClusterUpgradeProgressObject(Model): - """Information about a cluster upgrade. - - :param code_version: The ServiceFabric code version of the cluster. - :type code_version: str - :param config_version: The cluster configuration version (specified in the - cluster manifest). - :type config_version: str - :param upgrade_domains: List of upgrade domains and their statuses. - :type upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] - :param upgrade_state: The state of the upgrade domain. Possible values - include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', - 'RollingForwardPending', 'RollingForwardInProgress', - 'RollingForwardCompleted', 'Failed' - :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :param next_upgrade_domain: The name of the next upgrade domain to be - processed. - :type next_upgrade_domain: str - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_description: Represents a ServiceFabric cluster upgrade - :type upgrade_description: - ~azure.servicefabric.models.ClusterUpgradeDescriptionObject - :param upgrade_duration_in_milliseconds: The estimated elapsed time spent - processing the current overall upgrade. - :type upgrade_duration_in_milliseconds: str - :param upgrade_domain_duration_in_milliseconds: The estimated elapsed time - spent processing the current upgrade domain. - :type upgrade_domain_duration_in_milliseconds: str - :param unhealthy_evaluations: List of health evaluations that resulted in - the current aggregated health state. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param current_upgrade_domain_progress: Information about the current - in-progress upgrade domain. - :type current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :param start_timestamp_utc: The start time of the upgrade in UTC. - :type start_timestamp_utc: str - :param failure_timestamp_utc: The failure time of the upgrade in UTC. - :type failure_timestamp_utc: str - :param failure_reason: The cause of an upgrade failure that resulted in - FailureAction being executed. Possible values include: 'None', - 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', - 'OverallUpgradeTimeout' - :type failure_reason: str or ~azure.servicefabric.models.FailureReason - :param upgrade_domain_progress_at_failure: The detailed upgrade progress - for nodes in the current upgrade domain at the point of failure. - :type upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailedUpgradeDomainProgressObject - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ClusterUpgradeDescriptionObject'}, - 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, - 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailedUpgradeDomainProgressObject'}, - } - - def __init__(self, **kwargs): - super(ClusterUpgradeProgressObject, self).__init__(**kwargs) - self.code_version = kwargs.get('code_version', None) - self.config_version = kwargs.get('config_version', None) - self.upgrade_domains = kwargs.get('upgrade_domains', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.next_upgrade_domain = kwargs.get('next_upgrade_domain', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_description = kwargs.get('upgrade_description', None) - self.upgrade_duration_in_milliseconds = kwargs.get('upgrade_duration_in_milliseconds', None) - self.upgrade_domain_duration_in_milliseconds = kwargs.get('upgrade_domain_duration_in_milliseconds', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) - self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) - self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) - - -class ClusterUpgradeRollbackCompletedEvent(ClusterEvent): - """Cluster Upgrade Rollback Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param failure_reason: Required. Describes failure. - :type failure_reason: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of - upgrade in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ClusterUpgradeRollbackCompletedEvent, self).__init__(**kwargs) - self.target_cluster_version = kwargs.get('target_cluster_version', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ClusterUpgradeRollbackCompleted' - - -class ClusterUpgradeRollbackStartedEvent(ClusterEvent): - """Cluster Upgrade Rollback Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param failure_reason: Required. Describes failure. - :type failure_reason: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of - upgrade in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ClusterUpgradeRollbackStartedEvent, self).__init__(**kwargs) - self.target_cluster_version = kwargs.get('target_cluster_version', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ClusterUpgradeRollbackStarted' - - -class ClusterUpgradeStartedEvent(ClusterEvent): - """Cluster Upgrade Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param current_cluster_version: Required. Current Cluster version. - :type current_cluster_version: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param upgrade_type: Required. Type of upgrade. - :type upgrade_type: str - :param rolling_upgrade_mode: Required. Mode of upgrade. - :type rolling_upgrade_mode: str - :param failure_action: Required. Action if failed. - :type failure_action: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'current_cluster_version': {'required': True}, - 'target_cluster_version': {'required': True}, - 'upgrade_type': {'required': True}, - 'rolling_upgrade_mode': {'required': True}, - 'failure_action': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'current_cluster_version': {'key': 'CurrentClusterVersion', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ClusterUpgradeStartedEvent, self).__init__(**kwargs) - self.current_cluster_version = kwargs.get('current_cluster_version', None) - self.target_cluster_version = kwargs.get('target_cluster_version', None) - self.upgrade_type = kwargs.get('upgrade_type', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', None) - self.failure_action = kwargs.get('failure_action', None) - self.kind = 'ClusterUpgradeStarted' - - -class ClusterVersion(Model): - """The cluster version. - - :param version: The Service Fabric cluster runtime version. - :type version: str - """ - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ClusterVersion, self).__init__(**kwargs) - self.version = kwargs.get('version', None) - - -class CodePackageEntryPoint(Model): - """Information about setup or main entry point of a code package deployed on a - Service Fabric node. - - :param entry_point_location: The location of entry point executable on the - node. - :type entry_point_location: str - :param process_id: The process ID of the entry point. - :type process_id: str - :param run_as_user_name: The user name under which entry point executable - is run on the node. - :type run_as_user_name: str - :param code_package_entry_point_statistics: Statistics about setup or main - entry point of a code package deployed on a Service Fabric node. - :type code_package_entry_point_statistics: - ~azure.servicefabric.models.CodePackageEntryPointStatistics - :param status: Specifies the status of the code package entry point - deployed on a Service Fabric node. Possible values include: 'Invalid', - 'Pending', 'Starting', 'Started', 'Stopping', 'Stopped' - :type status: str or ~azure.servicefabric.models.EntryPointStatus - :param next_activation_time: The time (in UTC) when the entry point - executable will be run next. - :type next_activation_time: datetime - :param instance_id: The instance ID for current running entry point. For a - code package setup entry point (if specified) runs first and after it - finishes main entry point is started. Each time entry point executable is - run, its instance id will change. - :type instance_id: str - """ - - _attribute_map = { - 'entry_point_location': {'key': 'EntryPointLocation', 'type': 'str'}, - 'process_id': {'key': 'ProcessId', 'type': 'str'}, - 'run_as_user_name': {'key': 'RunAsUserName', 'type': 'str'}, - 'code_package_entry_point_statistics': {'key': 'CodePackageEntryPointStatistics', 'type': 'CodePackageEntryPointStatistics'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'next_activation_time': {'key': 'NextActivationTime', 'type': 'iso-8601'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CodePackageEntryPoint, self).__init__(**kwargs) - self.entry_point_location = kwargs.get('entry_point_location', None) - self.process_id = kwargs.get('process_id', None) - self.run_as_user_name = kwargs.get('run_as_user_name', None) - self.code_package_entry_point_statistics = kwargs.get('code_package_entry_point_statistics', None) - self.status = kwargs.get('status', None) - self.next_activation_time = kwargs.get('next_activation_time', None) - self.instance_id = kwargs.get('instance_id', None) - - -class CodePackageEntryPointStatistics(Model): - """Statistics about setup or main entry point of a code package deployed on a - Service Fabric node. - - :param last_exit_code: The last exit code of the entry point. - :type last_exit_code: str - :param last_activation_time: The last time (in UTC) when Service Fabric - attempted to run the entry point. - :type last_activation_time: datetime - :param last_exit_time: The last time (in UTC) when the entry point - finished running. - :type last_exit_time: datetime - :param last_successful_activation_time: The last time (in UTC) when the - entry point ran successfully. - :type last_successful_activation_time: datetime - :param last_successful_exit_time: The last time (in UTC) when the entry - point finished running gracefully. - :type last_successful_exit_time: datetime - :param activation_count: Number of times the entry point has run. - :type activation_count: str - :param activation_failure_count: Number of times the entry point failed to - run. - :type activation_failure_count: str - :param continuous_activation_failure_count: Number of times the entry - point continuously failed to run. - :type continuous_activation_failure_count: str - :param exit_count: Number of times the entry point finished running. - :type exit_count: str - :param exit_failure_count: Number of times the entry point failed to exit - gracefully. - :type exit_failure_count: str - :param continuous_exit_failure_count: Number of times the entry point - continuously failed to exit gracefully. - :type continuous_exit_failure_count: str - """ - - _attribute_map = { - 'last_exit_code': {'key': 'LastExitCode', 'type': 'str'}, - 'last_activation_time': {'key': 'LastActivationTime', 'type': 'iso-8601'}, - 'last_exit_time': {'key': 'LastExitTime', 'type': 'iso-8601'}, - 'last_successful_activation_time': {'key': 'LastSuccessfulActivationTime', 'type': 'iso-8601'}, - 'last_successful_exit_time': {'key': 'LastSuccessfulExitTime', 'type': 'iso-8601'}, - 'activation_count': {'key': 'ActivationCount', 'type': 'str'}, - 'activation_failure_count': {'key': 'ActivationFailureCount', 'type': 'str'}, - 'continuous_activation_failure_count': {'key': 'ContinuousActivationFailureCount', 'type': 'str'}, - 'exit_count': {'key': 'ExitCount', 'type': 'str'}, - 'exit_failure_count': {'key': 'ExitFailureCount', 'type': 'str'}, - 'continuous_exit_failure_count': {'key': 'ContinuousExitFailureCount', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CodePackageEntryPointStatistics, self).__init__(**kwargs) - self.last_exit_code = kwargs.get('last_exit_code', None) - self.last_activation_time = kwargs.get('last_activation_time', None) - self.last_exit_time = kwargs.get('last_exit_time', None) - self.last_successful_activation_time = kwargs.get('last_successful_activation_time', None) - self.last_successful_exit_time = kwargs.get('last_successful_exit_time', None) - self.activation_count = kwargs.get('activation_count', None) - self.activation_failure_count = kwargs.get('activation_failure_count', None) - self.continuous_activation_failure_count = kwargs.get('continuous_activation_failure_count', None) - self.exit_count = kwargs.get('exit_count', None) - self.exit_failure_count = kwargs.get('exit_failure_count', None) - self.continuous_exit_failure_count = kwargs.get('continuous_exit_failure_count', None) - - -class ComposeDeploymentStatusInfo(Model): - """Information about a Service Fabric compose deployment. - - :param name: The name of the deployment. - :type name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param status: The status of the compose deployment. Possible values - include: 'Invalid', 'Provisioning', 'Creating', 'Ready', 'Unprovisioning', - 'Deleting', 'Failed', 'Upgrading' - :type status: str or ~azure.servicefabric.models.ComposeDeploymentStatus - :param status_details: The status details of compose deployment including - failure message. - :type status_details: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComposeDeploymentStatusInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.application_name = kwargs.get('application_name', None) - self.status = kwargs.get('status', None) - self.status_details = kwargs.get('status_details', None) - - -class ComposeDeploymentUpgradeDescription(Model): - """Describes the parameters for a compose deployment upgrade. - - All required parameters must be populated in order to send to Azure. - - :param deployment_name: Required. The name of the deployment. - :type deployment_name: str - :param compose_file_content: Required. The content of the compose file - that describes the deployment to create. - :type compose_file_content: str - :param registry_credential: Credential information to connect to container - registry. - :type registry_credential: ~azure.servicefabric.models.RegistryCredential - :param upgrade_kind: Required. The kind of upgrade out of the following - possible values. Possible values include: 'Invalid', 'Rolling'. Default - value: "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - """ - - _validation = { - 'deployment_name': {'required': True}, - 'compose_file_content': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, - 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - } - - def __init__(self, **kwargs): - super(ComposeDeploymentUpgradeDescription, self).__init__(**kwargs) - self.deployment_name = kwargs.get('deployment_name', None) - self.compose_file_content = kwargs.get('compose_file_content', None) - self.registry_credential = kwargs.get('registry_credential', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) - self.force_restart = kwargs.get('force_restart', None) - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.application_health_policy = kwargs.get('application_health_policy', None) - - -class ComposeDeploymentUpgradeProgressInfo(Model): - """Describes the parameters for a compose deployment upgrade. - - :param deployment_name: The name of the target deployment. - :type deployment_name: str - :param application_name: The name of the target application, including the - 'fabric:' URI scheme. - :type application_name: str - :param upgrade_state: The state of the compose deployment upgrade. - Possible values include: 'Invalid', 'ProvisioningTarget', - 'RollingForwardInProgress', 'RollingForwardPending', - 'UnprovisioningCurrent', 'RollingForwardCompleted', - 'RollingBackInProgress', 'UnprovisioningTarget', 'RollingBackCompleted', - 'Failed' - :type upgrade_state: str or - ~azure.servicefabric.models.ComposeDeploymentUpgradeState - :param upgrade_status_details: Additional detailed information about the - status of the pending upgrade. - :type upgrade_status_details: str - :param upgrade_kind: The kind of upgrade out of the following possible - values. Possible values include: 'Invalid', 'Rolling'. Default value: - "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param target_application_type_version: The target application type - version (found in the application manifest) for the application upgrade. - :type target_application_type_version: str - :param upgrade_duration: The estimated amount of time that the overall - upgrade elapsed. It is first interpreted as a string representing an ISO - 8601 duration. If that fails, then it is interpreted as a number - representing the total number of milliseconds. - :type upgrade_duration: str - :param current_upgrade_domain_duration: The estimated amount of time spent - processing current Upgrade Domain. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type current_upgrade_domain_duration: str - :param application_unhealthy_evaluations: List of health evaluations that - resulted in the current aggregated health state. - :type application_unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param current_upgrade_domain_progress: Information about the current - in-progress upgrade domain. - :type current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :param start_timestamp_utc: The estimated UTC datetime when the upgrade - started. - :type start_timestamp_utc: str - :param failure_timestamp_utc: The estimated UTC datetime when the upgrade - failed and FailureAction was executed. - :type failure_timestamp_utc: str - :param failure_reason: The cause of an upgrade failure that resulted in - FailureAction being executed. Possible values include: 'None', - 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', - 'OverallUpgradeTimeout' - :type failure_reason: str or ~azure.servicefabric.models.FailureReason - :param upgrade_domain_progress_at_failure: Information about the upgrade - domain progress at the time of upgrade failure. - :type upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo - :param application_upgrade_status_details: Additional details of - application upgrade including failure message. - :type application_upgrade_status_details: str - """ - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - 'current_upgrade_domain_duration': {'key': 'CurrentUpgradeDomainDuration', 'type': 'str'}, - 'application_unhealthy_evaluations': {'key': 'ApplicationUnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, - 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComposeDeploymentUpgradeProgressInfo, self).__init__(**kwargs) - self.deployment_name = kwargs.get('deployment_name', None) - self.application_name = kwargs.get('application_name', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.upgrade_status_details = kwargs.get('upgrade_status_details', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.force_restart = kwargs.get('force_restart', None) - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.application_health_policy = kwargs.get('application_health_policy', None) - self.target_application_type_version = kwargs.get('target_application_type_version', None) - self.upgrade_duration = kwargs.get('upgrade_duration', None) - self.current_upgrade_domain_duration = kwargs.get('current_upgrade_domain_duration', None) - self.application_unhealthy_evaluations = kwargs.get('application_unhealthy_evaluations', None) - self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) - self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) - self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) - self.application_upgrade_status_details = kwargs.get('application_upgrade_status_details', None) - - -class ConfigParameterOverride(Model): - """Information about a configuration parameter override. - - All required parameters must be populated in order to send to Azure. - - :param section_name: Required. Name of the section for the parameter - override. - :type section_name: str - :param parameter_name: Required. Name of the parameter that has been - overridden. - :type parameter_name: str - :param parameter_value: Required. Value of the overridden parameter. - :type parameter_value: str - :param timeout: The duration until config override is considered as valid. - :type timeout: timedelta - :param persist_across_upgrade: A value that indicates whether config - override will be removed on upgrade or will still be considered as valid. - :type persist_across_upgrade: bool - """ - - _validation = { - 'section_name': {'required': True}, - 'parameter_name': {'required': True}, - 'parameter_value': {'required': True}, - } - - _attribute_map = { - 'section_name': {'key': 'SectionName', 'type': 'str'}, - 'parameter_name': {'key': 'ParameterName', 'type': 'str'}, - 'parameter_value': {'key': 'ParameterValue', 'type': 'str'}, - 'timeout': {'key': 'Timeout', 'type': 'duration'}, - 'persist_across_upgrade': {'key': 'PersistAcrossUpgrade', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ConfigParameterOverride, self).__init__(**kwargs) - self.section_name = kwargs.get('section_name', None) - self.parameter_name = kwargs.get('parameter_name', None) - self.parameter_value = kwargs.get('parameter_value', None) - self.timeout = kwargs.get('timeout', None) - self.persist_across_upgrade = kwargs.get('persist_across_upgrade', None) - - -class ContainerApiRequestBody(Model): - """parameters for making container API call. - - All required parameters must be populated in order to send to Azure. - - :param http_verb: HTTP verb of container REST API, defaults to "GET" - :type http_verb: str - :param uri_path: Required. URI path of container REST API - :type uri_path: str - :param content_type: Content type of container REST API request, defaults - to "application/json" - :type content_type: str - :param body: HTTP request body of container REST API - :type body: str - """ - - _validation = { - 'uri_path': {'required': True}, - } - - _attribute_map = { - 'http_verb': {'key': 'HttpVerb', 'type': 'str'}, - 'uri_path': {'key': 'UriPath', 'type': 'str'}, - 'content_type': {'key': 'Content-Type', 'type': 'str'}, - 'body': {'key': 'Body', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerApiRequestBody, self).__init__(**kwargs) - self.http_verb = kwargs.get('http_verb', None) - self.uri_path = kwargs.get('uri_path', None) - self.content_type = kwargs.get('content_type', None) - self.body = kwargs.get('body', None) - - -class ContainerApiResponse(Model): - """Response body that wraps container API result. - - All required parameters must be populated in order to send to Azure. - - :param container_api_result: Required. Container API result. - :type container_api_result: ~azure.servicefabric.models.ContainerApiResult - """ - - _validation = { - 'container_api_result': {'required': True}, - } - - _attribute_map = { - 'container_api_result': {'key': 'ContainerApiResult', 'type': 'ContainerApiResult'}, - } - - def __init__(self, **kwargs): - super(ContainerApiResponse, self).__init__(**kwargs) - self.container_api_result = kwargs.get('container_api_result', None) - - -class ContainerApiResult(Model): - """Container API result. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. HTTP status code returned by the target container - API - :type status: int - :param content_type: HTTP content type - :type content_type: str - :param content_encoding: HTTP content encoding - :type content_encoding: str - :param body: container API result body - :type body: str - """ - - _validation = { - 'status': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'Status', 'type': 'int'}, - 'content_type': {'key': 'Content-Type', 'type': 'str'}, - 'content_encoding': {'key': 'Content-Encoding', 'type': 'str'}, - 'body': {'key': 'Body', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerApiResult, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.content_type = kwargs.get('content_type', None) - self.content_encoding = kwargs.get('content_encoding', None) - self.body = kwargs.get('body', None) - - -class ContainerCodePackageProperties(Model): - """Describes a container and its runtime properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the code package. - :type name: str - :param image: Required. The Container image to use. - :type image: str - :param image_registry_credential: Image registry credential. - :type image_registry_credential: - ~azure.servicefabric.models.ImageRegistryCredential - :param entry_point: Override for the default entry point in the container. - :type entry_point: str - :param commands: Command array to execute within the container in exec - form. - :type commands: list[str] - :param environment_variables: The environment variables to set in this - container - :type environment_variables: - list[~azure.servicefabric.models.EnvironmentVariable] - :param settings: The settings to set in this container. The setting file - path can be fetched from environment variable "Fabric_SettingPath". The - path for Windows container is "C:\\\\secrets". The path for Linux - container is "/var/secrets". - :type settings: list[~azure.servicefabric.models.Setting] - :param labels: The labels to set in this container. - :type labels: list[~azure.servicefabric.models.ContainerLabel] - :param endpoints: The endpoints exposed by this container. - :type endpoints: list[~azure.servicefabric.models.EndpointProperties] - :param resources: Required. The resources required by this container. - :type resources: ~azure.servicefabric.models.ResourceRequirements - :param volume_refs: Volumes to be attached to the container. The lifetime - of these volumes is independent of the application's lifetime. - :type volume_refs: list[~azure.servicefabric.models.VolumeReference] - :param volumes: Volumes to be attached to the container. The lifetime of - these volumes is scoped to the application's lifetime. - :type volumes: list[~azure.servicefabric.models.ApplicationScopedVolume] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :param reliable_collections_refs: A list of ReliableCollection resources - used by this particular code package. Please refer to - ReliableCollectionsRef for more details. - :type reliable_collections_refs: - list[~azure.servicefabric.models.ReliableCollectionsRef] - :ivar instance_view: Runtime information of a container instance. - :vartype instance_view: ~azure.servicefabric.models.ContainerInstanceView - :param liveness_probe: An array of liveness probes for a code package. It - determines when to restart a code package. - :type liveness_probe: list[~azure.servicefabric.models.Probe] - :param readiness_probe: An array of readiness probes for a code package. - It determines when to unpublish an endpoint. - :type readiness_probe: list[~azure.servicefabric.models.Probe] - """ - - _validation = { - 'name': {'required': True}, - 'image': {'required': True}, - 'resources': {'required': True}, - 'instance_view': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'image': {'key': 'image', 'type': 'str'}, - 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, - 'entry_point': {'key': 'entryPoint', 'type': 'str'}, - 'commands': {'key': 'commands', 'type': '[str]'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'}, - 'settings': {'key': 'settings', 'type': '[Setting]'}, - 'labels': {'key': 'labels', 'type': '[ContainerLabel]'}, - 'endpoints': {'key': 'endpoints', 'type': '[EndpointProperties]'}, - 'resources': {'key': 'resources', 'type': 'ResourceRequirements'}, - 'volume_refs': {'key': 'volumeRefs', 'type': '[VolumeReference]'}, - 'volumes': {'key': 'volumes', 'type': '[ApplicationScopedVolume]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - 'reliable_collections_refs': {'key': 'reliableCollectionsRefs', 'type': '[ReliableCollectionsRef]'}, - 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, - 'liveness_probe': {'key': 'livenessProbe', 'type': '[Probe]'}, - 'readiness_probe': {'key': 'readinessProbe', 'type': '[Probe]'}, - } - - def __init__(self, **kwargs): - super(ContainerCodePackageProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.image = kwargs.get('image', None) - self.image_registry_credential = kwargs.get('image_registry_credential', None) - self.entry_point = kwargs.get('entry_point', None) - self.commands = kwargs.get('commands', None) - self.environment_variables = kwargs.get('environment_variables', None) - self.settings = kwargs.get('settings', None) - self.labels = kwargs.get('labels', None) - self.endpoints = kwargs.get('endpoints', None) - self.resources = kwargs.get('resources', None) - self.volume_refs = kwargs.get('volume_refs', None) - self.volumes = kwargs.get('volumes', None) - self.diagnostics = kwargs.get('diagnostics', None) - self.reliable_collections_refs = kwargs.get('reliable_collections_refs', None) - self.instance_view = None - self.liveness_probe = kwargs.get('liveness_probe', None) - self.readiness_probe = kwargs.get('readiness_probe', None) - - -class ContainerEvent(Model): - """A container event. - - :param name: The name of the container event. - :type name: str - :param count: The count of the event. - :type count: int - :param first_timestamp: Date/time of the first event. - :type first_timestamp: str - :param last_timestamp: Date/time of the last event. - :type last_timestamp: str - :param message: The event message - :type message: str - :param type: The event type. - :type type: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, - 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerEvent, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', None) - self.first_timestamp = kwargs.get('first_timestamp', None) - self.last_timestamp = kwargs.get('last_timestamp', None) - self.message = kwargs.get('message', None) - self.type = kwargs.get('type', None) - - -class ContainerInstanceEvent(FabricEvent): - """Represents the base for all Container Events. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerInstanceEvent, self).__init__(**kwargs) - self.kind = 'ContainerInstanceEvent' - - -class ContainerInstanceView(Model): - """Runtime information of a container instance. - - :param restart_count: The number of times the container has been - restarted. - :type restart_count: int - :param current_state: Current container instance state. - :type current_state: ~azure.servicefabric.models.ContainerState - :param previous_state: Previous container instance state. - :type previous_state: ~azure.servicefabric.models.ContainerState - :param events: The events of this container instance. - :type events: list[~azure.servicefabric.models.ContainerEvent] - """ - - _attribute_map = { - 'restart_count': {'key': 'restartCount', 'type': 'int'}, - 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, - 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, - 'events': {'key': 'events', 'type': '[ContainerEvent]'}, - } - - def __init__(self, **kwargs): - super(ContainerInstanceView, self).__init__(**kwargs) - self.restart_count = kwargs.get('restart_count', None) - self.current_state = kwargs.get('current_state', None) - self.previous_state = kwargs.get('previous_state', None) - self.events = kwargs.get('events', None) - - -class ContainerLabel(Model): - """Describes a container label. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the container label. - :type name: str - :param value: Required. The value of the container label. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerLabel, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - - -class ContainerLogs(Model): - """Container logs. - - :param content: Container logs. - :type content: str - """ - - _attribute_map = { - 'content': {'key': 'Content', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerLogs, self).__init__(**kwargs) - self.content = kwargs.get('content', None) - - -class ContainerState(Model): - """The container state. - - :param state: The state of this container - :type state: str - :param start_time: Date/time when the container state started. - :type start_time: datetime - :param exit_code: The container exit code. - :type exit_code: str - :param finish_time: Date/time when the container state finished. - :type finish_time: datetime - :param detail_status: Human-readable status of this state. - :type detail_status: str - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'exit_code': {'key': 'exitCode', 'type': 'str'}, - 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, - 'detail_status': {'key': 'detailStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerState, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.start_time = kwargs.get('start_time', None) - self.exit_code = kwargs.get('exit_code', None) - self.finish_time = kwargs.get('finish_time', None) - self.detail_status = kwargs.get('detail_status', None) - - -class CreateComposeDeploymentDescription(Model): - """Defines description for creating a Service Fabric compose deployment. - - All required parameters must be populated in order to send to Azure. - - :param deployment_name: Required. The name of the deployment. - :type deployment_name: str - :param compose_file_content: Required. The content of the compose file - that describes the deployment to create. - :type compose_file_content: str - :param registry_credential: Credential information to connect to container - registry. - :type registry_credential: ~azure.servicefabric.models.RegistryCredential - """ - - _validation = { - 'deployment_name': {'required': True}, - 'compose_file_content': {'required': True}, - } - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, - 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, - } - - def __init__(self, **kwargs): - super(CreateComposeDeploymentDescription, self).__init__(**kwargs) - self.deployment_name = kwargs.get('deployment_name', None) - self.compose_file_content = kwargs.get('compose_file_content', None) - self.registry_credential = kwargs.get('registry_credential', None) - - -class CurrentUpgradeDomainProgressInfo(Model): - """Information about the current in-progress upgrade domain. - - :param domain_name: The name of the upgrade domain - :type domain_name: str - :param node_upgrade_progress_list: List of upgrading nodes and their - statuses - :type node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__(self, **kwargs): - super(CurrentUpgradeDomainProgressInfo, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) - - -class DeactivationIntentDescription(Model): - """Describes the intent or reason for deactivating the node. - - :param deactivation_intent: Describes the intent or reason for - deactivating the node. The possible values are following. Possible values - include: 'Pause', 'Restart', 'RemoveData' - :type deactivation_intent: str or - ~azure.servicefabric.models.DeactivationIntent - """ - - _attribute_map = { - 'deactivation_intent': {'key': 'DeactivationIntent', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeactivationIntentDescription, self).__init__(**kwargs) - self.deactivation_intent = kwargs.get('deactivation_intent', None) - - -class ExecutionPolicy(Model): - """The execution policy of the service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DefaultExecutionPolicy, RunToCompletionExecutionPolicy - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'Default': 'DefaultExecutionPolicy', 'RunToCompletion': 'RunToCompletionExecutionPolicy'} - } - - def __init__(self, **kwargs): - super(ExecutionPolicy, self).__init__(**kwargs) - self.type = None - - -class DefaultExecutionPolicy(ExecutionPolicy): - """The default execution policy. Always restart the service if an exit occurs. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DefaultExecutionPolicy, self).__init__(**kwargs) - self.type = 'Default' - - -class DeletePropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that deletes a specified property if it - exists. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeletePropertyBatchOperation, self).__init__(**kwargs) - self.kind = 'Delete' - - -class DeltaNodesCheckHealthEvaluation(HealthEvaluation): - """Represents health evaluation for delta nodes, containing health evaluations - for each unhealthy node that impacted current aggregated health state. - Can be returned during cluster upgrade when the aggregated health state of - the cluster is Warning or Error. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param baseline_error_count: Number of nodes with aggregated heath state - Error in the health store at the beginning of the cluster upgrade. - :type baseline_error_count: long - :param baseline_total_count: Total number of nodes in the health store at - the beginning of the cluster upgrade. - :type baseline_total_count: long - :param max_percent_delta_unhealthy_nodes: Maximum allowed percentage of - delta unhealthy nodes from the ClusterUpgradeHealthPolicy. - :type max_percent_delta_unhealthy_nodes: int - :param total_count: Total number of nodes in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. - Includes all the unhealthy NodeHealthEvaluation that impacted the - aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, - 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(DeltaNodesCheckHealthEvaluation, self).__init__(**kwargs) - self.baseline_error_count = kwargs.get('baseline_error_count', None) - self.baseline_total_count = kwargs.get('baseline_total_count', None) - self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'DeltaNodesCheck' - - -class DeployedApplicationHealth(EntityHealth): - """Information about the health of an application deployed on a Service Fabric - node. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param name: Name of the application deployed on the node whose health - information is described by this object. - :type name: str - :param node_name: Name of the node where this application is deployed. - :type node_name: str - :param deployed_service_package_health_states: Deployed service package - health states for the current deployed application as found in the health - store. - :type deployed_service_package_health_states: - list[~azure.servicefabric.models.DeployedServicePackageHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'deployed_service_package_health_states': {'key': 'DeployedServicePackageHealthStates', 'type': '[DeployedServicePackageHealthState]'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationHealth, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.node_name = kwargs.get('node_name', None) - self.deployed_service_package_health_states = kwargs.get('deployed_service_package_health_states', None) - - -class DeployedApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a deployed application, containing - information about the data and the algorithm used by the health store to - evaluate health. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Name of the node where the application is deployed to. - :type node_name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the deployed application. - The types of the unhealthy evaluations can be - DeployedServicePackagesHealthEvaluation or EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationHealthEvaluation, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.application_name = kwargs.get('application_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'DeployedApplication' - - -class DeployedApplicationHealthReportExpiredEvent(ApplicationEvent): - """Deployed Application Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_instance_id: Required. Id of Application instance. - :type application_instance_id: long - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationHealthReportExpiredEvent, self).__init__(**kwargs) - self.application_instance_id = kwargs.get('application_instance_id', None) - self.node_name = kwargs.get('node_name', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'DeployedApplicationHealthReportExpired' - - -class DeployedApplicationHealthState(EntityHealthState): - """Represents the health state of a deployed application, which contains the - entity identifier and the aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param node_name: Name of the node on which the service package is - deployed. - :type node_name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationHealthState, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.application_name = kwargs.get('application_name', None) - - -class DeployedApplicationHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a deployed application, which contains - the node where the application is deployed, the aggregated health state and - any deployed service packages that respect the chunk query description - filters. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of node where the application is deployed. - :type node_name: str - :param deployed_service_package_health_state_chunks: The list of deployed - service package health state chunks belonging to the deployed application - that respect the filters in the cluster health chunk query description. - :type deployed_service_package_health_state_chunks: - ~azure.servicefabric.models.DeployedServicePackageHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'deployed_service_package_health_state_chunks': {'key': 'DeployedServicePackageHealthStateChunks', 'type': 'DeployedServicePackageHealthStateChunkList'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationHealthStateChunk, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.deployed_service_package_health_state_chunks = kwargs.get('deployed_service_package_health_state_chunks', None) - - -class DeployedApplicationHealthStateChunkList(Model): - """The list of deployed application health state chunks that respect the input - filters in the chunk query. Returned by get cluster health state chunks - query. - - :param items: The list of deployed application health state chunks that - respect the input filters in the chunk query. - :type items: - list[~azure.servicefabric.models.DeployedApplicationHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[DeployedApplicationHealthStateChunk]'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) - - -class DeployedApplicationHealthStateFilter(Model): - """Defines matching criteria to determine whether a deployed application - should be included as a child of an application in the cluster health - chunk. - The deployed applications are only returned if the parent application - matches a filter specified in the cluster health chunk query description. - One filter can match zero, one or multiple deployed applications, depending - on its properties. - - :param node_name_filter: The name of the node where the application is - deployed in order to match the filter. - If specified, the filter is applied only to the application deployed on - the specified node. - If the application is not deployed on the node with the specified name, no - deployed application is returned in the cluster health chunk based on this - filter. - Otherwise, the deployed application is included in the cluster health - chunk if it respects the other filter properties. - If not specified, all deployed applications that match the parent filters - (if any) are taken into consideration and matched against the other filter - members, like health state filter. - :type node_name_filter: str - :param health_state_filter: The filter for the health state of the - deployed applications. It allows selecting deployed applications if they - match the desired health states. - The possible values are integer value of one of the following health - states. Only deployed applications that match the filter are returned. All - deployed applications are used to evaluate the cluster aggregated health - state. - If not specified, default value is None, unless the node name is - specified. If the filter has default value and node name is specified, the - matching deployed application is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches deployed applications - with HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - :param deployed_service_package_filters: Defines a list of filters that - specify which deployed service packages to be included in the returned - cluster health chunk as children of the parent deployed application. The - deployed service packages are returned only if the parent deployed - application matches a filter. - If the list is empty, no deployed service packages are returned. All the - deployed service packages are used to evaluate the parent deployed - application aggregated health state, regardless of the input filters. - The deployed application filter may specify multiple deployed service - package filters. - For example, it can specify a filter to return all deployed service - packages with health state Error and another filter to always include a - deployed service package on a node. - :type deployed_service_package_filters: - list[~azure.servicefabric.models.DeployedServicePackageHealthStateFilter] - """ - - _attribute_map = { - 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'deployed_service_package_filters': {'key': 'DeployedServicePackageFilters', 'type': '[DeployedServicePackageHealthStateFilter]'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationHealthStateFilter, self).__init__(**kwargs) - self.node_name_filter = kwargs.get('node_name_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - self.deployed_service_package_filters = kwargs.get('deployed_service_package_filters', None) - - -class DeployedApplicationInfo(Model): - """Information about application deployed on the node. - - :param id: The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to - identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type id: str - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - :param type_name: The application type name as defined in the application - manifest. - :type type_name: str - :param status: The status of the application deployed on the node. - Following are the possible values. Possible values include: 'Invalid', - 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating' - :type status: str or ~azure.servicefabric.models.DeployedApplicationStatus - :param work_directory: The work directory of the application on the node. - The work directory can be used to store application data. - :type work_directory: str - :param log_directory: The log directory of the application on the node. - The log directory can be used to store application logs. - :type log_directory: str - :param temp_directory: The temp directory of the application on the node. - The code packages belonging to the application are forked with this - directory set as their temporary directory. - :type temp_directory: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'work_directory': {'key': 'WorkDirectory', 'type': 'str'}, - 'log_directory': {'key': 'LogDirectory', 'type': 'str'}, - 'temp_directory': {'key': 'TempDirectory', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.status = kwargs.get('status', None) - self.work_directory = kwargs.get('work_directory', None) - self.log_directory = kwargs.get('log_directory', None) - self.temp_directory = kwargs.get('temp_directory', None) - self.health_state = kwargs.get('health_state', None) - - -class DeployedApplicationNewHealthReportEvent(ApplicationEvent): - """Deployed Application Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_instance_id: Required. Id of Application instance. - :type application_instance_id: long - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationNewHealthReportEvent, self).__init__(**kwargs) - self.application_instance_id = kwargs.get('application_instance_id', None) - self.node_name = kwargs.get('node_name', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'DeployedApplicationNewHealthReport' - - -class DeployedApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for deployed applications, containing health - evaluations for each unhealthy deployed application that impacted current - aggregated health state. - Can be returned when evaluating application health and the aggregated - health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_deployed_applications: Maximum allowed - percentage of unhealthy deployed applications from the - ApplicationHealthPolicy. - :type max_percent_unhealthy_deployed_applications: int - :param total_count: Total number of deployed applications of the - application in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - DeployedApplicationHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationsHealthEvaluation, self).__init__(**kwargs) - self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'DeployedApplications' - - -class DeployedCodePackageInfo(Model): - """Information about code package deployed on a Service Fabric node. - - :param name: The name of the code package. - :type name: str - :param version: The version of the code package specified in service - manifest. - :type version: str - :param service_manifest_name: The name of service manifest that specified - this code package. - :type service_manifest_name: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param host_type: Specifies the type of host for main entry point of a - code package as specified in service manifest. Possible values include: - 'Invalid', 'ExeHost', 'ContainerHost' - :type host_type: str or ~azure.servicefabric.models.HostType - :param host_isolation_mode: Specifies the isolation mode of main entry - point of a code package when it's host type is ContainerHost. This is - specified as part of container host policies in application manifest while - importing service manifest. Possible values include: 'None', 'Process', - 'HyperV' - :type host_isolation_mode: str or - ~azure.servicefabric.models.HostIsolationMode - :param status: Specifies the status of a deployed application or service - package on a Service Fabric node. Possible values include: 'Invalid', - 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating', - 'RanToCompletion', 'Failed' - :type status: str or ~azure.servicefabric.models.DeploymentStatus - :param run_frequency_interval: The interval at which code package is run. - This is used for periodic code package. - :type run_frequency_interval: str - :param setup_entry_point: Information about setup or main entry point of a - code package deployed on a Service Fabric node. - :type setup_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint - :param main_entry_point: Information about setup or main entry point of a - code package deployed on a Service Fabric node. - :type main_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_type': {'key': 'HostType', 'type': 'str'}, - 'host_isolation_mode': {'key': 'HostIsolationMode', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'run_frequency_interval': {'key': 'RunFrequencyInterval', 'type': 'str'}, - 'setup_entry_point': {'key': 'SetupEntryPoint', 'type': 'CodePackageEntryPoint'}, - 'main_entry_point': {'key': 'MainEntryPoint', 'type': 'CodePackageEntryPoint'}, - } - - def __init__(self, **kwargs): - super(DeployedCodePackageInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.host_type = kwargs.get('host_type', None) - self.host_isolation_mode = kwargs.get('host_isolation_mode', None) - self.status = kwargs.get('status', None) - self.run_frequency_interval = kwargs.get('run_frequency_interval', None) - self.setup_entry_point = kwargs.get('setup_entry_point', None) - self.main_entry_point = kwargs.get('main_entry_point', None) - - -class DeployedServicePackageHealth(EntityHealth): - """Information about the health of a service package for a specific - application deployed on a Service Fabric node. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_manifest_name: Name of the service manifest. - :type service_manifest_name: str - :param node_name: Name of the node where this service package is deployed. - :type node_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageHealth, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.node_name = kwargs.get('node_name', None) - - -class DeployedServicePackageHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a deployed service package, containing - information about the data and the algorithm used by health store to - evaluate health. The evaluation is returned only when the aggregated health - state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_manifest_name: The name of the service manifest. - :type service_manifest_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state. The type of the unhealthy evaluations - can be EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageHealthEvaluation, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.application_name = kwargs.get('application_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'DeployedServicePackage' - - -class DeployedServicePackageHealthReportExpiredEvent(ApplicationEvent): - """Deployed Service Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param service_manifest: Required. Service manifest name. - :type service_manifest: str - :param service_package_instance_id: Required. Id of Service package - instance. - :type service_package_instance_id: long - :param service_package_activation_id: Required. Id of Service package - activation. - :type service_package_activation_id: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_manifest': {'required': True}, - 'service_package_instance_id': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_manifest': {'key': 'ServiceManifest', 'type': 'str'}, - 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageHealthReportExpiredEvent, self).__init__(**kwargs) - self.service_manifest = kwargs.get('service_manifest', None) - self.service_package_instance_id = kwargs.get('service_package_instance_id', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.node_name = kwargs.get('node_name', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'DeployedServicePackageHealthReportExpired' - - -class DeployedServicePackageHealthState(EntityHealthState): - """Represents the health state of a deployed service package, containing the - entity identifier and the aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param node_name: Name of the node on which the service package is - deployed. - :type node_name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_manifest_name: Name of the manifest describing the service - package. - :type service_manifest_name: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageHealthState, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.application_name = kwargs.get('application_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - - -class DeployedServicePackageHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a deployed service package, which - contains the service manifest name and the service package aggregated - health state. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_manifest_name: The name of the service manifest. - :type service_manifest_name: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageHealthStateChunk, self).__init__(**kwargs) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - - -class DeployedServicePackageHealthStateChunkList(Model): - """The list of deployed service package health state chunks that respect the - input filters in the chunk query. Returned by get cluster health state - chunks query. - - :param items: The list of deployed service package health state chunks - that respect the input filters in the chunk query. - :type items: - list[~azure.servicefabric.models.DeployedServicePackageHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[DeployedServicePackageHealthStateChunk]'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) - - -class DeployedServicePackageHealthStateFilter(Model): - """Defines matching criteria to determine whether a deployed service package - should be included as a child of a deployed application in the cluster - health chunk. - The deployed service packages are only returned if the parent entities - match a filter specified in the cluster health chunk query description. The - parent deployed application and its parent application must be included in - the cluster health chunk. - One filter can match zero, one or multiple deployed service packages, - depending on its properties. - - :param service_manifest_name_filter: The name of the service manifest - which identifies the deployed service packages that matches the filter. - If specified, the filter is applied only to the specified deployed service - packages, if any. - If no deployed service packages with specified manifest name exist, - nothing is returned in the cluster health chunk based on this filter. - If any deployed service package exists, they are included in the cluster - health chunk if it respects the other filter properties. - If not specified, all deployed service packages that match the parent - filters (if any) are taken into consideration and matched against the - other filter members, like health state filter. - :type service_manifest_name_filter: str - :param service_package_activation_id_filter: The activation ID of a - deployed service package that matches the filter. - If not specified, the filter applies to all deployed service packages that - match the other parameters. - If specified, the filter matches only the deployed service package with - the specified activation ID. - :type service_package_activation_id_filter: str - :param health_state_filter: The filter for the health state of the - deployed service packages. It allows selecting deployed service packages - if they match the desired health states. - The possible values are integer value of one of the following health - states. Only deployed service packages that match the filter are returned. - All deployed service packages are used to evaluate the parent deployed - application aggregated health state. - If not specified, default value is None, unless the deployed service - package ID is specified. If the filter has default value and deployed - service package ID is specified, the matching deployed service package is - returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches deployed service - packages with HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - """ - - _attribute_map = { - 'service_manifest_name_filter': {'key': 'ServiceManifestNameFilter', 'type': 'str'}, - 'service_package_activation_id_filter': {'key': 'ServicePackageActivationIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageHealthStateFilter, self).__init__(**kwargs) - self.service_manifest_name_filter = kwargs.get('service_manifest_name_filter', None) - self.service_package_activation_id_filter = kwargs.get('service_package_activation_id_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - - -class DeployedServicePackageInfo(Model): - """Information about service package deployed on a Service Fabric node. - - :param name: The name of the service package as specified in the service - manifest. - :type name: str - :param version: The version of the service package specified in service - manifest. - :type version: str - :param status: Specifies the status of a deployed application or service - package on a Service Fabric node. Possible values include: 'Invalid', - 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating', - 'RanToCompletion', 'Failed' - :type status: str or ~azure.servicefabric.models.DeploymentStatus - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) - self.status = kwargs.get('status', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - - -class DeployedServicePackageNewHealthReportEvent(ApplicationEvent): - """Deployed Service Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param service_manifest_name: Required. Service manifest name. - :type service_manifest_name: str - :param service_package_instance_id: Required. Id of Service package - instance. - :type service_package_instance_id: long - :param service_package_activation_id: Required. Id of Service package - activation. - :type service_package_activation_id: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_manifest_name': {'required': True}, - 'service_package_instance_id': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageNewHealthReportEvent, self).__init__(**kwargs) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_instance_id = kwargs.get('service_package_instance_id', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.node_name = kwargs.get('node_name', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'DeployedServicePackageNewHealthReport' - - -class DeployedServicePackagesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for deployed service packages, containing - health evaluations for each unhealthy deployed service package that - impacted current aggregated health state. Can be returned when evaluating - deployed application health and the aggregated health state is either Error - or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param total_count: Total number of deployed service packages of the - deployed application in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - DeployedServicePackageHealthEvaluation that impacted the aggregated - health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackagesHealthEvaluation, self).__init__(**kwargs) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'DeployedServicePackages' - - -class DeployedServiceReplicaDetailInfo(Model): - """Information about a Service Fabric service replica deployed on a node. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeployedStatefulServiceReplicaDetailInfo, - DeployedStatelessServiceInstanceDetailInfo - - All required parameters must be populated in order to send to Azure. - - :param service_name: Full hierarchical name of the service in URI format - starting with `fabric:`. - :type service_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param current_service_operation: Specifies the current active life-cycle - operation on a stateful service replica or stateless service instance. - Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', - 'Abort' - :type current_service_operation: str or - ~azure.servicefabric.models.ServiceOperationName - :param current_service_operation_start_time_utc: The start time of the - current service operation in UTC format. - :type current_service_operation_start_time_utc: datetime - :param reported_load: List of load reported by replica. - :type reported_load: - list[~azure.servicefabric.models.LoadMetricReportInfo] - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaDetailInfo', 'Stateless': 'DeployedStatelessServiceInstanceDetailInfo'} - } - - def __init__(self, **kwargs): - super(DeployedServiceReplicaDetailInfo, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.current_service_operation = kwargs.get('current_service_operation', None) - self.current_service_operation_start_time_utc = kwargs.get('current_service_operation_start_time_utc', None) - self.reported_load = kwargs.get('reported_load', None) - self.service_kind = None - - -class DeployedServiceReplicaInfo(Model): - """Information about a Service Fabric service replica deployed on a node. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeployedStatefulServiceReplicaInfo, - DeployedStatelessServiceInstanceInfo - - All required parameters must be populated in order to send to Azure. - - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param code_package_name: The name of the code package that hosts this - replica. - :type code_package_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param address: The last address returned by the replica in Open or - ChangeRole. - :type address: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param host_process_id: Host process ID of the process that is hosting the - replica. This will be zero if the replica is down. In hyper-v containers - this host process ID will be from different kernel. - :type host_process_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaInfo', 'Stateless': 'DeployedStatelessServiceInstanceInfo'} - } - - def __init__(self, **kwargs): - super(DeployedServiceReplicaInfo, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.service_type_name = kwargs.get('service_type_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.replica_status = kwargs.get('replica_status', None) - self.address = kwargs.get('address', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.host_process_id = kwargs.get('host_process_id', None) - self.service_kind = None - - -class DeployedServiceTypeInfo(Model): - """Information about service type deployed on a node, information such as the - status of the service type registration on a node. - - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param code_package_name: The name of the code package that registered the - service type. - :type code_package_name: str - :param status: The status of the service type registration on the node. - Possible values include: 'Invalid', 'Disabled', 'Enabled', 'Registered' - :type status: str or - ~azure.servicefabric.models.ServiceTypeRegistrationStatus - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - """ - - _attribute_map = { - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeployedServiceTypeInfo, self).__init__(**kwargs) - self.service_type_name = kwargs.get('service_type_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.status = kwargs.get('status', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - - -class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo): - """Information about a stateful replica running in a code package. Note - DeployedServiceReplicaQueryResult will contain duplicate data like - ServiceKind, ServiceName, PartitionId and replicaId. - - All required parameters must be populated in order to send to Azure. - - :param service_name: Full hierarchical name of the service in URI format - starting with `fabric:`. - :type service_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param current_service_operation: Specifies the current active life-cycle - operation on a stateful service replica or stateless service instance. - Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', - 'Abort' - :type current_service_operation: str or - ~azure.servicefabric.models.ServiceOperationName - :param current_service_operation_start_time_utc: The start time of the - current service operation in UTC format. - :type current_service_operation_start_time_utc: datetime - :param reported_load: List of load reported by replica. - :type reported_load: - list[~azure.servicefabric.models.LoadMetricReportInfo] - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - :param current_replicator_operation: Specifies the operation currently - being executed by the Replicator. Possible values include: 'Invalid', - 'None', 'Open', 'ChangeRole', 'UpdateEpoch', 'Close', 'Abort', - 'OnDataLoss', 'WaitForCatchup', 'Build' - :type current_replicator_operation: str or - ~azure.servicefabric.models.ReplicatorOperationName - :param read_status: Specifies the access status of the partition. Possible - values include: 'Invalid', 'Granted', 'ReconfigurationPending', - 'NotPrimary', 'NoWriteQuorum' - :type read_status: str or - ~azure.servicefabric.models.PartitionAccessStatus - :param write_status: Specifies the access status of the partition. - Possible values include: 'Invalid', 'Granted', 'ReconfigurationPending', - 'NotPrimary', 'NoWriteQuorum' - :type write_status: str or - ~azure.servicefabric.models.PartitionAccessStatus - :param replicator_status: Represents a base class for primary or secondary - replicator status. - Contains information about the service fabric replicator like the - replication/copy queue utilization, last acknowledgement received - timestamp, etc. - :type replicator_status: ~azure.servicefabric.models.ReplicatorStatus - :param replica_status: Key value store related information for the - replica. - :type replica_status: - ~azure.servicefabric.models.KeyValueStoreReplicaStatus - :param deployed_service_replica_query_result: Information about a stateful - service replica deployed on a node. - :type deployed_service_replica_query_result: - ~azure.servicefabric.models.DeployedStatefulServiceReplicaInfo - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'current_replicator_operation': {'key': 'CurrentReplicatorOperation', 'type': 'str'}, - 'read_status': {'key': 'ReadStatus', 'type': 'str'}, - 'write_status': {'key': 'WriteStatus', 'type': 'str'}, - 'replicator_status': {'key': 'ReplicatorStatus', 'type': 'ReplicatorStatus'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'KeyValueStoreReplicaStatus'}, - 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatefulServiceReplicaInfo'}, - } - - def __init__(self, **kwargs): - super(DeployedStatefulServiceReplicaDetailInfo, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.current_replicator_operation = kwargs.get('current_replicator_operation', None) - self.read_status = kwargs.get('read_status', None) - self.write_status = kwargs.get('write_status', None) - self.replicator_status = kwargs.get('replicator_status', None) - self.replica_status = kwargs.get('replica_status', None) - self.deployed_service_replica_query_result = kwargs.get('deployed_service_replica_query_result', None) - self.service_kind = 'Stateful' - - -class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): - """Information about a stateful service replica deployed on a node. - - All required parameters must be populated in order to send to Azure. - - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param code_package_name: The name of the code package that hosts this - replica. - :type code_package_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param address: The last address returned by the replica in Open or - ChangeRole. - :type address: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param host_process_id: Host process ID of the process that is hosting the - replica. This will be zero if the replica is down. In hyper-v containers - this host process ID will be from different kernel. - :type host_process_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - :param replica_role: The role of a replica of a stateful service. Possible - values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', - 'ActiveSecondary' - :type replica_role: str or ~azure.servicefabric.models.ReplicaRole - :param reconfiguration_information: Information about current - reconfiguration like phase, type, previous configuration role of replica - and reconfiguration start date time. - :type reconfiguration_information: - ~azure.servicefabric.models.ReconfigurationInformation - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, - 'reconfiguration_information': {'key': 'ReconfigurationInformation', 'type': 'ReconfigurationInformation'}, - } - - def __init__(self, **kwargs): - super(DeployedStatefulServiceReplicaInfo, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.replica_role = kwargs.get('replica_role', None) - self.reconfiguration_information = kwargs.get('reconfiguration_information', None) - self.service_kind = 'Stateful' - - -class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInfo): - """Information about a stateless instance running in a code package. Note that - DeployedServiceReplicaQueryResult will contain duplicate data like - ServiceKind, ServiceName, PartitionId and InstanceId. - - All required parameters must be populated in order to send to Azure. - - :param service_name: Full hierarchical name of the service in URI format - starting with `fabric:`. - :type service_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param current_service_operation: Specifies the current active life-cycle - operation on a stateful service replica or stateless service instance. - Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', - 'Abort' - :type current_service_operation: str or - ~azure.servicefabric.models.ServiceOperationName - :param current_service_operation_start_time_utc: The start time of the - current service operation in UTC format. - :type current_service_operation_start_time_utc: datetime - :param reported_load: List of load reported by replica. - :type reported_load: - list[~azure.servicefabric.models.LoadMetricReportInfo] - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_id: Id of a stateless service instance. InstanceId is used - by Service Fabric to uniquely identify an instance of a partition of a - stateless service. It is unique within a partition and does not change for - the lifetime of the instance. If the instance has failed over on the same - or different node, it will get a different value for the InstanceId. - :type instance_id: str - :param deployed_service_replica_query_result: Information about a - stateless service instance deployed on a node. - :type deployed_service_replica_query_result: - ~azure.servicefabric.models.DeployedStatelessServiceInstanceInfo - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatelessServiceInstanceInfo'}, - } - - def __init__(self, **kwargs): - super(DeployedStatelessServiceInstanceDetailInfo, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.deployed_service_replica_query_result = kwargs.get('deployed_service_replica_query_result', None) - self.service_kind = 'Stateless' - - -class DeployedStatelessServiceInstanceInfo(DeployedServiceReplicaInfo): - """Information about a stateless service instance deployed on a node. - - All required parameters must be populated in order to send to Azure. - - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param code_package_name: The name of the code package that hosts this - replica. - :type code_package_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param address: The last address returned by the replica in Open or - ChangeRole. - :type address: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param host_process_id: Host process ID of the process that is hosting the - replica. This will be zero if the replica is down. In hyper-v containers - this host process ID will be from different kernel. - :type host_process_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_id: Id of a stateless service instance. InstanceId is used - by Service Fabric to uniquely identify an instance of a partition of a - stateless service. It is unique within a partition and does not change for - the lifetime of the instance. If the instance has failed over on the same - or different node, it will get a different value for the InstanceId. - :type instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeployedStatelessServiceInstanceInfo, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.service_kind = 'Stateless' - - -class DeployServicePackageToNodeDescription(Model): - """Defines description for downloading packages associated with a service - manifest to image cache on a Service Fabric node. - - All required parameters must be populated in order to send to Azure. - - :param service_manifest_name: Required. The name of service manifest whose - packages need to be downloaded. - :type service_manifest_name: str - :param application_type_name: Required. The application type name as - defined in the application manifest. - :type application_type_name: str - :param application_type_version: Required. The version of the application - type as defined in the application manifest. - :type application_type_version: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param package_sharing_policy: List of package sharing policy information. - :type package_sharing_policy: - list[~azure.servicefabric.models.PackageSharingPolicyInfo] - """ - - _validation = { - 'service_manifest_name': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'node_name': {'required': True}, - } - - _attribute_map = { - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'package_sharing_policy': {'key': 'PackageSharingPolicy', 'type': '[PackageSharingPolicyInfo]'}, - } - - def __init__(self, **kwargs): - super(DeployServicePackageToNodeDescription, self).__init__(**kwargs) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.node_name = kwargs.get('node_name', None) - self.package_sharing_policy = kwargs.get('package_sharing_policy', None) - - -class DiagnosticsDescription(Model): - """Describes the diagnostics options available. - - :param sinks: List of supported sinks that can be referenced. - :type sinks: list[~azure.servicefabric.models.DiagnosticsSinkProperties] - :param enabled: Status of whether or not sinks are enabled. - :type enabled: bool - :param default_sink_refs: The sinks to be used if diagnostics is enabled. - Sink choices can be overridden at the service and code package level. - :type default_sink_refs: list[str] - """ - - _attribute_map = { - 'sinks': {'key': 'sinks', 'type': '[DiagnosticsSinkProperties]'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'default_sink_refs': {'key': 'defaultSinkRefs', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(DiagnosticsDescription, self).__init__(**kwargs) - self.sinks = kwargs.get('sinks', None) - self.enabled = kwargs.get('enabled', None) - self.default_sink_refs = kwargs.get('default_sink_refs', None) - - -class DiagnosticsRef(Model): - """Reference to sinks in DiagnosticsDescription. - - :param enabled: Status of whether or not sinks are enabled. - :type enabled: bool - :param sink_refs: List of sinks to be used if enabled. References the list - of sinks in DiagnosticsDescription. - :type sink_refs: list[str] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'sink_refs': {'key': 'sinkRefs', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(DiagnosticsRef, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.sink_refs = kwargs.get('sink_refs', None) - - -class DisableBackupDescription(Model): - """It describes the body parameters while disabling backup of a backup - entity(Application/Service/Partition). - - All required parameters must be populated in order to send to Azure. - - :param clean_backup: Required. Boolean flag to delete backups. It can be - set to true for deleting all the backups which were created for the backup - entity that is getting disabled for backup. - :type clean_backup: bool - """ - - _validation = { - 'clean_backup': {'required': True}, - } - - _attribute_map = { - 'clean_backup': {'key': 'CleanBackup', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DisableBackupDescription, self).__init__(**kwargs) - self.clean_backup = kwargs.get('clean_backup', None) - - -class DiskInfo(Model): - """Information about the disk. - - :param capacity: the disk size in bytes - :type capacity: str - :param available_space: the available disk space in bytes - :type available_space: str - """ - - _attribute_map = { - 'capacity': {'key': 'Capacity', 'type': 'str'}, - 'available_space': {'key': 'AvailableSpace', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiskInfo, self).__init__(**kwargs) - self.capacity = kwargs.get('capacity', None) - self.available_space = kwargs.get('available_space', None) - - -class DoublePropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Double. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. The data of the property value. - :type data: float - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(DoublePropertyValue, self).__init__(**kwargs) - self.data = kwargs.get('data', None) - self.kind = 'Double' - - -class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Dsms Azure blob store used for storing and - enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - :param storage_credentials_source_location: Required. The source location - of the storage credentials to connect to the Dsms Azure blob store. - :type storage_credentials_source_location: str - :param container_name: Required. The name of the container in the blob - store to store and enumerate backups from. - :type container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'storage_credentials_source_location': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'storage_credentials_source_location': {'key': 'StorageCredentialsSourceLocation', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DsmsAzureBlobBackupStorageDescription, self).__init__(**kwargs) - self.storage_credentials_source_location = kwargs.get('storage_credentials_source_location', None) - self.container_name = kwargs.get('container_name', None) - self.storage_kind = 'DsmsAzureBlobStore' - - -class EnableBackupDescription(Model): - """Specifies the parameters needed to enable periodic backup. - - All required parameters must be populated in order to send to Azure. - - :param backup_policy_name: Required. Name of the backup policy to be used - for enabling periodic backups. - :type backup_policy_name: str - """ - - _validation = { - 'backup_policy_name': {'required': True}, - } - - _attribute_map = { - 'backup_policy_name': {'key': 'BackupPolicyName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EnableBackupDescription, self).__init__(**kwargs) - self.backup_policy_name = kwargs.get('backup_policy_name', None) - - -class EndpointProperties(Model): - """Describes a container endpoint. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the endpoint. - :type name: str - :param port: Port used by the container. - :type port: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(EndpointProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.port = kwargs.get('port', None) - - -class EndpointRef(Model): - """Describes a reference to a service endpoint. - - :param name: Name of the endpoint. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EndpointRef, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class SafetyCheck(Model): - """Represents a safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service - and the reliability of the state. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionSafetyCheck, SeedNodeSafetyCheck - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'PartitionSafetyCheck': 'PartitionSafetyCheck', 'EnsureSeedNodeQuorum': 'SeedNodeSafetyCheck'} - } - - def __init__(self, **kwargs): - super(SafetyCheck, self).__init__(**kwargs) - self.kind = None - - -class PartitionSafetyCheck(SafetyCheck): - """Represents a safety check for the service partition being performed by - service fabric before continuing with operations. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: EnsureAvailabilitySafetyCheck, - EnsurePartitionQuorumSafetyCheck, WaitForInbuildReplicaSafetyCheck, - WaitForPrimaryPlacementSafetyCheck, WaitForPrimarySwapSafetyCheck, - WaitForReconfigurationSafetyCheck - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'EnsureAvailability': 'EnsureAvailabilitySafetyCheck', 'EnsurePartitionQuorum': 'EnsurePartitionQuorumSafetyCheck', 'WaitForInbuildReplica': 'WaitForInbuildReplicaSafetyCheck', 'WaitForPrimaryPlacement': 'WaitForPrimaryPlacementSafetyCheck', 'WaitForPrimarySwap': 'WaitForPrimarySwapSafetyCheck', 'WaitForReconfiguration': 'WaitForReconfigurationSafetyCheck'} - } - - def __init__(self, **kwargs): - super(PartitionSafetyCheck, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.kind = 'PartitionSafetyCheck' - - -class EnsureAvailabilitySafetyCheck(PartitionSafetyCheck): - """Safety check that waits to ensure the availability of the partition. It - waits until there are replicas available such that bringing down this - replica will not cause availability loss for the partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EnsureAvailabilitySafetyCheck, self).__init__(**kwargs) - self.kind = 'EnsureAvailability' - - -class EnsurePartitionQuorumSafetyCheck(PartitionSafetyCheck): - """Safety check that ensures that a quorum of replicas are not lost for a - partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EnsurePartitionQuorumSafetyCheck, self).__init__(**kwargs) - self.kind = 'EnsurePartitionQuorum' - - -class EntityKindHealthStateCount(Model): - """Represents health state count for entities of the specified entity kind. - - :param entity_kind: The entity kind for which health states are evaluated. - Possible values include: 'Invalid', 'Node', 'Partition', 'Service', - 'Application', 'Replica', 'DeployedApplication', 'DeployedServicePackage', - 'Cluster' - :type entity_kind: str or ~azure.servicefabric.models.EntityKind - :param health_state_count: The health state count for the entities of the - specified kind. - :type health_state_count: ~azure.servicefabric.models.HealthStateCount - """ - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'health_state_count': {'key': 'HealthStateCount', 'type': 'HealthStateCount'}, - } - - def __init__(self, **kwargs): - super(EntityKindHealthStateCount, self).__init__(**kwargs) - self.entity_kind = kwargs.get('entity_kind', None) - self.health_state_count = kwargs.get('health_state_count', None) - - -class EnvironmentVariable(Model): - """Describes an environment variable for the container. - - :param type: The type of the environment variable being given in value. - Possible values include: 'ClearText', 'KeyVaultReference', - 'SecretValueReference'. Default value: "ClearText" . - :type type: str or ~azure.servicefabric.models.EnvironmentVariableType - :param name: The name of the environment variable. - :type name: str - :param value: The value of the environment variable, will be processed - based on the type provided. - :type value: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EnvironmentVariable, self).__init__(**kwargs) - self.type = kwargs.get('type', "ClearText") - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - - -class Epoch(Model): - """An Epoch is a configuration number for the partition as a whole. When the - configuration of the replica set changes, for example when the Primary - replica changes, the operations that are replicated from the new Primary - replica are said to be a new Epoch from the ones which were sent by the old - Primary replica. - - :param configuration_version: The current configuration number of this - Epoch. The configuration number is an increasing value that is updated - whenever the configuration of this replica set changes. - :type configuration_version: str - :param data_loss_version: The current data loss number of this Epoch. The - data loss number property is an increasing value which is updated whenever - data loss is suspected, as when loss of a quorum of replicas in the - replica set that includes the Primary replica. - :type data_loss_version: str - """ - - _attribute_map = { - 'configuration_version': {'key': 'ConfigurationVersion', 'type': 'str'}, - 'data_loss_version': {'key': 'DataLossVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Epoch, self).__init__(**kwargs) - self.configuration_version = kwargs.get('configuration_version', None) - self.data_loss_version = kwargs.get('data_loss_version', None) - - -class EventHealthEvaluation(HealthEvaluation): - """Represents health evaluation of a HealthEvent that was reported on the - entity. - The health evaluation is returned when evaluating health of an entity - results in Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param consider_warning_as_error: Indicates whether warnings are treated - with the same severity as errors. The field is specified in the health - policy used to evaluate the entity. - :type consider_warning_as_error: bool - :param unhealthy_event: Represents health information reported on a health - entity, such as cluster, application or node, with additional metadata - added by the Health Manager. - :type unhealthy_event: ~azure.servicefabric.models.HealthEvent - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'unhealthy_event': {'key': 'UnhealthyEvent', 'type': 'HealthEvent'}, - } - - def __init__(self, **kwargs): - super(EventHealthEvaluation, self).__init__(**kwargs) - self.consider_warning_as_error = kwargs.get('consider_warning_as_error', None) - self.unhealthy_event = kwargs.get('unhealthy_event', None) - self.kind = 'Event' - - -class ExecutingFaultsChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos has decided on the - faults for an iteration. This Chaos event contains the details of the - faults as a list of strings. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param faults: List of string description of the faults that Chaos decided - to execute in an iteration. - :type faults: list[str] - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'faults': {'key': 'Faults', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ExecutingFaultsChaosEvent, self).__init__(**kwargs) - self.faults = kwargs.get('faults', None) - self.kind = 'ExecutingFaults' - - -class ProvisionApplicationTypeDescriptionBase(Model): - """Represents the type of registration or provision requested, and if the - operation needs to be asynchronous or not. Supported types of provision - operations are from either image store or external store. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ProvisionApplicationTypeDescription, - ExternalStoreProvisionApplicationTypeDescription - - All required parameters must be populated in order to send to Azure. - - :param async_property: Required. Indicates whether or not provisioning - should occur asynchronously. When set to true, the provision operation - returns when the request is accepted by the system, and the provision - operation continues without any timeout limit. The default value is false. - For large application packages, we recommend setting the value to true. - :type async_property: bool - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ImageStorePath': 'ProvisionApplicationTypeDescription', 'ExternalStore': 'ExternalStoreProvisionApplicationTypeDescription'} - } - - def __init__(self, **kwargs): - super(ProvisionApplicationTypeDescriptionBase, self).__init__(**kwargs) - self.async_property = kwargs.get('async_property', None) - self.kind = None - - -class ExternalStoreProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): - """Describes the operation to register or provision an application type using - an application package from an external store instead of a package uploaded - to the Service Fabric image store. - - All required parameters must be populated in order to send to Azure. - - :param async_property: Required. Indicates whether or not provisioning - should occur asynchronously. When set to true, the provision operation - returns when the request is accepted by the system, and the provision - operation continues without any timeout limit. The default value is false. - For large application packages, we recommend setting the value to true. - :type async_property: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_package_download_uri: Required. The path to the - '.sfpkg' application package from where the application package can be - downloaded using HTTP or HTTPS protocols. The application package can be - stored in an external store that provides GET operation to download the - file. Supported protocols are HTTP and HTTPS, and the path must allow READ - access. - :type application_package_download_uri: str - :param application_type_name: Required. The application type name - represents the name of the application type found in the application - manifest. - :type application_type_name: str - :param application_type_version: Required. The application type version - represents the version of the application type found in the application - manifest. - :type application_type_version: str - """ - - _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, - 'application_package_download_uri': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_package_download_uri': {'key': 'ApplicationPackageDownloadUri', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExternalStoreProvisionApplicationTypeDescription, self).__init__(**kwargs) - self.application_package_download_uri = kwargs.get('application_package_download_uri', None) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.kind = 'ExternalStore' - - -class FabricCodeVersionInfo(Model): - """Information about a Service Fabric code version. - - :param code_version: The product version of Service Fabric. - :type code_version: str - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FabricCodeVersionInfo, self).__init__(**kwargs) - self.code_version = kwargs.get('code_version', None) - - -class FabricConfigVersionInfo(Model): - """Information about a Service Fabric config version. - - :param config_version: The config version of Service Fabric. - :type config_version: str - """ - - _attribute_map = { - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FabricConfigVersionInfo, self).__init__(**kwargs) - self.config_version = kwargs.get('config_version', None) - - -class FabricError(Model): - """The REST API operations for Service Fabric return standard HTTP status - codes. This type defines the additional information returned from the - Service Fabric API operations that are not successful. - - All required parameters must be populated in order to send to Azure. - - :param error: Required. Error object containing error code and error - message. - :type error: ~azure.servicefabric.models.FabricErrorError - """ - - _validation = { - 'error': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'Error', 'type': 'FabricErrorError'}, - } - - def __init__(self, **kwargs): - super(FabricError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class FabricErrorException(HttpOperationError): - """Server responsed with exception of type: 'FabricError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(FabricErrorException, self).__init__(deserialize, response, 'FabricError', *args) - - -class FabricErrorError(Model): - """Error object containing error code and error message. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. Defines the fabric error codes that be returned as - part of the error object in response to Service Fabric API operations that - are not successful. Following are the error code values that can be - returned for a specific HTTP status code. - - Possible values of the error code for HTTP status code 400 (Bad Request) - - "FABRIC_E_INVALID_PARTITION_KEY" - - "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" - - "FABRIC_E_INVALID_ADDRESS" - - "FABRIC_E_APPLICATION_NOT_UPGRADING" - - "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" - - "FABRIC_E_FABRIC_NOT_UPGRADING" - - "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" - - "FABRIC_E_INVALID_CONFIGURATION" - - "FABRIC_E_INVALID_NAME_URI" - - "FABRIC_E_PATH_TOO_LONG" - - "FABRIC_E_KEY_TOO_LARGE" - - "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" - - "FABRIC_E_INVALID_ATOMIC_GROUP" - - "FABRIC_E_VALUE_EMPTY" - - "FABRIC_E_BACKUP_IS_ENABLED" - - "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" - - "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" - - "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" - - "E_INVALIDARG" - - Possible values of the error code for HTTP status code 404 (Not Found) - - "FABRIC_E_NODE_NOT_FOUND" - - "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" - - "FABRIC_E_APPLICATION_NOT_FOUND" - - "FABRIC_E_SERVICE_TYPE_NOT_FOUND" - - "FABRIC_E_SERVICE_DOES_NOT_EXIST" - - "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" - - "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" - - "FABRIC_E_PARTITION_NOT_FOUND" - - "FABRIC_E_REPLICA_DOES_NOT_EXIST" - - "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" - - "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" - - "FABRIC_E_DIRECTORY_NOT_FOUND" - - "FABRIC_E_FABRIC_VERSION_NOT_FOUND" - - "FABRIC_E_FILE_NOT_FOUND" - - "FABRIC_E_NAME_DOES_NOT_EXIST" - - "FABRIC_E_PROPERTY_DOES_NOT_EXIST" - - "FABRIC_E_ENUMERATION_COMPLETED" - - "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" - - "FABRIC_E_KEY_NOT_FOUND" - - "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" - - "FABRIC_E_BACKUP_NOT_ENABLED" - - "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" - - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" - - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" - - Possible values of the error code for HTTP status code 409 (Conflict) - - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" - - "FABRIC_E_APPLICATION_ALREADY_EXISTS" - - "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" - - "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" - - "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" - - "FABRIC_E_SERVICE_ALREADY_EXISTS" - - "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" - - "FABRIC_E_APPLICATION_TYPE_IN_USE" - - "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" - - "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" - - "FABRIC_E_FABRIC_VERSION_IN_USE" - - "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" - - "FABRIC_E_NAME_ALREADY_EXISTS" - - "FABRIC_E_NAME_NOT_EMPTY" - - "FABRIC_E_PROPERTY_CHECK_FAILED" - - "FABRIC_E_SERVICE_METADATA_MISMATCH" - - "FABRIC_E_SERVICE_TYPE_MISMATCH" - - "FABRIC_E_HEALTH_STALE_REPORT" - - "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" - - "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" - - "FABRIC_E_INSTANCE_ID_MISMATCH" - - "FABRIC_E_BACKUP_IN_PROGRESS" - - "FABRIC_E_RESTORE_IN_PROGRESS" - - "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" - - Possible values of the error code for HTTP status code 413 (Request - Entity Too Large) - - "FABRIC_E_VALUE_TOO_LARGE" - - Possible values of the error code for HTTP status code 500 (Internal - Server Error) - - "FABRIC_E_NODE_IS_UP" - - "E_FAIL" - - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" - - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" - - "FABRIC_E_VOLUME_ALREADY_EXISTS" - - "FABRIC_E_VOLUME_NOT_FOUND" - - "SerializationError" - - Possible values of the error code for HTTP status code 503 (Service - Unavailable) - - "FABRIC_E_NO_WRITE_QUORUM" - - "FABRIC_E_NOT_PRIMARY" - - "FABRIC_E_NOT_READY" - - "FABRIC_E_RECONFIGURATION_PENDING" - - "FABRIC_E_SERVICE_OFFLINE" - - "E_ABORT" - - "FABRIC_E_VALUE_TOO_LARGE" - - Possible values of the error code for HTTP status code 504 (Gateway - Timeout) - - "FABRIC_E_COMMUNICATION_ERROR" - - "FABRIC_E_OPERATION_NOT_COMPLETE" - - "FABRIC_E_TIMEOUT". Possible values include: - 'FABRIC_E_INVALID_PARTITION_KEY', - 'FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR', 'FABRIC_E_INVALID_ADDRESS', - 'FABRIC_E_APPLICATION_NOT_UPGRADING', - 'FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR', - 'FABRIC_E_FABRIC_NOT_UPGRADING', - 'FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR', - 'FABRIC_E_INVALID_CONFIGURATION', 'FABRIC_E_INVALID_NAME_URI', - 'FABRIC_E_PATH_TOO_LONG', 'FABRIC_E_KEY_TOO_LARGE', - 'FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED', - 'FABRIC_E_INVALID_ATOMIC_GROUP', 'FABRIC_E_VALUE_EMPTY', - 'FABRIC_E_NODE_NOT_FOUND', 'FABRIC_E_APPLICATION_TYPE_NOT_FOUND', - 'FABRIC_E_APPLICATION_NOT_FOUND', 'FABRIC_E_SERVICE_TYPE_NOT_FOUND', - 'FABRIC_E_SERVICE_DOES_NOT_EXIST', - 'FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND', - 'FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND', - 'FABRIC_E_PARTITION_NOT_FOUND', 'FABRIC_E_REPLICA_DOES_NOT_EXIST', - 'FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST', - 'FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND', - 'FABRIC_E_DIRECTORY_NOT_FOUND', 'FABRIC_E_FABRIC_VERSION_NOT_FOUND', - 'FABRIC_E_FILE_NOT_FOUND', 'FABRIC_E_NAME_DOES_NOT_EXIST', - 'FABRIC_E_PROPERTY_DOES_NOT_EXIST', 'FABRIC_E_ENUMERATION_COMPLETED', - 'FABRIC_E_SERVICE_MANIFEST_NOT_FOUND', 'FABRIC_E_KEY_NOT_FOUND', - 'FABRIC_E_HEALTH_ENTITY_NOT_FOUND', - 'FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS', - 'FABRIC_E_APPLICATION_ALREADY_EXISTS', - 'FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION', - 'FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS', - 'FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS', - 'FABRIC_E_SERVICE_ALREADY_EXISTS', - 'FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS', - 'FABRIC_E_APPLICATION_TYPE_IN_USE', - 'FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION', - 'FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS', - 'FABRIC_E_FABRIC_VERSION_IN_USE', 'FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS', - 'FABRIC_E_NAME_ALREADY_EXISTS', 'FABRIC_E_NAME_NOT_EMPTY', - 'FABRIC_E_PROPERTY_CHECK_FAILED', 'FABRIC_E_SERVICE_METADATA_MISMATCH', - 'FABRIC_E_SERVICE_TYPE_MISMATCH', 'FABRIC_E_HEALTH_STALE_REPORT', - 'FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED', - 'FABRIC_E_NODE_HAS_NOT_STOPPED_YET', 'FABRIC_E_INSTANCE_ID_MISMATCH', - 'FABRIC_E_VALUE_TOO_LARGE', 'FABRIC_E_NO_WRITE_QUORUM', - 'FABRIC_E_NOT_PRIMARY', 'FABRIC_E_NOT_READY', - 'FABRIC_E_RECONFIGURATION_PENDING', 'FABRIC_E_SERVICE_OFFLINE', 'E_ABORT', - 'FABRIC_E_COMMUNICATION_ERROR', 'FABRIC_E_OPERATION_NOT_COMPLETE', - 'FABRIC_E_TIMEOUT', 'FABRIC_E_NODE_IS_UP', 'E_FAIL', - 'FABRIC_E_BACKUP_IS_ENABLED', - 'FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH', - 'FABRIC_E_INVALID_FOR_STATELESS_SERVICES', 'FABRIC_E_BACKUP_NOT_ENABLED', - 'FABRIC_E_BACKUP_POLICY_NOT_EXISTING', - 'FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING', - 'FABRIC_E_BACKUP_IN_PROGRESS', 'FABRIC_E_RESTORE_IN_PROGRESS', - 'FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING', - 'FABRIC_E_INVALID_SERVICE_SCALING_POLICY', 'E_INVALIDARG', - 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS', - 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND', - 'FABRIC_E_VOLUME_ALREADY_EXISTS', 'FABRIC_E_VOLUME_NOT_FOUND', - 'SerializationError', 'FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR' - :type code: str or ~azure.servicefabric.models.FabricErrorCodes - :param message: Error message. - :type message: str - """ - - _validation = { - 'code': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'Code', 'type': 'str'}, - 'message': {'key': 'Message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FabricErrorError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - - -class PropertyBatchInfo(Model): - """Information about the results of a property batch. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SuccessfulPropertyBatchInfo, FailedPropertyBatchInfo - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Successful': 'SuccessfulPropertyBatchInfo', 'Failed': 'FailedPropertyBatchInfo'} - } - - def __init__(self, **kwargs): - super(PropertyBatchInfo, self).__init__(**kwargs) - self.kind = None - - -class FailedPropertyBatchInfo(PropertyBatchInfo): - """Derived from PropertyBatchInfo. Represents the property batch failing. - Contains information about the specific batch failure. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param error_message: The error message of the failed operation. Describes - the exception thrown due to the first unsuccessful operation in the - property batch. - :type error_message: str - :param operation_index: The index of the unsuccessful operation in the - property batch. - :type operation_index: int - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'error_message': {'key': 'ErrorMessage', 'type': 'str'}, - 'operation_index': {'key': 'OperationIndex', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(FailedPropertyBatchInfo, self).__init__(**kwargs) - self.error_message = kwargs.get('error_message', None) - self.operation_index = kwargs.get('operation_index', None) - self.kind = 'Failed' - - -class FailedUpgradeDomainProgressObject(Model): - """The detailed upgrade progress for nodes in the current upgrade domain at - the point of failure. - - :param domain_name: The name of the upgrade domain - :type domain_name: str - :param node_upgrade_progress_list: List of upgrading nodes and their - statuses - :type node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__(self, **kwargs): - super(FailedUpgradeDomainProgressObject, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) - - -class FailureUpgradeDomainProgressInfo(Model): - """Information about the upgrade domain progress at the time of upgrade - failure. - - :param domain_name: The name of the upgrade domain - :type domain_name: str - :param node_upgrade_progress_list: List of upgrading nodes and their - statuses - :type node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__(self, **kwargs): - super(FailureUpgradeDomainProgressInfo, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) - - -class FileInfo(Model): - """Information about a image store file. - - :param file_size: The size of file in bytes. - :type file_size: str - :param file_version: Information about the version of image store file. - :type file_version: ~azure.servicefabric.models.FileVersion - :param modified_date: The date and time when the image store file was last - modified. - :type modified_date: datetime - :param store_relative_path: The file path relative to the image store root - path. - :type store_relative_path: str - """ - - _attribute_map = { - 'file_size': {'key': 'FileSize', 'type': 'str'}, - 'file_version': {'key': 'FileVersion', 'type': 'FileVersion'}, - 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FileInfo, self).__init__(**kwargs) - self.file_size = kwargs.get('file_size', None) - self.file_version = kwargs.get('file_version', None) - self.modified_date = kwargs.get('modified_date', None) - self.store_relative_path = kwargs.get('store_relative_path', None) - - -class FileShareBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for file share storage used for storing or - enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - :param path: Required. UNC path of the file share where to store or - enumerate backups from. - :type path: str - :param primary_user_name: Primary user name to access the file share. - :type primary_user_name: str - :param primary_password: Primary password to access the share location. - :type primary_password: str - :param secondary_user_name: Secondary user name to access the file share. - :type secondary_user_name: str - :param secondary_password: Secondary password to access the share location - :type secondary_password: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'path': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'path': {'key': 'Path', 'type': 'str'}, - 'primary_user_name': {'key': 'PrimaryUserName', 'type': 'str'}, - 'primary_password': {'key': 'PrimaryPassword', 'type': 'str'}, - 'secondary_user_name': {'key': 'SecondaryUserName', 'type': 'str'}, - 'secondary_password': {'key': 'SecondaryPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FileShareBackupStorageDescription, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.primary_user_name = kwargs.get('primary_user_name', None) - self.primary_password = kwargs.get('primary_password', None) - self.secondary_user_name = kwargs.get('secondary_user_name', None) - self.secondary_password = kwargs.get('secondary_password', None) - self.storage_kind = 'FileShare' - - -class FileVersion(Model): - """Information about the version of image store file. - - :param version_number: The current image store version number for the file - is used in image store for checking whether it need to be updated. - :type version_number: str - :param epoch_data_loss_number: The epoch data loss number of image store - replica when this file entry was updated or created. - :type epoch_data_loss_number: str - :param epoch_configuration_number: The epoch configuration version number - of the image store replica when this file entry was created or updated. - :type epoch_configuration_number: str - """ - - _attribute_map = { - 'version_number': {'key': 'VersionNumber', 'type': 'str'}, - 'epoch_data_loss_number': {'key': 'EpochDataLossNumber', 'type': 'str'}, - 'epoch_configuration_number': {'key': 'EpochConfigurationNumber', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FileVersion, self).__init__(**kwargs) - self.version_number = kwargs.get('version_number', None) - self.epoch_data_loss_number = kwargs.get('epoch_data_loss_number', None) - self.epoch_configuration_number = kwargs.get('epoch_configuration_number', None) - - -class FolderInfo(Model): - """Information about a image store folder. It includes how many files this - folder contains and its image store relative path. - - :param store_relative_path: The remote location within image store. This - path is relative to the image store root. - :type store_relative_path: str - :param file_count: The number of files from within the image store folder. - :type file_count: str - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'file_count': {'key': 'FileCount', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FolderInfo, self).__init__(**kwargs) - self.store_relative_path = kwargs.get('store_relative_path', None) - self.file_count = kwargs.get('file_count', None) - - -class FolderSizeInfo(Model): - """Information of a image store folder size. - - :param store_relative_path: The remote location within image store. This - path is relative to the image store root. - :type store_relative_path: str - :param folder_size: The size of folder in bytes. - :type folder_size: str - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'folder_size': {'key': 'FolderSize', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FolderSizeInfo, self).__init__(**kwargs) - self.store_relative_path = kwargs.get('store_relative_path', None) - self.folder_size = kwargs.get('folder_size', None) - - -class FrequencyBasedBackupScheduleDescription(BackupScheduleDescription): - """Describes the frequency based backup schedule. - - All required parameters must be populated in order to send to Azure. - - :param schedule_kind: Required. Constant filled by server. - :type schedule_kind: str - :param interval: Required. Defines the interval with which backups are - periodically taken. It should be specified in ISO8601 format. Timespan in - seconds is not supported and will be ignored while creating the policy. - :type interval: timedelta - """ - - _validation = { - 'schedule_kind': {'required': True}, - 'interval': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - 'interval': {'key': 'Interval', 'type': 'duration'}, - } - - def __init__(self, **kwargs): - super(FrequencyBasedBackupScheduleDescription, self).__init__(**kwargs) - self.interval = kwargs.get('interval', None) - self.schedule_kind = 'FrequencyBased' - - -class GatewayDestination(Model): - """Describes destination endpoint for routing traffic. - - All required parameters must be populated in order to send to Azure. - - :param application_name: Required. Name of the service fabric Mesh - application. - :type application_name: str - :param service_name: Required. service that contains the endpoint. - :type service_name: str - :param endpoint_name: Required. name of the endpoint in the service. - :type endpoint_name: str - """ - - _validation = { - 'application_name': {'required': True}, - 'service_name': {'required': True}, - 'endpoint_name': {'required': True}, - } - - _attribute_map = { - 'application_name': {'key': 'applicationName', 'type': 'str'}, - 'service_name': {'key': 'serviceName', 'type': 'str'}, - 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GatewayDestination, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.service_name = kwargs.get('service_name', None) - self.endpoint_name = kwargs.get('endpoint_name', None) - - -class GatewayResourceDescription(Model): - """This type describes a gateway resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Gateway resource. - :type name: str - :param description: User readable description of the gateway. - :type description: str - :param source_network: Required. Network the gateway should listen on for - requests. - :type source_network: ~azure.servicefabric.models.NetworkRef - :param destination_network: Required. Network that the Application is - using. - :type destination_network: ~azure.servicefabric.models.NetworkRef - :param tcp: Configuration for tcp connectivity for this gateway. - :type tcp: list[~azure.servicefabric.models.TcpConfig] - :param http: Configuration for http connectivity for this gateway. - :type http: list[~azure.servicefabric.models.HttpConfig] - :ivar status: Status of the resource. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the gateway. - :vartype status_details: str - :ivar ip_address: IP address of the gateway. This is populated in the - response and is ignored for incoming requests. - :vartype ip_address: str - """ - - _validation = { - 'name': {'required': True}, - 'source_network': {'required': True}, - 'destination_network': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'ip_address': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'source_network': {'key': 'properties.sourceNetwork', 'type': 'NetworkRef'}, - 'destination_network': {'key': 'properties.destinationNetwork', 'type': 'NetworkRef'}, - 'tcp': {'key': 'properties.tcp', 'type': '[TcpConfig]'}, - 'http': {'key': 'properties.http', 'type': '[HttpConfig]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GatewayResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) - self.source_network = kwargs.get('source_network', None) - self.destination_network = kwargs.get('destination_network', None) - self.tcp = kwargs.get('tcp', None) - self.http = kwargs.get('http', None) - self.status = None - self.status_details = None - self.ip_address = None - - -class GetBackupByStorageQueryDescription(Model): - """Describes additional filters to be applied, while listing backups, and - backup storage details from where to fetch the backups. - - All required parameters must be populated in order to send to Azure. - - :param start_date_time_filter: Specifies the start date time in ISO8601 - from which to enumerate backups. If not specified, backups are enumerated - from the beginning. - :type start_date_time_filter: datetime - :param end_date_time_filter: Specifies the end date time in ISO8601 till - which to enumerate backups. If not specified, backups are enumerated till - the end. - :type end_date_time_filter: datetime - :param latest: If specified as true, gets the most recent backup (within - the specified time range) for every partition under the specified backup - entity. Default value: False . - :type latest: bool - :param storage: Required. Describes the parameters for the backup storage - from where to enumerate backups. This is optional and by default backups - are enumerated from the backup storage where this backup entity is - currently being backed up (as specified in backup policy). This parameter - is useful to be able to enumerate backups from another cluster where you - may intend to restore. - :type storage: ~azure.servicefabric.models.BackupStorageDescription - :param backup_entity: Required. Indicates the entity for which to - enumerate backups. - :type backup_entity: ~azure.servicefabric.models.BackupEntity - """ - - _validation = { - 'storage': {'required': True}, - 'backup_entity': {'required': True}, - } - - _attribute_map = { - 'start_date_time_filter': {'key': 'StartDateTimeFilter', 'type': 'iso-8601'}, - 'end_date_time_filter': {'key': 'EndDateTimeFilter', 'type': 'iso-8601'}, - 'latest': {'key': 'Latest', 'type': 'bool'}, - 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, - 'backup_entity': {'key': 'BackupEntity', 'type': 'BackupEntity'}, - } - - def __init__(self, **kwargs): - super(GetBackupByStorageQueryDescription, self).__init__(**kwargs) - self.start_date_time_filter = kwargs.get('start_date_time_filter', None) - self.end_date_time_filter = kwargs.get('end_date_time_filter', None) - self.latest = kwargs.get('latest', False) - self.storage = kwargs.get('storage', None) - self.backup_entity = kwargs.get('backup_entity', None) - - -class GetPropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that gets the specified property if it - exists. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param include_value: Whether or not to return the property value with the - metadata. - True if values should be returned with the metadata; False to return only - property metadata. Default value: False . - :type include_value: bool - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'include_value': {'key': 'IncludeValue', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(GetPropertyBatchOperation, self).__init__(**kwargs) - self.include_value = kwargs.get('include_value', False) - self.kind = 'Get' - - -class GuidPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Guid. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. The data of the property value. - :type data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GuidPropertyValue, self).__init__(**kwargs) - self.data = kwargs.get('data', None) - self.kind = 'Guid' - - -class HealthEvaluationWrapper(Model): - """Wrapper object for health evaluation. - - :param health_evaluation: Represents a health evaluation which describes - the data and the algorithm used by health manager to evaluate the health - of an entity. - :type health_evaluation: ~azure.servicefabric.models.HealthEvaluation - """ - - _attribute_map = { - 'health_evaluation': {'key': 'HealthEvaluation', 'type': 'HealthEvaluation'}, - } - - def __init__(self, **kwargs): - super(HealthEvaluationWrapper, self).__init__(**kwargs) - self.health_evaluation = kwargs.get('health_evaluation', None) - - -class HealthInformation(Model): - """Represents common health report information. It is included in all health - reports sent to health store and in all health events returned by health - queries. - - All required parameters must be populated in order to send to Azure. - - :param source_id: Required. The source name that identifies the - client/watchdog/system component that generated the health information. - :type source_id: str - :param property: Required. The property of the health information. An - entity can have health reports for different properties. - The property is a string and not a fixed enumeration to allow the reporter - flexibility to categorize the state condition that triggers the report. - For example, a reporter with SourceId "LocalWatchdog" can monitor the - state of the available disk on a node, - so it can report "AvailableDisk" property on that node. - The same reporter can monitor the node connectivity, so it can report a - property "Connectivity" on the same node. - In the health store, these reports are treated as separate health events - for the specified node. - Together with the SourceId, the property uniquely identifies the health - information. - :type property: str - :param health_state: Required. The health state of a Service Fabric entity - such as Cluster, Node, Application, Service, Partition, Replica etc. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param time_to_live_in_milli_seconds: The duration for which this health - report is valid. This field uses ISO8601 format for specifying the - duration. - When clients report periodically, they should send reports with higher - frequency than time to live. - If clients report on transition, they can set the time to live to - infinite. - When time to live expires, the health event that contains the health - information - is either removed from health store, if RemoveWhenExpired is true, or - evaluated at error, if RemoveWhenExpired false. - If not specified, time to live defaults to infinite value. - :type time_to_live_in_milli_seconds: timedelta - :param description: The description of the health information. It - represents free text used to add human readable information about the - report. - The maximum string length for the description is 4096 characters. - If the provided string is longer, it will be automatically truncated. - When truncated, the last characters of the description contain a marker - "[Truncated]", and total string size is 4096 characters. - The presence of the marker indicates to users that truncation occurred. - Note that when truncated, the description has less than 4096 characters - from the original string. - :type description: str - :param sequence_number: The sequence number for this health report as a - numeric string. - The report sequence number is used by the health store to detect stale - reports. - If not specified, a sequence number is auto-generated by the health client - when a report is added. - :type sequence_number: str - :param remove_when_expired: Value that indicates whether the report is - removed from health store when it expires. - If set to true, the report is removed from the health store after it - expires. - If set to false, the report is treated as an error when expired. The value - of this property is false by default. - When clients report periodically, they should set RemoveWhenExpired false - (default). - This way, if the reporter has issues (e.g. deadlock) and can't report, the - entity is evaluated at error when the health report expires. - This flags the entity as being in Error health state. - :type remove_when_expired: bool - :param health_report_id: A health report ID which identifies the health - report and can be used to find more detailed information about a specific - health event at - aka.ms/sfhealthid - :type health_report_id: str - """ - - _validation = { - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - } - - _attribute_map = { - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HealthInformation, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_in_milli_seconds = kwargs.get('time_to_live_in_milli_seconds', None) - self.description = kwargs.get('description', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.health_report_id = kwargs.get('health_report_id', None) - - -class HealthEvent(HealthInformation): - """Represents health information reported on a health entity, such as cluster, - application or node, with additional metadata added by the Health Manager. - - All required parameters must be populated in order to send to Azure. - - :param source_id: Required. The source name that identifies the - client/watchdog/system component that generated the health information. - :type source_id: str - :param property: Required. The property of the health information. An - entity can have health reports for different properties. - The property is a string and not a fixed enumeration to allow the reporter - flexibility to categorize the state condition that triggers the report. - For example, a reporter with SourceId "LocalWatchdog" can monitor the - state of the available disk on a node, - so it can report "AvailableDisk" property on that node. - The same reporter can monitor the node connectivity, so it can report a - property "Connectivity" on the same node. - In the health store, these reports are treated as separate health events - for the specified node. - Together with the SourceId, the property uniquely identifies the health - information. - :type property: str - :param health_state: Required. The health state of a Service Fabric entity - such as Cluster, Node, Application, Service, Partition, Replica etc. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param time_to_live_in_milli_seconds: The duration for which this health - report is valid. This field uses ISO8601 format for specifying the - duration. - When clients report periodically, they should send reports with higher - frequency than time to live. - If clients report on transition, they can set the time to live to - infinite. - When time to live expires, the health event that contains the health - information - is either removed from health store, if RemoveWhenExpired is true, or - evaluated at error, if RemoveWhenExpired false. - If not specified, time to live defaults to infinite value. - :type time_to_live_in_milli_seconds: timedelta - :param description: The description of the health information. It - represents free text used to add human readable information about the - report. - The maximum string length for the description is 4096 characters. - If the provided string is longer, it will be automatically truncated. - When truncated, the last characters of the description contain a marker - "[Truncated]", and total string size is 4096 characters. - The presence of the marker indicates to users that truncation occurred. - Note that when truncated, the description has less than 4096 characters - from the original string. - :type description: str - :param sequence_number: The sequence number for this health report as a - numeric string. - The report sequence number is used by the health store to detect stale - reports. - If not specified, a sequence number is auto-generated by the health client - when a report is added. - :type sequence_number: str - :param remove_when_expired: Value that indicates whether the report is - removed from health store when it expires. - If set to true, the report is removed from the health store after it - expires. - If set to false, the report is treated as an error when expired. The value - of this property is false by default. - When clients report periodically, they should set RemoveWhenExpired false - (default). - This way, if the reporter has issues (e.g. deadlock) and can't report, the - entity is evaluated at error when the health report expires. - This flags the entity as being in Error health state. - :type remove_when_expired: bool - :param health_report_id: A health report ID which identifies the health - report and can be used to find more detailed information about a specific - health event at - aka.ms/sfhealthid - :type health_report_id: str - :param is_expired: Returns true if the health event is expired, otherwise - false. - :type is_expired: bool - :param source_utc_timestamp: The date and time when the health report was - sent by the source. - :type source_utc_timestamp: datetime - :param last_modified_utc_timestamp: The date and time when the health - report was last modified by the health store. - :type last_modified_utc_timestamp: datetime - :param last_ok_transition_at: If the current health state is 'Ok', this - property returns the time at which the health report was first reported - with 'Ok'. - For periodic reporting, many reports with the same state may have been - generated. - This property returns the date and time when the first 'Ok' health report - was received. - If the current health state is 'Error' or 'Warning', returns the date and - time at which the health state was last in 'Ok', before transitioning to a - different state. - If the health state was never 'Ok', the value will be zero date-time. - :type last_ok_transition_at: datetime - :param last_warning_transition_at: If the current health state is - 'Warning', this property returns the time at which the health report was - first reported with 'Warning'. For periodic reporting, many reports with - the same state may have been generated however, this property returns only - the date and time at the first 'Warning' health report was received. - If the current health state is 'Ok' or 'Error', returns the date and time - at which the health state was last in 'Warning', before transitioning to a - different state. - If the health state was never 'Warning', the value will be zero date-time. - :type last_warning_transition_at: datetime - :param last_error_transition_at: If the current health state is 'Error', - this property returns the time at which the health report was first - reported with 'Error'. For periodic reporting, many reports with the same - state may have been generated however, this property returns only the date - and time at the first 'Error' health report was received. - If the current health state is 'Ok' or 'Warning', returns the date and - time at which the health state was last in 'Error', before transitioning - to a different state. - If the health state was never 'Error', the value will be zero date-time. - :type last_error_transition_at: datetime - """ - - _validation = { - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - } - - _attribute_map = { - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, - 'is_expired': {'key': 'IsExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, - 'last_ok_transition_at': {'key': 'LastOkTransitionAt', 'type': 'iso-8601'}, - 'last_warning_transition_at': {'key': 'LastWarningTransitionAt', 'type': 'iso-8601'}, - 'last_error_transition_at': {'key': 'LastErrorTransitionAt', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(HealthEvent, self).__init__(**kwargs) - self.is_expired = kwargs.get('is_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.last_modified_utc_timestamp = kwargs.get('last_modified_utc_timestamp', None) - self.last_ok_transition_at = kwargs.get('last_ok_transition_at', None) - self.last_warning_transition_at = kwargs.get('last_warning_transition_at', None) - self.last_error_transition_at = kwargs.get('last_error_transition_at', None) - - -class HealthStateCount(Model): - """Represents information about how many health entities are in Ok, Warning - and Error health state. - - :param ok_count: The number of health entities with aggregated health - state Ok. - :type ok_count: long - :param warning_count: The number of health entities with aggregated health - state Warning. - :type warning_count: long - :param error_count: The number of health entities with aggregated health - state Error. - :type error_count: long - """ - - _validation = { - 'ok_count': {'minimum': 0}, - 'warning_count': {'minimum': 0}, - 'error_count': {'minimum': 0}, - } - - _attribute_map = { - 'ok_count': {'key': 'OkCount', 'type': 'long'}, - 'warning_count': {'key': 'WarningCount', 'type': 'long'}, - 'error_count': {'key': 'ErrorCount', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(HealthStateCount, self).__init__(**kwargs) - self.ok_count = kwargs.get('ok_count', None) - self.warning_count = kwargs.get('warning_count', None) - self.error_count = kwargs.get('error_count', None) - - -class HealthStatistics(Model): - """The health statistics of an entity, returned as part of the health query - result when the query description is configured to include statistics. - The statistics include health state counts for all children types of the - current entity. - For example, for cluster, the health statistics include health state counts - for nodes, applications, services, partitions, replicas, deployed - applications and deployed service packages. - For partition, the health statistics include health counts for replicas. - - :param health_state_count_list: List of health state counts per entity - kind, which keeps track of how many children of the queried entity are in - Ok, Warning and Error state. - :type health_state_count_list: - list[~azure.servicefabric.models.EntityKindHealthStateCount] - """ - - _attribute_map = { - 'health_state_count_list': {'key': 'HealthStateCountList', 'type': '[EntityKindHealthStateCount]'}, - } - - def __init__(self, **kwargs): - super(HealthStatistics, self).__init__(**kwargs) - self.health_state_count_list = kwargs.get('health_state_count_list', None) - - -class HttpConfig(Model): - """Describes the http configuration for external connectivity for this - network. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. http gateway config name. - :type name: str - :param port: Required. Specifies the port at which the service endpoint - below needs to be exposed. - :type port: int - :param hosts: Required. description for routing. - :type hosts: list[~azure.servicefabric.models.HttpHostConfig] - """ - - _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'hosts': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'hosts': {'key': 'hosts', 'type': '[HttpHostConfig]'}, - } - - def __init__(self, **kwargs): - super(HttpConfig, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.port = kwargs.get('port', None) - self.hosts = kwargs.get('hosts', None) - - -class HttpHostConfig(Model): - """Describes the hostname properties for http routing. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. http hostname config name. - :type name: str - :param routes: Required. Route information to use for routing. Routes are - processed in the order they are specified. Specify routes that are more - specific before routes that can handle general cases. - :type routes: list[~azure.servicefabric.models.HttpRouteConfig] - """ - - _validation = { - 'name': {'required': True}, - 'routes': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'routes': {'key': 'routes', 'type': '[HttpRouteConfig]'}, - } - - def __init__(self, **kwargs): - super(HttpHostConfig, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.routes = kwargs.get('routes', None) - - -class HttpRouteConfig(Model): - """Describes the hostname properties for http routing. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. http route name. - :type name: str - :param match: Required. Describes a rule for http route matching. - :type match: ~azure.servicefabric.models.HttpRouteMatchRule - :param destination: Required. Describes destination endpoint for routing - traffic. - :type destination: ~azure.servicefabric.models.GatewayDestination - """ - - _validation = { - 'name': {'required': True}, - 'match': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'match': {'key': 'match', 'type': 'HttpRouteMatchRule'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, - } - - def __init__(self, **kwargs): - super(HttpRouteConfig, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.match = kwargs.get('match', None) - self.destination = kwargs.get('destination', None) - - -class HttpRouteMatchHeader(Model): - """Describes header information for http route matching. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of header to match in request. - :type name: str - :param value: Value of header to match in request. - :type value: str - :param type: how to match header value. Possible values include: 'exact' - :type type: str or ~azure.servicefabric.models.HeaderMatchType - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HttpRouteMatchHeader, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - self.type = kwargs.get('type', None) - - -class HttpRouteMatchPath(Model): - """Path to match for routing. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. Uri path to match for request. - :type value: str - :param rewrite: replacement string for matched part of the Uri. - :type rewrite: str - :ivar type: Required. how to match value in the Uri. Default value: - "prefix" . - :vartype type: str - """ - - _validation = { - 'value': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'rewrite': {'key': 'rewrite', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "prefix" - - def __init__(self, **kwargs): - super(HttpRouteMatchPath, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.rewrite = kwargs.get('rewrite', None) - - -class HttpRouteMatchRule(Model): - """Describes a rule for http route matching. - - All required parameters must be populated in order to send to Azure. - - :param path: Required. Path to match for routing. - :type path: ~azure.servicefabric.models.HttpRouteMatchPath - :param headers: headers and their values to match in request. - :type headers: list[~azure.servicefabric.models.HttpRouteMatchHeader] - """ - - _validation = { - 'path': {'required': True}, - } - - _attribute_map = { - 'path': {'key': 'path', 'type': 'HttpRouteMatchPath'}, - 'headers': {'key': 'headers', 'type': '[HttpRouteMatchHeader]'}, - } - - def __init__(self, **kwargs): - super(HttpRouteMatchRule, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.headers = kwargs.get('headers', None) - - -class IdentityDescription(Model): - """Information describing the identities associated with this application. - - All required parameters must be populated in order to send to Azure. - - :param token_service_endpoint: the endpoint for the token service managing - this identity - :type token_service_endpoint: str - :param type: Required. the types of identities associated with this - resource; currently restricted to 'SystemAssigned and UserAssigned' - :type type: str - :param tenant_id: the identifier of the tenant containing the - application's identity. - :type tenant_id: str - :param principal_id: the object identifier of the Service Principal of the - identity associated with this resource. - :type principal_id: str - :param user_assigned_identities: represents user assigned identities map. - :type user_assigned_identities: dict[str, - ~azure.servicefabric.models.IdentityItemDescription] - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'token_service_endpoint': {'key': 'tokenServiceEndpoint', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{IdentityItemDescription}'}, - } - - def __init__(self, **kwargs): - super(IdentityDescription, self).__init__(**kwargs) - self.token_service_endpoint = kwargs.get('token_service_endpoint', None) - self.type = kwargs.get('type', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.principal_id = kwargs.get('principal_id', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - - -class IdentityItemDescription(Model): - """Describes a single user-assigned identity associated with the application. - - :param principal_id: the object identifier of the Service Principal which - this identity represents. - :type principal_id: str - :param client_id: the client identifier of the Service Principal which - this identity represents. - :type client_id: str - """ - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IdentityItemDescription, self).__init__(**kwargs) - self.principal_id = kwargs.get('principal_id', None) - self.client_id = kwargs.get('client_id', None) - - -class ImageRegistryCredential(Model): - """Image registry credential. - - All required parameters must be populated in order to send to Azure. - - :param server: Required. Docker image registry server, without protocol - such as `http` and `https`. - :type server: str - :param username: Required. The username for the private registry. - :type username: str - :param password_type: The type of the image registry password being given - in password. Possible values include: 'ClearText', 'KeyVaultReference', - 'SecretValueReference'. Default value: "ClearText" . - :type password_type: str or - ~azure.servicefabric.models.ImageRegistryPasswordType - :param password: The password for the private registry. The password is - required for create or update operations, however it is not returned in - the get or list operations. Will be processed based on the type provided. - :type password: str - """ - - _validation = { - 'server': {'required': True}, - 'username': {'required': True}, - } - - _attribute_map = { - 'server': {'key': 'server', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password_type': {'key': 'passwordType', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageRegistryCredential, self).__init__(**kwargs) - self.server = kwargs.get('server', None) - self.username = kwargs.get('username', None) - self.password_type = kwargs.get('password_type', "ClearText") - self.password = kwargs.get('password', None) - - -class ImageStoreContent(Model): - """Information about the image store content. - - :param store_files: The list of image store file info objects represents - files found under the given image store relative path. - :type store_files: list[~azure.servicefabric.models.FileInfo] - :param store_folders: The list of image store folder info objects - represents subfolders found under the given image store relative path. - :type store_folders: list[~azure.servicefabric.models.FolderInfo] - """ - - _attribute_map = { - 'store_files': {'key': 'StoreFiles', 'type': '[FileInfo]'}, - 'store_folders': {'key': 'StoreFolders', 'type': '[FolderInfo]'}, - } - - def __init__(self, **kwargs): - super(ImageStoreContent, self).__init__(**kwargs) - self.store_files = kwargs.get('store_files', None) - self.store_folders = kwargs.get('store_folders', None) - - -class ImageStoreCopyDescription(Model): - """Information about how to copy image store content from one image store - relative path to another image store relative path. - - All required parameters must be populated in order to send to Azure. - - :param remote_source: Required. The relative path of source image store - content to be copied from. - :type remote_source: str - :param remote_destination: Required. The relative path of destination - image store content to be copied to. - :type remote_destination: str - :param skip_files: The list of the file names to be skipped for copying. - :type skip_files: list[str] - :param check_mark_file: Indicates whether to check mark file during - copying. The property is true if checking mark file is required, false - otherwise. The mark file is used to check whether the folder is well - constructed. If the property is true and mark file does not exist, the - copy is skipped. - :type check_mark_file: bool - """ - - _validation = { - 'remote_source': {'required': True}, - 'remote_destination': {'required': True}, - } - - _attribute_map = { - 'remote_source': {'key': 'RemoteSource', 'type': 'str'}, - 'remote_destination': {'key': 'RemoteDestination', 'type': 'str'}, - 'skip_files': {'key': 'SkipFiles', 'type': '[str]'}, - 'check_mark_file': {'key': 'CheckMarkFile', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ImageStoreCopyDescription, self).__init__(**kwargs) - self.remote_source = kwargs.get('remote_source', None) - self.remote_destination = kwargs.get('remote_destination', None) - self.skip_files = kwargs.get('skip_files', None) - self.check_mark_file = kwargs.get('check_mark_file', None) - - -class ImageStoreInfo(Model): - """Information about the ImageStore's resource usage. - - :param disk_info: disk capacity and available disk space on the node where - the ImageStore primary is placed. - :type disk_info: ~azure.servicefabric.models.DiskInfo - :param used_by_metadata: the ImageStore's file system usage for metadata. - :type used_by_metadata: ~azure.servicefabric.models.UsageInfo - :param used_by_staging: The ImageStore's file system usage for staging - files that are being uploaded. - :type used_by_staging: ~azure.servicefabric.models.UsageInfo - :param used_by_copy: the ImageStore's file system usage for copied - application and cluster packages. [Removing application and cluster - packages](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-deleteimagestorecontent) - will free up this space. - :type used_by_copy: ~azure.servicefabric.models.UsageInfo - :param used_by_register: the ImageStore's file system usage for registered - and cluster packages. [Unregistering - application](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) - and [cluster - packages](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) - will free up this space. - :type used_by_register: ~azure.servicefabric.models.UsageInfo - """ - - _attribute_map = { - 'disk_info': {'key': 'DiskInfo', 'type': 'DiskInfo'}, - 'used_by_metadata': {'key': 'UsedByMetadata', 'type': 'UsageInfo'}, - 'used_by_staging': {'key': 'UsedByStaging', 'type': 'UsageInfo'}, - 'used_by_copy': {'key': 'UsedByCopy', 'type': 'UsageInfo'}, - 'used_by_register': {'key': 'UsedByRegister', 'type': 'UsageInfo'}, - } - - def __init__(self, **kwargs): - super(ImageStoreInfo, self).__init__(**kwargs) - self.disk_info = kwargs.get('disk_info', None) - self.used_by_metadata = kwargs.get('used_by_metadata', None) - self.used_by_staging = kwargs.get('used_by_staging', None) - self.used_by_copy = kwargs.get('used_by_copy', None) - self.used_by_register = kwargs.get('used_by_register', None) - - -class SecretResourcePropertiesBase(Model): - """This type describes the properties of a secret resource, including its - kind. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SecretResourceProperties - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'SecretResourceProperties': 'SecretResourceProperties'} - } - - def __init__(self, **kwargs): - super(SecretResourcePropertiesBase, self).__init__(**kwargs) - self.kind = None - - -class SecretResourceProperties(SecretResourcePropertiesBase): - """Describes the properties of a secret resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: InlinedValueSecretResourceProperties - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param description: User readable description of the secret. - :type description: str - :ivar status: Status of the resource. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the secret. - :vartype status_details: str - :param content_type: The type of the content stored in the secret value. - The value of this property is opaque to Service Fabric. Once set, the - value of this property cannot be changed. - :type content_type: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'inlinedValue': 'InlinedValueSecretResourceProperties'} - } - - def __init__(self, **kwargs): - super(SecretResourceProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.status = None - self.status_details = None - self.content_type = kwargs.get('content_type', None) - self.kind = 'SecretResourceProperties' - - -class InlinedValueSecretResourceProperties(SecretResourceProperties): - """Describes the properties of a secret resource whose value is provided - explicitly as plaintext. The secret resource may have multiple values, each - being uniquely versioned. The secret value of each version is stored - encrypted, and delivered as plaintext into the context of applications - referencing it. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param description: User readable description of the secret. - :type description: str - :ivar status: Status of the resource. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the secret. - :vartype status_details: str - :param content_type: The type of the content stored in the secret value. - The value of this property is opaque to Service Fabric. Once set, the - value of this property cannot be changed. - :type content_type: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InlinedValueSecretResourceProperties, self).__init__(**kwargs) - self.kind = 'inlinedValue' - - -class InstanceLifecycleDescription(Model): - """Describes how the instance will behave. - - :param restore_replica_location_after_upgrade: If set to true, move/swap - replica to original location after upgrade. - :type restore_replica_location_after_upgrade: bool - """ - - _attribute_map = { - 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(InstanceLifecycleDescription, self).__init__(**kwargs) - self.restore_replica_location_after_upgrade = kwargs.get('restore_replica_location_after_upgrade', None) - - -class Int64PropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Int64. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. The data of the property value. - :type data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Int64PropertyValue, self).__init__(**kwargs) - self.data = kwargs.get('data', None) - self.kind = 'Int64' - - -class PartitionInformation(Model): - """Information about the partition identity, partitioning scheme and keys - supported by it. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Int64RangePartitionInformation, NamedPartitionInformation, - SingletonPartitionInformation - - All required parameters must be populated in order to send to Azure. - - :param id: An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. - The partition ID is unique and does not change for the lifetime of the - service. If the same service was deleted and recreated the IDs of its - partitions would be different. - :type id: str - :param service_partition_kind: Required. Constant filled by server. - :type service_partition_kind: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_partition_kind': {'Int64Range': 'Int64RangePartitionInformation', 'Named': 'NamedPartitionInformation', 'Singleton': 'SingletonPartitionInformation'} - } - - def __init__(self, **kwargs): - super(PartitionInformation, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.service_partition_kind = None - - -class Int64RangePartitionInformation(PartitionInformation): - """Describes the partition information for the integer range that is based on - partition schemes. - - All required parameters must be populated in order to send to Azure. - - :param id: An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. - The partition ID is unique and does not change for the lifetime of the - service. If the same service was deleted and recreated the IDs of its - partitions would be different. - :type id: str - :param service_partition_kind: Required. Constant filled by server. - :type service_partition_kind: str - :param low_key: Specifies the minimum key value handled by this partition. - :type low_key: str - :param high_key: Specifies the maximum key value handled by this - partition. - :type high_key: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Int64RangePartitionInformation, self).__init__(**kwargs) - self.low_key = kwargs.get('low_key', None) - self.high_key = kwargs.get('high_key', None) - self.service_partition_kind = 'Int64Range' - - -class InvokeDataLossResult(Model): - """Represents information about an operation in a terminal state (Completed or - Faulted). - - :param error_code: If OperationState is Completed, this is 0. If - OperationState is Faulted, this is an error code indicating the reason. - :type error_code: int - :param selected_partition: This class returns information about the - partition that the user-induced operation acted upon. - :type selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__(self, **kwargs): - super(InvokeDataLossResult, self).__init__(**kwargs) - self.error_code = kwargs.get('error_code', None) - self.selected_partition = kwargs.get('selected_partition', None) - - -class InvokeQuorumLossResult(Model): - """Represents information about an operation in a terminal state (Completed or - Faulted). - - :param error_code: If OperationState is Completed, this is 0. If - OperationState is Faulted, this is an error code indicating the reason. - :type error_code: int - :param selected_partition: This class returns information about the - partition that the user-induced operation acted upon. - :type selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__(self, **kwargs): - super(InvokeQuorumLossResult, self).__init__(**kwargs) - self.error_code = kwargs.get('error_code', None) - self.selected_partition = kwargs.get('selected_partition', None) - - -class ReplicaStatusBase(Model): - """Information about the replica. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: KeyValueStoreReplicaStatus - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'KeyValueStore': 'KeyValueStoreReplicaStatus'} - } - - def __init__(self, **kwargs): - super(ReplicaStatusBase, self).__init__(**kwargs) - self.kind = None - - -class KeyValueStoreReplicaStatus(ReplicaStatusBase): - """Key value store related information for the replica. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param database_row_count_estimate: Value indicating the estimated number - of rows in the underlying database. - :type database_row_count_estimate: str - :param database_logical_size_estimate: Value indicating the estimated size - of the underlying database. - :type database_logical_size_estimate: str - :param copy_notification_current_key_filter: Value indicating the latest - key-prefix filter applied to enumeration during the callback. Null if - there is no pending callback. - :type copy_notification_current_key_filter: str - :param copy_notification_current_progress: Value indicating the latest - number of keys enumerated during the callback. 0 if there is no pending - callback. - :type copy_notification_current_progress: str - :param status_details: Value indicating the current status details of the - replica. - :type status_details: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'database_row_count_estimate': {'key': 'DatabaseRowCountEstimate', 'type': 'str'}, - 'database_logical_size_estimate': {'key': 'DatabaseLogicalSizeEstimate', 'type': 'str'}, - 'copy_notification_current_key_filter': {'key': 'CopyNotificationCurrentKeyFilter', 'type': 'str'}, - 'copy_notification_current_progress': {'key': 'CopyNotificationCurrentProgress', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyValueStoreReplicaStatus, self).__init__(**kwargs) - self.database_row_count_estimate = kwargs.get('database_row_count_estimate', None) - self.database_logical_size_estimate = kwargs.get('database_logical_size_estimate', None) - self.copy_notification_current_key_filter = kwargs.get('copy_notification_current_key_filter', None) - self.copy_notification_current_progress = kwargs.get('copy_notification_current_progress', None) - self.status_details = kwargs.get('status_details', None) - self.kind = 'KeyValueStore' - - -class LoadedPartitionInformationQueryDescription(Model): - """Represents data structure that contains query information. - - :param metric_name: Name of the metric for which this information is - provided. - :type metric_name: str - :param service_name: Name of the service this partition belongs to. - :type service_name: str - :param ordering: Ordering of partitions' load. Possible values include: - 'Desc', 'Asc'. Default value: "Desc" . - :type ordering: str or ~azure.servicefabric.models.Ordering - :param max_results: The maximum number of results to be returned as part - of the paged queries. This parameter defines the upper bound on the number - of results returned. The results returned can be less than the specified - maximum results if they do not fit in the message as per the max message - size restrictions defined in the configuration. If this parameter is zero - or not specified, the paged query includes as many results as possible - that fit in the return message. - :type max_results: long - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - """ - - _attribute_map = { - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'ordering': {'key': 'Ordering', 'type': 'str'}, - 'max_results': {'key': 'MaxResults', 'type': 'long'}, - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LoadedPartitionInformationQueryDescription, self).__init__(**kwargs) - self.metric_name = kwargs.get('metric_name', None) - self.service_name = kwargs.get('service_name', None) - self.ordering = kwargs.get('ordering', "Desc") - self.max_results = kwargs.get('max_results', None) - self.continuation_token = kwargs.get('continuation_token', None) - - -class LoadedPartitionInformationResult(Model): - """Represents partition information. - - All required parameters must be populated in order to send to Azure. - - :param service_name: Required. Name of the service this partition belongs - to. - :type service_name: str - :param partition_id: Required. Id of the partition. - :type partition_id: str - :param metric_name: Required. Name of the metric for which this - information is provided. - :type metric_name: str - :param load: Required. Load for metric. - :type load: long - """ - - _validation = { - 'service_name': {'required': True}, - 'partition_id': {'required': True}, - 'metric_name': {'required': True}, - 'load': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'load': {'key': 'Load', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(LoadedPartitionInformationResult, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.metric_name = kwargs.get('metric_name', None) - self.load = kwargs.get('load', None) - - -class LoadedPartitionInformationResultList(Model): - """Represents data structure that contains top/least loaded partitions for a - certain metric. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of application information. - :type items: - list[~azure.servicefabric.models.LoadedPartitionInformationResult] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[LoadedPartitionInformationResult]'}, - } - - def __init__(self, **kwargs): - super(LoadedPartitionInformationResultList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class LoadMetricInformation(Model): - """Represents data structure that contains load information for a certain - metric in a cluster. - - :param name: Name of the metric for which this load information is - provided. - :type name: str - :param is_balanced_before: Value that indicates whether the metrics is - balanced or not before resource balancer run - :type is_balanced_before: bool - :param is_balanced_after: Value that indicates whether the metrics is - balanced or not after resource balancer run. - :type is_balanced_after: bool - :param deviation_before: The standard average deviation of the metrics - before resource balancer run. - :type deviation_before: str - :param deviation_after: The standard average deviation of the metrics - after resource balancer run. - :type deviation_after: str - :param balancing_threshold: The balancing threshold for a certain metric. - :type balancing_threshold: str - :param action: The current action being taken with regard to this metric - :type action: str - :param activity_threshold: The Activity Threshold specified for this - metric in the system Cluster Manifest. - :type activity_threshold: str - :param cluster_capacity: The total cluster capacity for a given metric - :type cluster_capacity: str - :param cluster_load: The total cluster load. In future releases of Service - Fabric this parameter will be deprecated in favor of CurrentClusterLoad. - :type cluster_load: str - :param current_cluster_load: The total cluster load. - :type current_cluster_load: str - :param cluster_remaining_capacity: The remaining capacity for the metric - in the cluster. In future releases of Service Fabric this parameter will - be deprecated in favor of ClusterCapacityRemaining. - :type cluster_remaining_capacity: str - :param cluster_capacity_remaining: The remaining capacity for the metric - in the cluster. - :type cluster_capacity_remaining: str - :param is_cluster_capacity_violation: Indicates that the metric is - currently over capacity in the cluster. - :type is_cluster_capacity_violation: bool - :param node_buffer_percentage: The reserved percentage of total node - capacity for this metric. - :type node_buffer_percentage: str - :param cluster_buffered_capacity: Remaining capacity in the cluster - excluding the reserved space. In future releases of Service Fabric this - parameter will be deprecated in favor of BufferedClusterCapacityRemaining. - :type cluster_buffered_capacity: str - :param buffered_cluster_capacity_remaining: Remaining capacity in the - cluster excluding the reserved space. - :type buffered_cluster_capacity_remaining: str - :param cluster_remaining_buffered_capacity: The remaining percentage of - cluster total capacity for this metric. - :type cluster_remaining_buffered_capacity: str - :param min_node_load_value: The minimum load on any node for this metric. - In future releases of Service Fabric this parameter will be deprecated in - favor of MinimumNodeLoad. - :type min_node_load_value: str - :param minimum_node_load: The minimum load on any node for this metric. - :type minimum_node_load: str - :param min_node_load_node_id: The node id of the node with the minimum - load for this metric. - :type min_node_load_node_id: ~azure.servicefabric.models.NodeId - :param max_node_load_value: The maximum load on any node for this metric. - In future releases of Service Fabric this parameter will be deprecated in - favor of MaximumNodeLoad. - :type max_node_load_value: str - :param maximum_node_load: The maximum load on any node for this metric. - :type maximum_node_load: str - :param max_node_load_node_id: The node id of the node with the maximum - load for this metric. - :type max_node_load_node_id: ~azure.servicefabric.models.NodeId - :param planned_load_removal: This value represents the load of the - replicas that are planned to be removed in the future within the cluster. - This kind of load is reported for replicas that are currently being moving - to other nodes and for replicas that are currently being dropped but still - use the load on the source node. - :type planned_load_removal: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'is_balanced_before': {'key': 'IsBalancedBefore', 'type': 'bool'}, - 'is_balanced_after': {'key': 'IsBalancedAfter', 'type': 'bool'}, - 'deviation_before': {'key': 'DeviationBefore', 'type': 'str'}, - 'deviation_after': {'key': 'DeviationAfter', 'type': 'str'}, - 'balancing_threshold': {'key': 'BalancingThreshold', 'type': 'str'}, - 'action': {'key': 'Action', 'type': 'str'}, - 'activity_threshold': {'key': 'ActivityThreshold', 'type': 'str'}, - 'cluster_capacity': {'key': 'ClusterCapacity', 'type': 'str'}, - 'cluster_load': {'key': 'ClusterLoad', 'type': 'str'}, - 'current_cluster_load': {'key': 'CurrentClusterLoad', 'type': 'str'}, - 'cluster_remaining_capacity': {'key': 'ClusterRemainingCapacity', 'type': 'str'}, - 'cluster_capacity_remaining': {'key': 'ClusterCapacityRemaining', 'type': 'str'}, - 'is_cluster_capacity_violation': {'key': 'IsClusterCapacityViolation', 'type': 'bool'}, - 'node_buffer_percentage': {'key': 'NodeBufferPercentage', 'type': 'str'}, - 'cluster_buffered_capacity': {'key': 'ClusterBufferedCapacity', 'type': 'str'}, - 'buffered_cluster_capacity_remaining': {'key': 'BufferedClusterCapacityRemaining', 'type': 'str'}, - 'cluster_remaining_buffered_capacity': {'key': 'ClusterRemainingBufferedCapacity', 'type': 'str'}, - 'min_node_load_value': {'key': 'MinNodeLoadValue', 'type': 'str'}, - 'minimum_node_load': {'key': 'MinimumNodeLoad', 'type': 'str'}, - 'min_node_load_node_id': {'key': 'MinNodeLoadNodeId', 'type': 'NodeId'}, - 'max_node_load_value': {'key': 'MaxNodeLoadValue', 'type': 'str'}, - 'maximum_node_load': {'key': 'MaximumNodeLoad', 'type': 'str'}, - 'max_node_load_node_id': {'key': 'MaxNodeLoadNodeId', 'type': 'NodeId'}, - 'planned_load_removal': {'key': 'PlannedLoadRemoval', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LoadMetricInformation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.is_balanced_before = kwargs.get('is_balanced_before', None) - self.is_balanced_after = kwargs.get('is_balanced_after', None) - self.deviation_before = kwargs.get('deviation_before', None) - self.deviation_after = kwargs.get('deviation_after', None) - self.balancing_threshold = kwargs.get('balancing_threshold', None) - self.action = kwargs.get('action', None) - self.activity_threshold = kwargs.get('activity_threshold', None) - self.cluster_capacity = kwargs.get('cluster_capacity', None) - self.cluster_load = kwargs.get('cluster_load', None) - self.current_cluster_load = kwargs.get('current_cluster_load', None) - self.cluster_remaining_capacity = kwargs.get('cluster_remaining_capacity', None) - self.cluster_capacity_remaining = kwargs.get('cluster_capacity_remaining', None) - self.is_cluster_capacity_violation = kwargs.get('is_cluster_capacity_violation', None) - self.node_buffer_percentage = kwargs.get('node_buffer_percentage', None) - self.cluster_buffered_capacity = kwargs.get('cluster_buffered_capacity', None) - self.buffered_cluster_capacity_remaining = kwargs.get('buffered_cluster_capacity_remaining', None) - self.cluster_remaining_buffered_capacity = kwargs.get('cluster_remaining_buffered_capacity', None) - self.min_node_load_value = kwargs.get('min_node_load_value', None) - self.minimum_node_load = kwargs.get('minimum_node_load', None) - self.min_node_load_node_id = kwargs.get('min_node_load_node_id', None) - self.max_node_load_value = kwargs.get('max_node_load_value', None) - self.maximum_node_load = kwargs.get('maximum_node_load', None) - self.max_node_load_node_id = kwargs.get('max_node_load_node_id', None) - self.planned_load_removal = kwargs.get('planned_load_removal', None) - - -class LoadMetricReport(Model): - """Represents the load metric report which contains the time metric was - reported, its name and value. - - :param last_reported_utc: Gets the UTC time when the load was reported. - :type last_reported_utc: datetime - :param name: The name of the load metric. - :type name: str - :param value: The value of the load metric. In future releases of Service - Fabric this parameter will be deprecated in favor of CurrentValue. - :type value: str - :param current_value: The value of the load metric. - :type current_value: str - """ - - _attribute_map = { - 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - 'current_value': {'key': 'CurrentValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LoadMetricReport, self).__init__(**kwargs) - self.last_reported_utc = kwargs.get('last_reported_utc', None) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - self.current_value = kwargs.get('current_value', None) - - -class LoadMetricReportInfo(Model): - """Information about load reported by replica. - - :param name: The name of the metric. - :type name: str - :param value: The value of the load for the metric. In future releases of - Service Fabric this parameter will be deprecated in favor of CurrentValue. - :type value: int - :param current_value: The double value of the load for the metric. - :type current_value: str - :param last_reported_utc: The UTC time when the load is reported. - :type last_reported_utc: datetime - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - 'current_value': {'key': 'CurrentValue', 'type': 'str'}, - 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(LoadMetricReportInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - self.current_value = kwargs.get('current_value', None) - self.last_reported_utc = kwargs.get('last_reported_utc', None) - - -class NetworkResourcePropertiesBase(Model): - """This type describes the properties of a network resource, including its - kind. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NetworkResourceProperties - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'NetworkResourceProperties': 'NetworkResourceProperties'} - } - - def __init__(self, **kwargs): - super(NetworkResourcePropertiesBase, self).__init__(**kwargs) - self.kind = None - - -class NetworkResourceProperties(NetworkResourcePropertiesBase): - """Describes properties of a network resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LocalNetworkResourceProperties - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param description: User readable description of the network. - :type description: str - :ivar status: Status of the network. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the network. - :vartype status_details: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Local': 'LocalNetworkResourceProperties'} - } - - def __init__(self, **kwargs): - super(NetworkResourceProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.status = None - self.status_details = None - self.kind = 'NetworkResourceProperties' - - -class LocalNetworkResourceProperties(NetworkResourceProperties): - """Information about a Service Fabric container network local to a single - Service Fabric cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param description: User readable description of the network. - :type description: str - :ivar status: Status of the network. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the network. - :vartype status_details: str - :param network_address_prefix: Address space for the local container - network. - :type network_address_prefix: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'network_address_prefix': {'key': 'networkAddressPrefix', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LocalNetworkResourceProperties, self).__init__(**kwargs) - self.network_address_prefix = kwargs.get('network_address_prefix', None) - self.kind = 'Local' - - -class ManagedApplicationIdentity(Model): - """Describes a managed application identity. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the identity. - :type name: str - :param principal_id: The identity's PrincipalId. - :type principal_id: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'principal_id': {'key': 'PrincipalId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedApplicationIdentity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.principal_id = kwargs.get('principal_id', None) - - -class ManagedApplicationIdentityDescription(Model): - """Managed application identity description. - - :param token_service_endpoint: Token service endpoint. - :type token_service_endpoint: str - :param managed_identities: A list of managed application identity objects. - :type managed_identities: - list[~azure.servicefabric.models.ManagedApplicationIdentity] - """ - - _attribute_map = { - 'token_service_endpoint': {'key': 'TokenServiceEndpoint', 'type': 'str'}, - 'managed_identities': {'key': 'ManagedIdentities', 'type': '[ManagedApplicationIdentity]'}, - } - - def __init__(self, **kwargs): - super(ManagedApplicationIdentityDescription, self).__init__(**kwargs) - self.token_service_endpoint = kwargs.get('token_service_endpoint', None) - self.managed_identities = kwargs.get('managed_identities', None) - - -class ManagedIdentityAzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Azure blob store (connected using managed - identity) used for storing and enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - :param managed_identity_type: Required. The type of managed identity to be - used to connect to Azure Blob Store via Managed Identity. Possible values - include: 'Invalid', 'VMSS', 'Cluster' - :type managed_identity_type: str or - ~azure.servicefabric.models.ManagedIdentityType - :param blob_service_uri: Required. The Blob Service Uri to connect to the - Azure blob store.. - :type blob_service_uri: str - :param container_name: Required. The name of the container in the blob - store to store and enumerate backups from. - :type container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'managed_identity_type': {'required': True}, - 'blob_service_uri': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'managed_identity_type': {'key': 'ManagedIdentityType', 'type': 'str'}, - 'blob_service_uri': {'key': 'BlobServiceUri', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedIdentityAzureBlobBackupStorageDescription, self).__init__(**kwargs) - self.managed_identity_type = kwargs.get('managed_identity_type', None) - self.blob_service_uri = kwargs.get('blob_service_uri', None) - self.container_name = kwargs.get('container_name', None) - self.storage_kind = 'ManagedIdentityAzureBlobStore' - - -class MetricLoadDescription(Model): - """Specifies metric load information. - - :param metric_name: The name of the reported metric. - :type metric_name: str - :param current_load: The current value of the metric load. - :type current_load: long - :param predicted_load: The predicted value of the metric load. - :type predicted_load: long - """ - - _attribute_map = { - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'current_load': {'key': 'CurrentLoad', 'type': 'long'}, - 'predicted_load': {'key': 'PredictedLoad', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(MetricLoadDescription, self).__init__(**kwargs) - self.metric_name = kwargs.get('metric_name', None) - self.current_load = kwargs.get('current_load', None) - self.predicted_load = kwargs.get('predicted_load', None) - - -class MonitoringPolicyDescription(Model): - """Describes the parameters for monitoring an upgrade in Monitored mode. - - :param failure_action: The compensating action to perform when a Monitored - upgrade encounters monitoring policy or health policy violations. - Invalid indicates the failure action is invalid. Rollback specifies that - the upgrade will start rolling back automatically. - Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - mode. Possible values include: 'Invalid', 'Rollback', 'Manual' - :type failure_action: str or ~azure.servicefabric.models.FailureAction - :param health_check_wait_duration_in_milliseconds: The amount of time to - wait after completing an upgrade domain before applying health policies. - It is first interpreted as a string representing an ISO 8601 duration. If - that fails, then it is interpreted as a number representing the total - number of milliseconds. - :type health_check_wait_duration_in_milliseconds: str - :param health_check_stable_duration_in_milliseconds: The amount of time - that the application or cluster must remain healthy before the upgrade - proceeds to the next upgrade domain. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type health_check_stable_duration_in_milliseconds: str - :param health_check_retry_timeout_in_milliseconds: The amount of time to - retry health evaluation when the application or cluster is unhealthy - before FailureAction is executed. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type health_check_retry_timeout_in_milliseconds: str - :param upgrade_timeout_in_milliseconds: The amount of time the overall - upgrade has to complete before FailureAction is executed. It is first - interpreted as a string representing an ISO 8601 duration. If that fails, - then it is interpreted as a number representing the total number of - milliseconds. - :type upgrade_timeout_in_milliseconds: str - :param upgrade_domain_timeout_in_milliseconds: The amount of time each - upgrade domain has to complete before FailureAction is executed. It is - first interpreted as a string representing an ISO 8601 duration. If that - fails, then it is interpreted as a number representing the total number of - milliseconds. - :type upgrade_domain_timeout_in_milliseconds: str - """ - - _attribute_map = { - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, - 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, - 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MonitoringPolicyDescription, self).__init__(**kwargs) - self.failure_action = kwargs.get('failure_action', None) - self.health_check_wait_duration_in_milliseconds = kwargs.get('health_check_wait_duration_in_milliseconds', None) - self.health_check_stable_duration_in_milliseconds = kwargs.get('health_check_stable_duration_in_milliseconds', None) - self.health_check_retry_timeout_in_milliseconds = kwargs.get('health_check_retry_timeout_in_milliseconds', None) - self.upgrade_timeout_in_milliseconds = kwargs.get('upgrade_timeout_in_milliseconds', None) - self.upgrade_domain_timeout_in_milliseconds = kwargs.get('upgrade_domain_timeout_in_milliseconds', None) - - -class NameDescription(Model): - """Describes a Service Fabric name. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The Service Fabric name, including the 'fabric:' - URI scheme. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class NamedPartitionInformation(PartitionInformation): - """Describes the partition information for the name as a string that is based - on partition schemes. - - All required parameters must be populated in order to send to Azure. - - :param id: An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. - The partition ID is unique and does not change for the lifetime of the - service. If the same service was deleted and recreated the IDs of its - partitions would be different. - :type id: str - :param service_partition_kind: Required. Constant filled by server. - :type service_partition_kind: str - :param name: Name of the partition. - :type name: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NamedPartitionInformation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.service_partition_kind = 'Named' - - -class PartitionSchemeDescription(Model): - """Describes how the service is partitioned. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NamedPartitionSchemeDescription, - SingletonPartitionSchemeDescription, - UniformInt64RangePartitionSchemeDescription - - All required parameters must be populated in order to send to Azure. - - :param partition_scheme: Required. Constant filled by server. - :type partition_scheme: str - """ - - _validation = { - 'partition_scheme': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - } - - _subtype_map = { - 'partition_scheme': {'Named': 'NamedPartitionSchemeDescription', 'Singleton': 'SingletonPartitionSchemeDescription', 'UniformInt64Range': 'UniformInt64RangePartitionSchemeDescription'} - } - - def __init__(self, **kwargs): - super(PartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = None - - -class NamedPartitionSchemeDescription(PartitionSchemeDescription): - """Describes the named partition scheme of the service. - - All required parameters must be populated in order to send to Azure. - - :param partition_scheme: Required. Constant filled by server. - :type partition_scheme: str - :param count: Required. The number of partitions. - :type count: int - :param names: Required. Array of size specified by the ‘Count’ parameter, - for the names of the partitions. - :type names: list[str] - """ - - _validation = { - 'partition_scheme': {'required': True}, - 'count': {'required': True}, - 'names': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'names': {'key': 'Names', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(NamedPartitionSchemeDescription, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.names = kwargs.get('names', None) - self.partition_scheme = 'Named' - - -class NetworkRef(Model): - """Describes a network reference in a service. - - :param name: Name of the network - :type name: str - :param endpoint_refs: A list of endpoints that are exposed on this - network. - :type endpoint_refs: list[~azure.servicefabric.models.EndpointRef] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'endpoint_refs': {'key': 'endpointRefs', 'type': '[EndpointRef]'}, - } - - def __init__(self, **kwargs): - super(NetworkRef, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.endpoint_refs = kwargs.get('endpoint_refs', None) - - -class NetworkResourceDescription(Model): - """This type describes a network resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Network resource. - :type name: str - :param properties: Required. Describes properties of a network resource. - :type properties: ~azure.servicefabric.models.NetworkResourceProperties - """ - - _validation = { - 'name': {'required': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'NetworkResourceProperties'}, - } - - def __init__(self, **kwargs): - super(NetworkResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.properties = kwargs.get('properties', None) - - -class NodeAbortedEvent(NodeEvent): - """Node Aborted event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_id: Required. Id of Node. - :type node_id: str - :param upgrade_domain: Required. Upgrade domain of Node. - :type upgrade_domain: str - :param fault_domain: Required. Fault domain of Node. - :type fault_domain: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param hostname: Required. Name of Host. - :type hostname: str - :param is_seed_node: Required. Indicates if it is seed node. - :type is_seed_node: bool - :param node_version: Required. Version of Node. - :type node_version: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeAbortedEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.node_id = kwargs.get('node_id', None) - self.upgrade_domain = kwargs.get('upgrade_domain', None) - self.fault_domain = kwargs.get('fault_domain', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.hostname = kwargs.get('hostname', None) - self.is_seed_node = kwargs.get('is_seed_node', None) - self.node_version = kwargs.get('node_version', None) - self.kind = 'NodeAborted' - - -class NodeAddedToClusterEvent(NodeEvent): - """Node Added event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_id: Required. Id of Node. - :type node_id: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_type: Required. Type of Node. - :type node_type: str - :param fabric_version: Required. Fabric version. - :type fabric_version: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param node_capacities: Required. Capacities. - :type node_capacities: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'node_type': {'required': True}, - 'fabric_version': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'node_capacities': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_type': {'key': 'NodeType', 'type': 'str'}, - 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeAddedToClusterEvent, self).__init__(**kwargs) - self.node_id = kwargs.get('node_id', None) - self.node_instance = kwargs.get('node_instance', None) - self.node_type = kwargs.get('node_type', None) - self.fabric_version = kwargs.get('fabric_version', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.node_capacities = kwargs.get('node_capacities', None) - self.kind = 'NodeAddedToCluster' - - -class NodeClosedEvent(NodeEvent): - """Node Closed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_id: Required. Id of Node. - :type node_id: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param error: Required. Describes error. - :type error: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'error': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'error': {'key': 'Error', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeClosedEvent, self).__init__(**kwargs) - self.node_id = kwargs.get('node_id', None) - self.node_instance = kwargs.get('node_instance', None) - self.error = kwargs.get('error', None) - self.kind = 'NodeClosed' - - -class NodeDeactivateCompletedEvent(NodeEvent): - """Node Deactivate Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param effective_deactivate_intent: Required. Describes deactivate intent. - :type effective_deactivate_intent: str - :param batch_ids_with_deactivate_intent: Required. Batch Ids. - :type batch_ids_with_deactivate_intent: str - :param start_time: Required. Start time. - :type start_time: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'effective_deactivate_intent': {'required': True}, - 'batch_ids_with_deactivate_intent': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'effective_deactivate_intent': {'key': 'EffectiveDeactivateIntent', 'type': 'str'}, - 'batch_ids_with_deactivate_intent': {'key': 'BatchIdsWithDeactivateIntent', 'type': 'str'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(NodeDeactivateCompletedEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.effective_deactivate_intent = kwargs.get('effective_deactivate_intent', None) - self.batch_ids_with_deactivate_intent = kwargs.get('batch_ids_with_deactivate_intent', None) - self.start_time = kwargs.get('start_time', None) - self.kind = 'NodeDeactivateCompleted' - - -class NodeDeactivateStartedEvent(NodeEvent): - """Node Deactivate Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param batch_id: Required. Batch Id. - :type batch_id: str - :param deactivate_intent: Required. Describes deactivate intent. - :type deactivate_intent: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'batch_id': {'required': True}, - 'deactivate_intent': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'batch_id': {'key': 'BatchId', 'type': 'str'}, - 'deactivate_intent': {'key': 'DeactivateIntent', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeDeactivateStartedEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.batch_id = kwargs.get('batch_id', None) - self.deactivate_intent = kwargs.get('deactivate_intent', None) - self.kind = 'NodeDeactivateStarted' - - -class NodeDeactivationInfo(Model): - """Information about the node deactivation. This information is valid for a - node that is undergoing deactivation or has already been deactivated. - - :param node_deactivation_intent: The intent or the reason for deactivating - the node. Following are the possible values for it. Possible values - include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' - :type node_deactivation_intent: str or - ~azure.servicefabric.models.NodeDeactivationIntent - :param node_deactivation_status: The status of node deactivation - operation. Following are the possible values. Possible values include: - 'None', 'SafetyCheckInProgress', 'SafetyCheckComplete', 'Completed' - :type node_deactivation_status: str or - ~azure.servicefabric.models.NodeDeactivationStatus - :param node_deactivation_task: List of tasks representing the deactivation - operation on the node. - :type node_deactivation_task: - list[~azure.servicefabric.models.NodeDeactivationTask] - :param pending_safety_checks: List of pending safety checks - :type pending_safety_checks: - list[~azure.servicefabric.models.SafetyCheckWrapper] - """ - - _attribute_map = { - 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, - 'node_deactivation_status': {'key': 'NodeDeactivationStatus', 'type': 'str'}, - 'node_deactivation_task': {'key': 'NodeDeactivationTask', 'type': '[NodeDeactivationTask]'}, - 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, - } - - def __init__(self, **kwargs): - super(NodeDeactivationInfo, self).__init__(**kwargs) - self.node_deactivation_intent = kwargs.get('node_deactivation_intent', None) - self.node_deactivation_status = kwargs.get('node_deactivation_status', None) - self.node_deactivation_task = kwargs.get('node_deactivation_task', None) - self.pending_safety_checks = kwargs.get('pending_safety_checks', None) - - -class NodeDeactivationTask(Model): - """The task representing the deactivation operation on the node. - - :param node_deactivation_task_id: Identity of the task related to - deactivation operation on the node. - :type node_deactivation_task_id: - ~azure.servicefabric.models.NodeDeactivationTaskId - :param node_deactivation_intent: The intent or the reason for deactivating - the node. Following are the possible values for it. Possible values - include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' - :type node_deactivation_intent: str or - ~azure.servicefabric.models.NodeDeactivationIntent - """ - - _attribute_map = { - 'node_deactivation_task_id': {'key': 'NodeDeactivationTaskId', 'type': 'NodeDeactivationTaskId'}, - 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeDeactivationTask, self).__init__(**kwargs) - self.node_deactivation_task_id = kwargs.get('node_deactivation_task_id', None) - self.node_deactivation_intent = kwargs.get('node_deactivation_intent', None) - - -class NodeDeactivationTaskId(Model): - """Identity of the task related to deactivation operation on the node. - - :param id: Value of the task id. - :type id: str - :param node_deactivation_task_type: The type of the task that performed - the node deactivation. Following are the possible values. Possible values - include: 'Invalid', 'Infrastructure', 'Repair', 'Client' - :type node_deactivation_task_type: str or - ~azure.servicefabric.models.NodeDeactivationTaskType - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'node_deactivation_task_type': {'key': 'NodeDeactivationTaskType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeDeactivationTaskId, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.node_deactivation_task_type = kwargs.get('node_deactivation_task_type', None) - - -class NodeDownEvent(NodeEvent): - """Node Down event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param last_node_up_at: Required. Time when Node was last up. - :type last_node_up_at: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'last_node_up_at': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'last_node_up_at': {'key': 'LastNodeUpAt', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(NodeDownEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.last_node_up_at = kwargs.get('last_node_up_at', None) - self.kind = 'NodeDown' - - -class NodeHealth(EntityHealth): - """Information about the health of a Service Fabric node. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param name: Name of the node whose health information is described by - this object. - :type name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeHealth, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class NodeHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a node, containing information about the - data and the algorithm used by health store to evaluate health. The - evaluation is returned only when the aggregated health state is either - Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the node. The types of the - unhealthy evaluations can be EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(NodeHealthEvaluation, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Node' - - -class NodeHealthReportExpiredEvent(NodeEvent): - """Node Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: Required. Id of Node instance. - :type node_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(NodeHealthReportExpiredEvent, self).__init__(**kwargs) - self.node_instance_id = kwargs.get('node_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'NodeHealthReportExpired' - - -class NodeHealthState(EntityHealthState): - """Represents the health state of a node, which contains the node identifier - and its aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param name: The name of a Service Fabric node. - :type name: str - :param id: An internal ID used by Service Fabric to uniquely identify a - node. Node Id is deterministically generated from node name. - :type id: ~azure.servicefabric.models.NodeId - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'NodeId'}, - } - - def __init__(self, **kwargs): - super(NodeHealthState, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.id = kwargs.get('id', None) - - -class NodeHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a node, which contains the node name - and its aggregated health state. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of a Service Fabric node. - :type node_name: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeHealthStateChunk, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - - -class NodeHealthStateChunkList(EntityHealthStateChunkList): - """The list of node health state chunks in the cluster that respect the input - filters in the chunk query. Returned by get cluster health state chunks - query. - - :param total_count: Total number of entity health state objects that match - the specified filters from the cluster health chunk query description. - :type total_count: long - :param items: The list of node health state chunks that respect the input - filters in the chunk query. - :type items: list[~azure.servicefabric.models.NodeHealthStateChunk] - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'items': {'key': 'Items', 'type': '[NodeHealthStateChunk]'}, - } - - def __init__(self, **kwargs): - super(NodeHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) - - -class NodeHealthStateFilter(Model): - """Defines matching criteria to determine whether a node should be included in - the returned cluster health chunk. - One filter can match zero, one or multiple nodes, depending on its - properties. - Can be specified in the cluster health chunk query description. - - :param node_name_filter: Name of the node that matches the filter. The - filter is applied only to the specified node, if it exists. - If the node doesn't exist, no node is returned in the cluster health chunk - based on this filter. - If the node exists, it is included in the cluster health chunk if the - health state matches the other filter properties. - If not specified, all nodes that match the parent filters (if any) are - taken into consideration and matched against the other filter members, - like health state filter. - :type node_name_filter: str - :param health_state_filter: The filter for the health state of the nodes. - It allows selecting nodes if they match the desired health states. - The possible values are integer value of one of the following health - states. Only nodes that match the filter are returned. All nodes are used - to evaluate the cluster aggregated health state. - If not specified, default value is None, unless the node name is - specified. If the filter has default value and node name is specified, the - matching node is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches nodes with HealthState - value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - """ - - _attribute_map = { - 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(NodeHealthStateFilter, self).__init__(**kwargs) - self.node_name_filter = kwargs.get('node_name_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - - -class NodeId(Model): - """An internal ID used by Service Fabric to uniquely identify a node. Node Id - is deterministically generated from node name. - - :param id: Value of the node Id. This is a 128 bit integer. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeId, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class NodeImpact(Model): - """Describes the expected impact of a repair to a particular node. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param node_name: Required. The name of the impacted node. - :type node_name: str - :param impact_level: The level of impact expected. Possible values - include: 'Invalid', 'None', 'Restart', 'RemoveData', 'RemoveNode' - :type impact_level: str or ~azure.servicefabric.models.ImpactLevel - """ - - _validation = { - 'node_name': {'required': True}, - } - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'impact_level': {'key': 'ImpactLevel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeImpact, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.impact_level = kwargs.get('impact_level', None) - - -class NodeInfo(Model): - """Information about a node in Service Fabric cluster. - - :param name: The name of a Service Fabric node. - :type name: str - :param ip_address_or_fqdn: The IP address or fully qualified domain name - of the node. - :type ip_address_or_fqdn: str - :param type: The type of the node. - :type type: str - :param code_version: The version of Service Fabric binaries that the node - is running. - :type code_version: str - :param config_version: The version of Service Fabric cluster manifest that - the node is using. - :type config_version: str - :param node_status: The status of the node. Possible values include: - 'Invalid', 'Up', 'Down', 'Enabling', 'Disabling', 'Disabled', 'Unknown', - 'Removed' - :type node_status: str or ~azure.servicefabric.models.NodeStatus - :param node_up_time_in_seconds: Time in seconds since the node has been in - NodeStatus Up. Value zero indicates that the node is not Up. - :type node_up_time_in_seconds: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param is_seed_node: Indicates if the node is a seed node or not. Returns - true if the node is a seed node, otherwise false. A quorum of seed nodes - are required for proper operation of Service Fabric cluster. - :type is_seed_node: bool - :param upgrade_domain: The upgrade domain of the node. - :type upgrade_domain: str - :param fault_domain: The fault domain of the node. - :type fault_domain: str - :param id: An internal ID used by Service Fabric to uniquely identify a - node. Node Id is deterministically generated from node name. - :type id: ~azure.servicefabric.models.NodeId - :param instance_id: The ID representing the node instance. While the ID of - the node is deterministically generated from the node name and remains - same across restarts, the InstanceId changes every time node restarts. - :type instance_id: str - :param node_deactivation_info: Information about the node deactivation. - This information is valid for a node that is undergoing deactivation or - has already been deactivated. - :type node_deactivation_info: - ~azure.servicefabric.models.NodeDeactivationInfo - :param is_stopped: Indicates if the node is stopped by calling stop node - API or not. Returns true if the node is stopped, otherwise false. - :type is_stopped: bool - :param node_down_time_in_seconds: Time in seconds since the node has been - in NodeStatus Down. Value zero indicates node is not NodeStatus Down. - :type node_down_time_in_seconds: str - :param node_up_at: Date time in UTC when the node came up. If the node has - never been up then this value will be zero date time. - :type node_up_at: datetime - :param node_down_at: Date time in UTC when the node went down. If node has - never been down then this value will be zero date time. - :type node_down_at: datetime - :param node_tags: List that contains tags, which will be applied to the - nodes. - :type node_tags: list[str] - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'node_status': {'key': 'NodeStatus', 'type': 'str'}, - 'node_up_time_in_seconds': {'key': 'NodeUpTimeInSeconds', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'NodeId'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'node_deactivation_info': {'key': 'NodeDeactivationInfo', 'type': 'NodeDeactivationInfo'}, - 'is_stopped': {'key': 'IsStopped', 'type': 'bool'}, - 'node_down_time_in_seconds': {'key': 'NodeDownTimeInSeconds', 'type': 'str'}, - 'node_up_at': {'key': 'NodeUpAt', 'type': 'iso-8601'}, - 'node_down_at': {'key': 'NodeDownAt', 'type': 'iso-8601'}, - 'node_tags': {'key': 'NodeTags', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(NodeInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.type = kwargs.get('type', None) - self.code_version = kwargs.get('code_version', None) - self.config_version = kwargs.get('config_version', None) - self.node_status = kwargs.get('node_status', None) - self.node_up_time_in_seconds = kwargs.get('node_up_time_in_seconds', None) - self.health_state = kwargs.get('health_state', None) - self.is_seed_node = kwargs.get('is_seed_node', None) - self.upgrade_domain = kwargs.get('upgrade_domain', None) - self.fault_domain = kwargs.get('fault_domain', None) - self.id = kwargs.get('id', None) - self.instance_id = kwargs.get('instance_id', None) - self.node_deactivation_info = kwargs.get('node_deactivation_info', None) - self.is_stopped = kwargs.get('is_stopped', None) - self.node_down_time_in_seconds = kwargs.get('node_down_time_in_seconds', None) - self.node_up_at = kwargs.get('node_up_at', None) - self.node_down_at = kwargs.get('node_down_at', None) - self.node_tags = kwargs.get('node_tags', None) - - -class NodeLoadInfo(Model): - """Information about load on a Service Fabric node. It holds a summary of all - metrics and their load on a node. - - :param node_name: Name of the node for which the load information is - provided by this object. - :type node_name: str - :param node_load_metric_information: List that contains metrics and their - load information on this node. - :type node_load_metric_information: - list[~azure.servicefabric.models.NodeLoadMetricInformation] - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_load_metric_information': {'key': 'NodeLoadMetricInformation', 'type': '[NodeLoadMetricInformation]'}, - } - - def __init__(self, **kwargs): - super(NodeLoadInfo, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.node_load_metric_information = kwargs.get('node_load_metric_information', None) - - -class NodeLoadMetricInformation(Model): - """Represents data structure that contains load information for a certain - metric on a node. - - :param name: Name of the metric for which this load information is - provided. - :type name: str - :param node_capacity: Total capacity on the node for this metric. - :type node_capacity: str - :param node_load: Current load on the node for this metric. In future - releases of Service Fabric this parameter will be deprecated in favor of - CurrentNodeLoad. - :type node_load: str - :param node_remaining_capacity: The remaining capacity on the node for - this metric. In future releases of Service Fabric this parameter will be - deprecated in favor of NodeCapacityRemaining. - :type node_remaining_capacity: str - :param is_capacity_violation: Indicates if there is a capacity violation - for this metric on the node. - :type is_capacity_violation: bool - :param node_buffered_capacity: The value that indicates the reserved - capacity for this metric on the node. - :type node_buffered_capacity: str - :param node_remaining_buffered_capacity: The remaining reserved capacity - for this metric on the node. In future releases of Service Fabric this - parameter will be deprecated in favor of BufferedNodeCapacityRemaining. - :type node_remaining_buffered_capacity: str - :param current_node_load: Current load on the node for this metric. - :type current_node_load: str - :param node_capacity_remaining: The remaining capacity on the node for the - metric. - :type node_capacity_remaining: str - :param buffered_node_capacity_remaining: The remaining capacity which is - not reserved by NodeBufferPercentage for this metric on the node. - :type buffered_node_capacity_remaining: str - :param planned_node_load_removal: This value represents the load of the - replicas that are planned to be removed in the future. - This kind of load is reported for replicas that are currently being moving - to other nodes and for replicas that are currently being dropped but still - use the load on the source node. - :type planned_node_load_removal: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'node_capacity': {'key': 'NodeCapacity', 'type': 'str'}, - 'node_load': {'key': 'NodeLoad', 'type': 'str'}, - 'node_remaining_capacity': {'key': 'NodeRemainingCapacity', 'type': 'str'}, - 'is_capacity_violation': {'key': 'IsCapacityViolation', 'type': 'bool'}, - 'node_buffered_capacity': {'key': 'NodeBufferedCapacity', 'type': 'str'}, - 'node_remaining_buffered_capacity': {'key': 'NodeRemainingBufferedCapacity', 'type': 'str'}, - 'current_node_load': {'key': 'CurrentNodeLoad', 'type': 'str'}, - 'node_capacity_remaining': {'key': 'NodeCapacityRemaining', 'type': 'str'}, - 'buffered_node_capacity_remaining': {'key': 'BufferedNodeCapacityRemaining', 'type': 'str'}, - 'planned_node_load_removal': {'key': 'PlannedNodeLoadRemoval', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeLoadMetricInformation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.node_capacity = kwargs.get('node_capacity', None) - self.node_load = kwargs.get('node_load', None) - self.node_remaining_capacity = kwargs.get('node_remaining_capacity', None) - self.is_capacity_violation = kwargs.get('is_capacity_violation', None) - self.node_buffered_capacity = kwargs.get('node_buffered_capacity', None) - self.node_remaining_buffered_capacity = kwargs.get('node_remaining_buffered_capacity', None) - self.current_node_load = kwargs.get('current_node_load', None) - self.node_capacity_remaining = kwargs.get('node_capacity_remaining', None) - self.buffered_node_capacity_remaining = kwargs.get('buffered_node_capacity_remaining', None) - self.planned_node_load_removal = kwargs.get('planned_node_load_removal', None) - - -class NodeNewHealthReportEvent(NodeEvent): - """Node Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: Required. Id of Node instance. - :type node_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(NodeNewHealthReportEvent, self).__init__(**kwargs) - self.node_instance_id = kwargs.get('node_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'NodeNewHealthReport' - - -class NodeOpenFailedEvent(NodeEvent): - """Node Open Failed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_id: Required. Id of Node. - :type node_id: str - :param upgrade_domain: Required. Upgrade domain of Node. - :type upgrade_domain: str - :param fault_domain: Required. Fault domain of Node. - :type fault_domain: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param hostname: Required. Name of Host. - :type hostname: str - :param is_seed_node: Required. Indicates if it is seed node. - :type is_seed_node: bool - :param node_version: Required. Version of Node. - :type node_version: str - :param error: Required. Describes the error. - :type error: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - 'error': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - 'error': {'key': 'Error', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeOpenFailedEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.node_id = kwargs.get('node_id', None) - self.upgrade_domain = kwargs.get('upgrade_domain', None) - self.fault_domain = kwargs.get('fault_domain', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.hostname = kwargs.get('hostname', None) - self.is_seed_node = kwargs.get('is_seed_node', None) - self.node_version = kwargs.get('node_version', None) - self.error = kwargs.get('error', None) - self.kind = 'NodeOpenFailed' - - -class NodeOpenSucceededEvent(NodeEvent): - """Node Opened Succeeded event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_id: Required. Id of Node. - :type node_id: str - :param upgrade_domain: Required. Upgrade domain of Node. - :type upgrade_domain: str - :param fault_domain: Required. Fault domain of Node. - :type fault_domain: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param hostname: Required. Name of Host. - :type hostname: str - :param is_seed_node: Required. Indicates if it is seed node. - :type is_seed_node: bool - :param node_version: Required. Version of Node. - :type node_version: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeOpenSucceededEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.node_id = kwargs.get('node_id', None) - self.upgrade_domain = kwargs.get('upgrade_domain', None) - self.fault_domain = kwargs.get('fault_domain', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.hostname = kwargs.get('hostname', None) - self.is_seed_node = kwargs.get('is_seed_node', None) - self.node_version = kwargs.get('node_version', None) - self.kind = 'NodeOpenSucceeded' - - -class NodeRemovedFromClusterEvent(NodeEvent): - """Node Removed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_id: Required. Id of Node. - :type node_id: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_type: Required. Type of Node. - :type node_type: str - :param fabric_version: Required. Fabric version. - :type fabric_version: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param node_capacities: Required. Capacities. - :type node_capacities: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'node_type': {'required': True}, - 'fabric_version': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'node_capacities': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_type': {'key': 'NodeType', 'type': 'str'}, - 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeRemovedFromClusterEvent, self).__init__(**kwargs) - self.node_id = kwargs.get('node_id', None) - self.node_instance = kwargs.get('node_instance', None) - self.node_type = kwargs.get('node_type', None) - self.fabric_version = kwargs.get('fabric_version', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.node_capacities = kwargs.get('node_capacities', None) - self.kind = 'NodeRemovedFromCluster' - - -class RepairImpactDescriptionBase(Model): - """Describes the expected impact of executing a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NodeRepairImpactDescription - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Node': 'NodeRepairImpactDescription'} - } - - def __init__(self, **kwargs): - super(RepairImpactDescriptionBase, self).__init__(**kwargs) - self.kind = None - - -class NodeRepairImpactDescription(RepairImpactDescriptionBase): - """Describes the expected impact of a repair on a set of nodes. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param node_impact_list: The list of nodes impacted by a repair action and - their respective expected impact. - :type node_impact_list: list[~azure.servicefabric.models.NodeImpact] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_impact_list': {'key': 'NodeImpactList', 'type': '[NodeImpact]'}, - } - - def __init__(self, **kwargs): - super(NodeRepairImpactDescription, self).__init__(**kwargs) - self.node_impact_list = kwargs.get('node_impact_list', None) - self.kind = 'Node' - - -class RepairTargetDescriptionBase(Model): - """Describes the entities targeted by a repair action. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NodeRepairTargetDescription - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Node': 'NodeRepairTargetDescription'} - } - - def __init__(self, **kwargs): - super(RepairTargetDescriptionBase, self).__init__(**kwargs) - self.kind = None - - -class NodeRepairTargetDescription(RepairTargetDescriptionBase): - """Describes the list of nodes targeted by a repair action. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param node_names: The list of nodes targeted by a repair action. - :type node_names: list[str] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_names': {'key': 'NodeNames', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(NodeRepairTargetDescription, self).__init__(**kwargs) - self.node_names = kwargs.get('node_names', None) - self.kind = 'Node' - - -class NodeResult(Model): - """Contains information about a node that was targeted by a user-induced - operation. - - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: The node instance id. - :type node_instance_id: str - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeResult, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.node_instance_id = kwargs.get('node_instance_id', None) - - -class NodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for nodes, containing health evaluations for - each unhealthy node that impacted current aggregated health state. Can be - returned when evaluating cluster health and the aggregated health state is - either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_nodes: Maximum allowed percentage of - unhealthy nodes from the ClusterHealthPolicy. - :type max_percent_unhealthy_nodes: int - :param total_count: Total number of nodes found in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - NodeHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(NodesHealthEvaluation, self).__init__(**kwargs) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Nodes' - - -class NodeTagsDescription(Model): - """Describes the tags required for placement or running of the service. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. The number of tags. - :type count: int - :param tags: Required. Array of size specified by the ‘Count’ parameter, - for the placement tags of the service. - :type tags: list[str] - """ - - _validation = { - 'count': {'required': True}, - 'tags': {'required': True}, - } - - _attribute_map = { - 'count': {'key': 'Count', 'type': 'int'}, - 'tags': {'key': 'Tags', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(NodeTagsDescription, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.tags = kwargs.get('tags', None) - - -class NodeTransitionProgress(Model): - """Information about an NodeTransition operation. This class contains an - OperationState and a NodeTransitionResult. The NodeTransitionResult is not - valid until OperationState - is Completed or Faulted. - - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param node_transition_result: Represents information about an operation - in a terminal state (Completed or Faulted). - :type node_transition_result: - ~azure.servicefabric.models.NodeTransitionResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'node_transition_result': {'key': 'NodeTransitionResult', 'type': 'NodeTransitionResult'}, - } - - def __init__(self, **kwargs): - super(NodeTransitionProgress, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.node_transition_result = kwargs.get('node_transition_result', None) - - -class NodeTransitionResult(Model): - """Represents information about an operation in a terminal state (Completed or - Faulted). - - :param error_code: If OperationState is Completed, this is 0. If - OperationState is Faulted, this is an error code indicating the reason. - :type error_code: int - :param node_result: Contains information about a node that was targeted by - a user-induced operation. - :type node_result: ~azure.servicefabric.models.NodeResult - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'node_result': {'key': 'NodeResult', 'type': 'NodeResult'}, - } - - def __init__(self, **kwargs): - super(NodeTransitionResult, self).__init__(**kwargs) - self.error_code = kwargs.get('error_code', None) - self.node_result = kwargs.get('node_result', None) - - -class NodeTypeHealthPolicyMapItem(Model): - """Defines an item in NodeTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key of the node type health policy map item. - This is the name of the node type. - :type key: str - :param value: Required. The value of the node type health policy map item. - If the percentage is respected but there is at least one unhealthy node in - the node type, the health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy nodes - over the total number of nodes in the node type. - The computation rounds up to tolerate one failure on small numbers of - nodes. - The max percent unhealthy nodes allowed for the node type. Must be between - zero and 100. - :type value: int - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(NodeTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) - - -class NodeTypeNodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for nodes of a particular node type. The node - type nodes evaluation can be returned when cluster health evaluation - returns unhealthy aggregated health state, either Error or Warning. It - contains health evaluations for each unhealthy node of the included node - type that impacted current aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param node_type_name: The node type name as defined in the cluster - manifest. - :type node_type_name: str - :param max_percent_unhealthy_nodes: Maximum allowed percentage of - unhealthy nodes for the node type, specified as an entry in - NodeTypeHealthPolicyMap. - :type max_percent_unhealthy_nodes: int - :param total_count: Total number of nodes of the node type found in the - health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - NodeHealthEvaluation of this node type that impacted the aggregated - health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_type_name': {'key': 'NodeTypeName', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(NodeTypeNodesHealthEvaluation, self).__init__(**kwargs) - self.node_type_name = kwargs.get('node_type_name', None) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'NodeTypeNodes' - - -class NodeUpEvent(NodeEvent): - """Node Up event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param last_node_down_at: Required. Time when Node was last down. - :type last_node_down_at: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'last_node_down_at': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'last_node_down_at': {'key': 'LastNodeDownAt', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(NodeUpEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.last_node_down_at = kwargs.get('last_node_down_at', None) - self.kind = 'NodeUp' - - -class NodeUpgradeProgressInfo(Model): - """Information about the upgrading node and its status. - - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param upgrade_phase: The state of the upgrading node. Possible values - include: 'Invalid', 'PreUpgradeSafetyCheck', 'Upgrading', - 'PostUpgradeSafetyCheck' - :type upgrade_phase: str or ~azure.servicefabric.models.NodeUpgradePhase - :param pending_safety_checks: List of pending safety checks - :type pending_safety_checks: - list[~azure.servicefabric.models.SafetyCheckWrapper] - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'upgrade_phase': {'key': 'UpgradePhase', 'type': 'str'}, - 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, - } - - def __init__(self, **kwargs): - super(NodeUpgradeProgressInfo, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.upgrade_phase = kwargs.get('upgrade_phase', None) - self.pending_safety_checks = kwargs.get('pending_safety_checks', None) - - -class OperationStatus(Model): - """Contains the OperationId, OperationState, and OperationType for - user-induced operations. - - :param operation_id: A GUID that identifies a call to this API. This is - also passed into the corresponding GetProgress API. - :type operation_id: str - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param type: The type of the operation. Possible values include: - 'Invalid', 'PartitionDataLoss', 'PartitionQuorumLoss', 'PartitionRestart', - 'NodeTransition' - :type type: str or ~azure.servicefabric.models.OperationType - """ - - _attribute_map = { - 'operation_id': {'key': 'OperationId', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationStatus, self).__init__(**kwargs) - self.operation_id = kwargs.get('operation_id', None) - self.state = kwargs.get('state', None) - self.type = kwargs.get('type', None) - - -class PackageSharingPolicyInfo(Model): - """Represents a policy for the package sharing. - - :param shared_package_name: The name of code, configuration or data - package that should be shared. - :type shared_package_name: str - :param package_sharing_scope: Represents the scope for - PackageSharingPolicy. This is specified during DeployServicePackageToNode - operation. Possible values include: 'None', 'All', 'Code', 'Config', - 'Data' - :type package_sharing_scope: str or - ~azure.servicefabric.models.PackageSharingPolicyScope - """ - - _attribute_map = { - 'shared_package_name': {'key': 'SharedPackageName', 'type': 'str'}, - 'package_sharing_scope': {'key': 'PackageSharingScope', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PackageSharingPolicyInfo, self).__init__(**kwargs) - self.shared_package_name = kwargs.get('shared_package_name', None) - self.package_sharing_scope = kwargs.get('package_sharing_scope', None) - - -class PagedApplicationInfoList(Model): - """The list of applications in the cluster. The list is paged when all of the - results cannot fit in a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of application information. - :type items: list[~azure.servicefabric.models.ApplicationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedApplicationInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedApplicationResourceDescriptionList(Model): - """The list of application resources. The list is paged when all of the - results cannot fit in a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: - list[~azure.servicefabric.models.ApplicationResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationResourceDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedApplicationResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedApplicationTypeInfoList(Model): - """The list of application types that are provisioned or being provisioned in - the cluster. The list is paged when all of the results cannot fit in a - single message. The next set of results can be obtained by executing the - same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of application type information. - :type items: list[~azure.servicefabric.models.ApplicationTypeInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationTypeInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedApplicationTypeInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedBackupConfigurationInfoList(Model): - """The list of backup configuration information. The list is paged when all of - the results cannot fit in a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of backup configuration information. - :type items: list[~azure.servicefabric.models.BackupConfigurationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupConfigurationInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedBackupConfigurationInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedBackupEntityList(Model): - """The list of backup entities that are being periodically backed. The list is - paged when all of the results cannot fit in a single message. The next set - of results can be obtained by executing the same query with the - continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of backup entity information. - :type items: list[~azure.servicefabric.models.BackupEntity] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupEntity]'}, - } - - def __init__(self, **kwargs): - super(PagedBackupEntityList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedBackupInfoList(Model): - """The list of backups. The list is paged when all of the results cannot fit - in a single message. The next set of results can be obtained by executing - the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of backup information. - :type items: list[~azure.servicefabric.models.BackupInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedBackupInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedBackupPolicyDescriptionList(Model): - """The list of backup policies configured in the cluster. The list is paged - when all of the results cannot fit in a single message. The next set of - results can be obtained by executing the same query with the continuation - token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: The list of backup policies information. - :type items: list[~azure.servicefabric.models.BackupPolicyDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupPolicyDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedBackupPolicyDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedComposeDeploymentStatusInfoList(Model): - """The list of compose deployments in the cluster. The list is paged when all - of the results cannot fit in a single message. The next set of results can - be obtained by executing the same query with the continuation token - provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of compose deployment status information. - :type items: list[~azure.servicefabric.models.ComposeDeploymentStatusInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ComposeDeploymentStatusInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedComposeDeploymentStatusInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedDeployedApplicationInfoList(Model): - """The list of deployed applications in activating, downloading, or active - states on a node. - The list is paged when all of the results cannot fit in a single message. - The next set of results can be obtained by executing the same query with - the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of deployed application information. - :type items: list[~azure.servicefabric.models.DeployedApplicationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[DeployedApplicationInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedDeployedApplicationInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedGatewayResourceDescriptionList(Model): - """The list of gateway resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.GatewayResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[GatewayResourceDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedGatewayResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedNetworkResourceDescriptionList(Model): - """The list of network resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.NetworkResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[NetworkResourceDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedNetworkResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedNodeInfoList(Model): - """The list of nodes in the cluster. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of node information. - :type items: list[~azure.servicefabric.models.NodeInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[NodeInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedNodeInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedPropertyInfoList(Model): - """The paged list of Service Fabric properties under a given name. The list is - paged when all of the results cannot fit in a single message. The next set - of results can be obtained by executing the same query with the - continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param is_consistent: Indicates whether any property under the given name - has been modified during the enumeration. If there was a modification, - this property value is false. - :type is_consistent: bool - :param properties: List of property information. - :type properties: list[~azure.servicefabric.models.PropertyInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, - 'properties': {'key': 'Properties', 'type': '[PropertyInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedPropertyInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.is_consistent = kwargs.get('is_consistent', None) - self.properties = kwargs.get('properties', None) - - -class PagedReplicaInfoList(Model): - """The list of replicas in the cluster for a given partition. The list is - paged when all of the results cannot fit in a single message. The next set - of results can be obtained by executing the same query with the - continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of replica information. - :type items: list[~azure.servicefabric.models.ReplicaInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ReplicaInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedReplicaInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedSecretResourceDescriptionList(Model): - """The list of secret resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.SecretResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[SecretResourceDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedSecretResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedSecretValueResourceDescriptionList(Model): - """The list of values of a secret resource, paged if the number of results - exceeds the limits of a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in the previous page. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: - list[~azure.servicefabric.models.SecretValueResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[SecretValueResourceDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedSecretValueResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedServiceInfoList(Model): - """The list of services in the cluster for an application. The list is paged - when all of the results cannot fit in a single message. The next set of - results can be obtained by executing the same query with the continuation - token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of service information. - :type items: list[~azure.servicefabric.models.ServiceInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedServiceInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedServicePartitionInfoList(Model): - """The list of partition in the cluster for a service. The list is paged when - all of the results cannot fit in a single message. The next set of results - can be obtained by executing the same query with the continuation token - provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of service partition information. - :type items: list[~azure.servicefabric.models.ServicePartitionInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServicePartitionInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedServicePartitionInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedServiceReplicaDescriptionList(Model): - """The list of service resource replicas in the cluster. The list is paged - when all of the results cannot fit in a single message. The next set of - results can be obtained by executing the same query with the continuation - token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of service resource replica description. - :type items: list[~azure.servicefabric.models.ServiceReplicaDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceReplicaDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedServiceReplicaDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedServiceResourceDescriptionList(Model): - """The list of service resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.ServiceResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceResourceDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedServiceResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedSubNameInfoList(Model): - """A paged list of Service Fabric names. The list is paged when all of the - results cannot fit in a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param is_consistent: Indicates whether any name under the given name has - been modified during the enumeration. If there was a modification, this - property value is false. - :type is_consistent: bool - :param sub_names: List of the child names. - :type sub_names: list[str] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, - 'sub_names': {'key': 'SubNames', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(PagedSubNameInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.is_consistent = kwargs.get('is_consistent', None) - self.sub_names = kwargs.get('sub_names', None) - - -class PagedUpdatePartitionLoadResultList(Model): - """The list of results of the call UpdatePartitionLoad. The list is paged when - all of the results cannot fit in a single message. The next set of results - can be obtained by executing the same query with the continuation token - provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of partition load update information. - :type items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[UpdatePartitionLoadResult]'}, - } - - def __init__(self, **kwargs): - super(PagedUpdatePartitionLoadResultList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedVolumeResourceDescriptionList(Model): - """The list of volume resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.VolumeResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[VolumeResourceDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedVolumeResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PartitionAnalysisEvent(PartitionEvent): - """Represents the base for all Partition Analysis Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionPrimaryMoveAnalysisEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param metadata: Required. Metadata about an Analysis Event. - :type metadata: ~azure.servicefabric.models.AnalysisEventMetadata - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'metadata': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, - } - - _subtype_map = { - 'kind': {'PartitionPrimaryMoveAnalysis': 'PartitionPrimaryMoveAnalysisEvent'} - } - - def __init__(self, **kwargs): - super(PartitionAnalysisEvent, self).__init__(**kwargs) - self.metadata = kwargs.get('metadata', None) - self.kind = 'PartitionAnalysisEvent' - - -class PartitionBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information, for a specific partition, specifying what - backup policy is being applied and suspend description, if any. - - All required parameters must be populated in order to send to Azure. - - :param policy_name: The name of the backup policy which is applicable to - this Service Fabric application or service or partition. - :type policy_name: str - :param policy_inherited_from: Specifies the scope at which the backup - policy is applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type policy_inherited_from: str or - ~azure.servicefabric.models.BackupPolicyScope - :param suspension_info: Describes the backup suspension details. - :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :param kind: Required. Constant filled by server. - :type kind: str - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param partition_id: The partition ID identifying the partition. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartitionBackupConfigurationInfo, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.kind = 'Partition' - - -class PartitionBackupEntity(BackupEntity): - """Identifies the Service Fabric stateful partition which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :param entity_kind: Required. Constant filled by server. - :type entity_kind: str - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param partition_id: The partition ID identifying the partition. - :type partition_id: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartitionBackupEntity, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.entity_kind = 'Partition' - - -class PartitionDataLossProgress(Model): - """Information about a partition data loss user-induced operation. - - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param invoke_data_loss_result: Represents information about an operation - in a terminal state (Completed or Faulted). - :type invoke_data_loss_result: - ~azure.servicefabric.models.InvokeDataLossResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'invoke_data_loss_result': {'key': 'InvokeDataLossResult', 'type': 'InvokeDataLossResult'}, - } - - def __init__(self, **kwargs): - super(PartitionDataLossProgress, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.invoke_data_loss_result = kwargs.get('invoke_data_loss_result', None) - - -class PartitionHealth(EntityHealth): - """Information about the health of a Service Fabric partition. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param partition_id: ID of the partition whose health information is - described by this object. - :type partition_id: str - :param replica_health_states: The list of replica health states associated - with the partition. - :type replica_health_states: - list[~azure.servicefabric.models.ReplicaHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_health_states': {'key': 'ReplicaHealthStates', 'type': '[ReplicaHealthState]'}, - } - - def __init__(self, **kwargs): - super(PartitionHealth, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.replica_health_states = kwargs.get('replica_health_states', None) - - -class PartitionHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a partition, containing information about - the data and the algorithm used by health store to evaluate health. The - evaluation is returned only when the aggregated health state is either - Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition whose health evaluation is - described by this object. - :type partition_id: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the partition. The types of the - unhealthy evaluations can be ReplicasHealthEvaluation or - EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(PartitionHealthEvaluation, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Partition' - - -class PartitionHealthReportExpiredEvent(PartitionEvent): - """Partition Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(PartitionHealthReportExpiredEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'PartitionHealthReportExpired' - - -class PartitionHealthState(EntityHealthState): - """Represents the health state of a partition, which contains the partition - identifier and its aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param partition_id: Id of the partition whose health state is described - by this object. - :type partition_id: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartitionHealthState, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - - -class PartitionHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a partition, which contains the - partition ID, its aggregated health state and any replicas that respect the - filters in the cluster health chunk query description. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param partition_id: The Id of the partition. - :type partition_id: str - :param replica_health_state_chunks: The list of replica health state - chunks belonging to the partition that respect the filters in the cluster - health chunk query description. - :type replica_health_state_chunks: - ~azure.servicefabric.models.ReplicaHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_health_state_chunks': {'key': 'ReplicaHealthStateChunks', 'type': 'ReplicaHealthStateChunkList'}, - } - - def __init__(self, **kwargs): - super(PartitionHealthStateChunk, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.replica_health_state_chunks = kwargs.get('replica_health_state_chunks', None) - - -class PartitionHealthStateChunkList(Model): - """The list of partition health state chunks that respect the input filters in - the chunk query description. - Returned by get cluster health state chunks query as part of the parent - application hierarchy. - - :param items: The list of partition health state chunks that respect the - input filters in the chunk query. - :type items: list[~azure.servicefabric.models.PartitionHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[PartitionHealthStateChunk]'}, - } - - def __init__(self, **kwargs): - super(PartitionHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) - - -class PartitionHealthStateFilter(Model): - """Defines matching criteria to determine whether a partition should be - included as a child of a service in the cluster health chunk. - The partitions are only returned if the parent entities match a filter - specified in the cluster health chunk query description. The parent service - and application must be included in the cluster health chunk. - One filter can match zero, one or multiple partitions, depending on its - properties. - - :param partition_id_filter: ID of the partition that matches the filter. - The filter is applied only to the specified partition, if it exists. - If the partition doesn't exist, no partition is returned in the cluster - health chunk based on this filter. - If the partition exists, it is included in the cluster health chunk if it - respects the other filter properties. - If not specified, all partitions that match the parent filters (if any) - are taken into consideration and matched against the other filter members, - like health state filter. - :type partition_id_filter: str - :param health_state_filter: The filter for the health state of the - partitions. It allows selecting partitions if they match the desired - health states. - The possible values are integer value of one of the following health - states. Only partitions that match the filter are returned. All partitions - are used to evaluate the cluster aggregated health state. - If not specified, default value is None, unless the partition ID is - specified. If the filter has default value and partition ID is specified, - the matching partition is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches partitions with - HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - :param replica_filters: Defines a list of filters that specify which - replicas to be included in the returned cluster health chunk as children - of the parent partition. The replicas are returned only if the parent - partition matches a filter. - If the list is empty, no replicas are returned. All the replicas are used - to evaluate the parent partition aggregated health state, regardless of - the input filters. - The partition filter may specify multiple replica filters. - For example, it can specify a filter to return all replicas with health - state Error and another filter to always include a replica identified by - its replica id. - :type replica_filters: - list[~azure.servicefabric.models.ReplicaHealthStateFilter] - """ - - _attribute_map = { - 'partition_id_filter': {'key': 'PartitionIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'replica_filters': {'key': 'ReplicaFilters', 'type': '[ReplicaHealthStateFilter]'}, - } - - def __init__(self, **kwargs): - super(PartitionHealthStateFilter, self).__init__(**kwargs) - self.partition_id_filter = kwargs.get('partition_id_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - self.replica_filters = kwargs.get('replica_filters', None) - - -class PartitionInstanceCountScaleMechanism(ScalingMechanismDescription): - """Represents a scaling mechanism for adding or removing instances of - stateless service partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param min_instance_count: Required. Minimum number of instances of the - partition. - :type min_instance_count: int - :param max_instance_count: Required. Maximum number of instances of the - partition. - :type max_instance_count: int - :param scale_increment: Required. The number of instances to add or remove - during a scaling operation. - :type scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_instance_count': {'required': True}, - 'max_instance_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'max_instance_count': {'key': 'MaxInstanceCount', 'type': 'int'}, - 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(PartitionInstanceCountScaleMechanism, self).__init__(**kwargs) - self.min_instance_count = kwargs.get('min_instance_count', None) - self.max_instance_count = kwargs.get('max_instance_count', None) - self.scale_increment = kwargs.get('scale_increment', None) - self.kind = 'PartitionInstanceCount' - - -class PartitionLoadInformation(Model): - """Represents load information for a partition, which contains the primary and - secondary reported load metrics. - In case there is no load reported, PartitionLoadInformation will contain - the default load for the service of the partition. - For default loads, LoadMetricReport's LastReportedUtc is set to 0. - - :param partition_id: Id of the partition. - :type partition_id: str - :param primary_load_metric_reports: Array of load reports from the primary - replica for this partition. - :type primary_load_metric_reports: - list[~azure.servicefabric.models.LoadMetricReport] - :param secondary_load_metric_reports: Array of aggregated load reports - from all secondary replicas for this partition. - Array only contains the latest reported load for each metric. - :type secondary_load_metric_reports: - list[~azure.servicefabric.models.LoadMetricReport] - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'primary_load_metric_reports': {'key': 'PrimaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - 'secondary_load_metric_reports': {'key': 'SecondaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - } - - def __init__(self, **kwargs): - super(PartitionLoadInformation, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.primary_load_metric_reports = kwargs.get('primary_load_metric_reports', None) - self.secondary_load_metric_reports = kwargs.get('secondary_load_metric_reports', None) - - -class PartitionMetricLoadDescription(Model): - """Represents load information for a partition, which contains the metrics - load information about primary, all secondary replicas/instances or a - specific secondary replica/instance located on a specific node. - - :param partition_id: Id of the partition. - :type partition_id: str - :param primary_replica_load_entries: Partition's load information for - primary replica, in case partition is from a stateful service. - :type primary_replica_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :param secondary_replicas_or_instances_load_entries: Partition's load - information for all secondary replicas or instances. - :type secondary_replicas_or_instances_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :param secondary_replica_or_instance_load_entries_per_node: Partition's - load information for a specific secondary replica or instance located on a - specific node. - :type secondary_replica_or_instance_load_entries_per_node: - list[~azure.servicefabric.models.ReplicaMetricLoadDescription] - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'primary_replica_load_entries': {'key': 'PrimaryReplicaLoadEntries', 'type': '[MetricLoadDescription]'}, - 'secondary_replicas_or_instances_load_entries': {'key': 'SecondaryReplicasOrInstancesLoadEntries', 'type': '[MetricLoadDescription]'}, - 'secondary_replica_or_instance_load_entries_per_node': {'key': 'SecondaryReplicaOrInstanceLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, - } - - def __init__(self, **kwargs): - super(PartitionMetricLoadDescription, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.primary_replica_load_entries = kwargs.get('primary_replica_load_entries', None) - self.secondary_replicas_or_instances_load_entries = kwargs.get('secondary_replicas_or_instances_load_entries', None) - self.secondary_replica_or_instance_load_entries_per_node = kwargs.get('secondary_replica_or_instance_load_entries_per_node', None) - - -class PartitionNewHealthReportEvent(PartitionEvent): - """Partition Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(PartitionNewHealthReportEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'PartitionNewHealthReport' - - -class PartitionPrimaryMoveAnalysisEvent(PartitionAnalysisEvent): - """Partition Primary Move Analysis event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param metadata: Required. Metadata about an Analysis Event. - :type metadata: ~azure.servicefabric.models.AnalysisEventMetadata - :param when_move_completed: Required. Time when the move was completed. - :type when_move_completed: datetime - :param previous_node: Required. The name of a Service Fabric node. - :type previous_node: str - :param current_node: Required. The name of a Service Fabric node. - :type current_node: str - :param move_reason: Required. Move reason. - :type move_reason: str - :param relevant_traces: Required. Relevant traces. - :type relevant_traces: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'metadata': {'required': True}, - 'when_move_completed': {'required': True}, - 'previous_node': {'required': True}, - 'current_node': {'required': True}, - 'move_reason': {'required': True}, - 'relevant_traces': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, - 'when_move_completed': {'key': 'WhenMoveCompleted', 'type': 'iso-8601'}, - 'previous_node': {'key': 'PreviousNode', 'type': 'str'}, - 'current_node': {'key': 'CurrentNode', 'type': 'str'}, - 'move_reason': {'key': 'MoveReason', 'type': 'str'}, - 'relevant_traces': {'key': 'RelevantTraces', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartitionPrimaryMoveAnalysisEvent, self).__init__(**kwargs) - self.when_move_completed = kwargs.get('when_move_completed', None) - self.previous_node = kwargs.get('previous_node', None) - self.current_node = kwargs.get('current_node', None) - self.move_reason = kwargs.get('move_reason', None) - self.relevant_traces = kwargs.get('relevant_traces', None) - self.kind = 'PartitionPrimaryMoveAnalysis' - - -class PartitionQuorumLossProgress(Model): - """Information about a partition quorum loss user-induced operation. - - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param invoke_quorum_loss_result: Represents information about an - operation in a terminal state (Completed or Faulted). - :type invoke_quorum_loss_result: - ~azure.servicefabric.models.InvokeQuorumLossResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'invoke_quorum_loss_result': {'key': 'InvokeQuorumLossResult', 'type': 'InvokeQuorumLossResult'}, - } - - def __init__(self, **kwargs): - super(PartitionQuorumLossProgress, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.invoke_quorum_loss_result = kwargs.get('invoke_quorum_loss_result', None) - - -class PartitionReconfiguredEvent(PartitionEvent): - """Partition Reconfiguration event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: Required. Id of Node instance. - :type node_instance_id: str - :param service_type: Required. Type of Service. - :type service_type: str - :param cc_epoch_data_loss_version: Required. CcEpochDataLoss version. - :type cc_epoch_data_loss_version: long - :param cc_epoch_config_version: Required. CcEpochConfig version. - :type cc_epoch_config_version: long - :param reconfig_type: Required. Type of reconfiguration. - :type reconfig_type: str - :param result: Required. Describes reconfiguration result. - :type result: str - :param phase0_duration_ms: Required. Duration of Phase0 in milli-seconds. - :type phase0_duration_ms: float - :param phase1_duration_ms: Required. Duration of Phase1 in milli-seconds. - :type phase1_duration_ms: float - :param phase2_duration_ms: Required. Duration of Phase2 in milli-seconds. - :type phase2_duration_ms: float - :param phase3_duration_ms: Required. Duration of Phase3 in milli-seconds. - :type phase3_duration_ms: float - :param phase4_duration_ms: Required. Duration of Phase4 in milli-seconds. - :type phase4_duration_ms: float - :param total_duration_ms: Required. Total duration in milli-seconds. - :type total_duration_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'service_type': {'required': True}, - 'cc_epoch_data_loss_version': {'required': True}, - 'cc_epoch_config_version': {'required': True}, - 'reconfig_type': {'required': True}, - 'result': {'required': True}, - 'phase0_duration_ms': {'required': True}, - 'phase1_duration_ms': {'required': True}, - 'phase2_duration_ms': {'required': True}, - 'phase3_duration_ms': {'required': True}, - 'phase4_duration_ms': {'required': True}, - 'total_duration_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - 'service_type': {'key': 'ServiceType', 'type': 'str'}, - 'cc_epoch_data_loss_version': {'key': 'CcEpochDataLossVersion', 'type': 'long'}, - 'cc_epoch_config_version': {'key': 'CcEpochConfigVersion', 'type': 'long'}, - 'reconfig_type': {'key': 'ReconfigType', 'type': 'str'}, - 'result': {'key': 'Result', 'type': 'str'}, - 'phase0_duration_ms': {'key': 'Phase0DurationMs', 'type': 'float'}, - 'phase1_duration_ms': {'key': 'Phase1DurationMs', 'type': 'float'}, - 'phase2_duration_ms': {'key': 'Phase2DurationMs', 'type': 'float'}, - 'phase3_duration_ms': {'key': 'Phase3DurationMs', 'type': 'float'}, - 'phase4_duration_ms': {'key': 'Phase4DurationMs', 'type': 'float'}, - 'total_duration_ms': {'key': 'TotalDurationMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(PartitionReconfiguredEvent, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.node_instance_id = kwargs.get('node_instance_id', None) - self.service_type = kwargs.get('service_type', None) - self.cc_epoch_data_loss_version = kwargs.get('cc_epoch_data_loss_version', None) - self.cc_epoch_config_version = kwargs.get('cc_epoch_config_version', None) - self.reconfig_type = kwargs.get('reconfig_type', None) - self.result = kwargs.get('result', None) - self.phase0_duration_ms = kwargs.get('phase0_duration_ms', None) - self.phase1_duration_ms = kwargs.get('phase1_duration_ms', None) - self.phase2_duration_ms = kwargs.get('phase2_duration_ms', None) - self.phase3_duration_ms = kwargs.get('phase3_duration_ms', None) - self.phase4_duration_ms = kwargs.get('phase4_duration_ms', None) - self.total_duration_ms = kwargs.get('total_duration_ms', None) - self.kind = 'PartitionReconfigured' - - -class PartitionRestartProgress(Model): - """Information about a partition restart user-induced operation. - - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param restart_partition_result: Represents information about an operation - in a terminal state (Completed or Faulted). - :type restart_partition_result: - ~azure.servicefabric.models.RestartPartitionResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'restart_partition_result': {'key': 'RestartPartitionResult', 'type': 'RestartPartitionResult'}, - } - - def __init__(self, **kwargs): - super(PartitionRestartProgress, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.restart_partition_result = kwargs.get('restart_partition_result', None) - - -class PartitionsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for the partitions of a service, containing - health evaluations for each unhealthy partition that impacts current - aggregated health state. Can be returned when evaluating service health and - the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_partitions_per_service: Maximum allowed - percentage of unhealthy partitions per service from the - ServiceTypeHealthPolicy. - :type max_percent_unhealthy_partitions_per_service: int - :param total_count: Total number of partitions of the service from the - health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - PartitionHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(PartitionsHealthEvaluation, self).__init__(**kwargs) - self.max_percent_unhealthy_partitions_per_service = kwargs.get('max_percent_unhealthy_partitions_per_service', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Partitions' - - -class ReplicatorStatus(Model): - """Represents a base class for primary or secondary replicator status. - Contains information about the service fabric replicator like the - replication/copy queue utilization, last acknowledgement received - timestamp, etc. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PrimaryReplicatorStatus, SecondaryReplicatorStatus - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Primary': 'PrimaryReplicatorStatus', 'SecondaryReplicatorStatus': 'SecondaryReplicatorStatus'} - } - - def __init__(self, **kwargs): - super(ReplicatorStatus, self).__init__(**kwargs) - self.kind = None - - -class PrimaryReplicatorStatus(ReplicatorStatus): - """Provides statistics about the Service Fabric Replicator, when it is - functioning in a Primary role. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param replication_queue_status: Details about the replication queue on - the primary replicator. - :type replication_queue_status: - ~azure.servicefabric.models.ReplicatorQueueStatus - :param remote_replicators: The status of all the active and idle secondary - replicators that the primary is aware of. - :type remote_replicators: - list[~azure.servicefabric.models.RemoteReplicatorStatus] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'remote_replicators': {'key': 'RemoteReplicators', 'type': '[RemoteReplicatorStatus]'}, - } - - def __init__(self, **kwargs): - super(PrimaryReplicatorStatus, self).__init__(**kwargs) - self.replication_queue_status = kwargs.get('replication_queue_status', None) - self.remote_replicators = kwargs.get('remote_replicators', None) - self.kind = 'Primary' - - -class Probe(Model): - """Probes have a number of fields that you can use to control their behavior. - - :param initial_delay_seconds: The initial delay in seconds to start - executing probe once codepackage has started. Default value: 0 . - :type initial_delay_seconds: int - :param period_seconds: Periodic seconds to execute probe. Default value: - 10 . - :type period_seconds: int - :param timeout_seconds: Period after which probe is considered as failed - if it hasn't completed successfully. Default value: 1 . - :type timeout_seconds: int - :param success_threshold: The count of succcessful probe executions after - which probe is considered success. Default value: 1 . - :type success_threshold: int - :param failure_threshold: The count of failures after which probe is - considered failed. Default value: 3 . - :type failure_threshold: int - :param exec_property: Exec command to run inside the container. - :type exec_property: ~azure.servicefabric.models.ProbeExec - :param http_get: Http probe for the container. - :type http_get: ~azure.servicefabric.models.ProbeHttpGet - :param tcp_socket: Tcp port to probe inside the container. - :type tcp_socket: ~azure.servicefabric.models.ProbeTcpSocket - """ - - _attribute_map = { - 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, - 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, - 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, - 'exec_property': {'key': 'exec', 'type': 'ProbeExec'}, - 'http_get': {'key': 'httpGet', 'type': 'ProbeHttpGet'}, - 'tcp_socket': {'key': 'tcpSocket', 'type': 'ProbeTcpSocket'}, - } - - def __init__(self, **kwargs): - super(Probe, self).__init__(**kwargs) - self.initial_delay_seconds = kwargs.get('initial_delay_seconds', 0) - self.period_seconds = kwargs.get('period_seconds', 10) - self.timeout_seconds = kwargs.get('timeout_seconds', 1) - self.success_threshold = kwargs.get('success_threshold', 1) - self.failure_threshold = kwargs.get('failure_threshold', 3) - self.exec_property = kwargs.get('exec_property', None) - self.http_get = kwargs.get('http_get', None) - self.tcp_socket = kwargs.get('tcp_socket', None) - - -class ProbeExec(Model): - """Exec command to run inside the container. - - All required parameters must be populated in order to send to Azure. - - :param command: Required. Comma seperated command to run inside the - container for example "sh, -c, echo hello world". - :type command: str - """ - - _validation = { - 'command': {'required': True}, - } - - _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProbeExec, self).__init__(**kwargs) - self.command = kwargs.get('command', None) - - -class ProbeHttpGet(Model): - """Http probe for the container. - - All required parameters must be populated in order to send to Azure. - - :param port: Required. Port to access for probe. - :type port: int - :param path: Path to access on the HTTP request. - :type path: str - :param host: Host IP to connect to. - :type host: str - :param http_headers: Headers to set in the request. - :type http_headers: list[~azure.servicefabric.models.ProbeHttpGetHeaders] - :param scheme: Scheme for the http probe. Can be Http or Https. Possible - values include: 'http', 'https' - :type scheme: str or ~azure.servicefabric.models.Scheme - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'port': {'key': 'port', 'type': 'int'}, - 'path': {'key': 'path', 'type': 'str'}, - 'host': {'key': 'host', 'type': 'str'}, - 'http_headers': {'key': 'httpHeaders', 'type': '[ProbeHttpGetHeaders]'}, - 'scheme': {'key': 'scheme', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProbeHttpGet, self).__init__(**kwargs) - self.port = kwargs.get('port', None) - self.path = kwargs.get('path', None) - self.host = kwargs.get('host', None) - self.http_headers = kwargs.get('http_headers', None) - self.scheme = kwargs.get('scheme', None) - - -class ProbeHttpGetHeaders(Model): - """Http headers. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the header. - :type name: str - :param value: Required. The value of the header. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProbeHttpGetHeaders, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - - -class ProbeTcpSocket(Model): - """Tcp port to probe inside the container. - - All required parameters must be populated in order to send to Azure. - - :param port: Required. Port to access for probe. - :type port: int - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ProbeTcpSocket, self).__init__(**kwargs) - self.port = kwargs.get('port', None) - - -class PropertyBatchDescriptionList(Model): - """Describes a list of property batch operations to be executed. Either all or - none of the operations will be committed. - - :param operations: A list of the property batch operations to be executed. - :type operations: list[~azure.servicefabric.models.PropertyBatchOperation] - """ - - _attribute_map = { - 'operations': {'key': 'Operations', 'type': '[PropertyBatchOperation]'}, - } - - def __init__(self, **kwargs): - super(PropertyBatchDescriptionList, self).__init__(**kwargs) - self.operations = kwargs.get('operations', None) - - -class PropertyDescription(Model): - """Description of a Service Fabric property. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param custom_type_id: The property's custom type ID. Using this property, - the user is able to tag the type of the value of the property. - :type custom_type_id: str - :param value: Required. Describes a Service Fabric property value. - :type value: ~azure.servicefabric.models.PropertyValue - """ - - _validation = { - 'property_name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - } - - def __init__(self, **kwargs): - super(PropertyDescription, self).__init__(**kwargs) - self.property_name = kwargs.get('property_name', None) - self.custom_type_id = kwargs.get('custom_type_id', None) - self.value = kwargs.get('value', None) - - -class PropertyInfo(Model): - """Information about a Service Fabric property. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the Service Fabric property. - :type name: str - :param value: Describes a Service Fabric property value. - :type value: ~azure.servicefabric.models.PropertyValue - :param metadata: Required. The metadata associated with a property, - including the property's name. - :type metadata: ~azure.servicefabric.models.PropertyMetadata - """ - - _validation = { - 'name': {'required': True}, - 'metadata': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - 'metadata': {'key': 'Metadata', 'type': 'PropertyMetadata'}, - } - - def __init__(self, **kwargs): - super(PropertyInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - self.metadata = kwargs.get('metadata', None) - - -class PropertyMetadata(Model): - """The metadata associated with a property, including the property's name. - - :param type_id: The kind of property, determined by the type of data. - Following are the possible values. Possible values include: 'Invalid', - 'Binary', 'Int64', 'Double', 'String', 'Guid' - :type type_id: str or ~azure.servicefabric.models.PropertyValueKind - :param custom_type_id: The property's custom type ID. - :type custom_type_id: str - :param parent: The name of the parent Service Fabric Name for the - property. It could be thought of as the name-space/table under which the - property exists. - :type parent: str - :param size_in_bytes: The length of the serialized property value. - :type size_in_bytes: int - :param last_modified_utc_timestamp: Represents when the Property was last - modified. Only write operations will cause this field to be updated. - :type last_modified_utc_timestamp: datetime - :param sequence_number: The version of the property. Every time a property - is modified, its sequence number is increased. - :type sequence_number: str - """ - - _attribute_map = { - 'type_id': {'key': 'TypeId', 'type': 'str'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - 'parent': {'key': 'Parent', 'type': 'str'}, - 'size_in_bytes': {'key': 'SizeInBytes', 'type': 'int'}, - 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PropertyMetadata, self).__init__(**kwargs) - self.type_id = kwargs.get('type_id', None) - self.custom_type_id = kwargs.get('custom_type_id', None) - self.parent = kwargs.get('parent', None) - self.size_in_bytes = kwargs.get('size_in_bytes', None) - self.last_modified_utc_timestamp = kwargs.get('last_modified_utc_timestamp', None) - self.sequence_number = kwargs.get('sequence_number', None) - - -class ProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): - """Describes the operation to register or provision an application type using - an application package uploaded to the Service Fabric image store. - - All required parameters must be populated in order to send to Azure. - - :param async_property: Required. Indicates whether or not provisioning - should occur asynchronously. When set to true, the provision operation - returns when the request is accepted by the system, and the provision - operation continues without any timeout limit. The default value is false. - For large application packages, we recommend setting the value to true. - :type async_property: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_type_build_path: Required. The relative path for the - application package in the image store specified during the prior upload - operation. - :type application_type_build_path: str - :param application_package_cleanup_policy: The kind of action that needs - to be taken for cleaning up the application package after successful - provision. Possible values include: 'Invalid', 'Default', 'Automatic', - 'Manual' - :type application_package_cleanup_policy: str or - ~azure.servicefabric.models.ApplicationPackageCleanupPolicy - """ - - _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, - 'application_type_build_path': {'required': True}, - } - - _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, - 'application_package_cleanup_policy': {'key': 'ApplicationPackageCleanupPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProvisionApplicationTypeDescription, self).__init__(**kwargs) - self.application_type_build_path = kwargs.get('application_type_build_path', None) - self.application_package_cleanup_policy = kwargs.get('application_package_cleanup_policy', None) - self.kind = 'ImageStorePath' - - -class ProvisionFabricDescription(Model): - """Describes the parameters for provisioning a cluster. - - :param code_file_path: The cluster code package file path. - :type code_file_path: str - :param cluster_manifest_file_path: The cluster manifest file path. - :type cluster_manifest_file_path: str - """ - - _attribute_map = { - 'code_file_path': {'key': 'CodeFilePath', 'type': 'str'}, - 'cluster_manifest_file_path': {'key': 'ClusterManifestFilePath', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProvisionFabricDescription, self).__init__(**kwargs) - self.code_file_path = kwargs.get('code_file_path', None) - self.cluster_manifest_file_path = kwargs.get('cluster_manifest_file_path', None) - - -class PutPropertyBatchOperation(PropertyBatchOperation): - """Puts the specified property under the specified name. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param value: Required. Describes a Service Fabric property value. - :type value: ~azure.servicefabric.models.PropertyValue - :param custom_type_id: The property's custom type ID. Using this property, - the user is able to tag the type of the value of the property. - :type custom_type_id: str - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PutPropertyBatchOperation, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.custom_type_id = kwargs.get('custom_type_id', None) - self.kind = 'Put' - - -class ReconfigurationInformation(Model): - """Information about current reconfiguration like phase, type, previous - configuration role of replica and reconfiguration start date time. - - :param previous_configuration_role: Replica role before reconfiguration - started. Possible values include: 'Unknown', 'None', 'Primary', - 'IdleSecondary', 'ActiveSecondary' - :type previous_configuration_role: str or - ~azure.servicefabric.models.ReplicaRole - :param reconfiguration_phase: Current phase of ongoing reconfiguration. If - no reconfiguration is taking place then this value will be "None". - Possible values include: 'Unknown', 'None', 'Phase0', 'Phase1', 'Phase2', - 'Phase3', 'Phase4', 'AbortPhaseZero' - :type reconfiguration_phase: str or - ~azure.servicefabric.models.ReconfigurationPhase - :param reconfiguration_type: Type of current ongoing reconfiguration. If - no reconfiguration is taking place then this value will be "None". - Possible values include: 'Unknown', 'SwapPrimary', 'Failover', 'Other' - :type reconfiguration_type: str or - ~azure.servicefabric.models.ReconfigurationType - :param reconfiguration_start_time_utc: Start time (in UTC) of the ongoing - reconfiguration. If no reconfiguration is taking place then this value - will be zero date-time. - :type reconfiguration_start_time_utc: datetime - """ - - _attribute_map = { - 'previous_configuration_role': {'key': 'PreviousConfigurationRole', 'type': 'str'}, - 'reconfiguration_phase': {'key': 'ReconfigurationPhase', 'type': 'str'}, - 'reconfiguration_type': {'key': 'ReconfigurationType', 'type': 'str'}, - 'reconfiguration_start_time_utc': {'key': 'ReconfigurationStartTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ReconfigurationInformation, self).__init__(**kwargs) - self.previous_configuration_role = kwargs.get('previous_configuration_role', None) - self.reconfiguration_phase = kwargs.get('reconfiguration_phase', None) - self.reconfiguration_type = kwargs.get('reconfiguration_type', None) - self.reconfiguration_start_time_utc = kwargs.get('reconfiguration_start_time_utc', None) - - -class RegistryCredential(Model): - """Credential information to connect to container registry. - - :param registry_user_name: The user name to connect to container registry. - :type registry_user_name: str - :param registry_password: The password for supplied username to connect to - container registry. - :type registry_password: str - :param password_encrypted: Indicates that supplied container registry - password is encrypted. - :type password_encrypted: bool - """ - - _attribute_map = { - 'registry_user_name': {'key': 'RegistryUserName', 'type': 'str'}, - 'registry_password': {'key': 'RegistryPassword', 'type': 'str'}, - 'password_encrypted': {'key': 'PasswordEncrypted', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RegistryCredential, self).__init__(**kwargs) - self.registry_user_name = kwargs.get('registry_user_name', None) - self.registry_password = kwargs.get('registry_password', None) - self.password_encrypted = kwargs.get('password_encrypted', None) - - -class ReliableCollectionsRef(Model): - """Specifying this parameter adds support for reliable collections. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of ReliableCollection resource. Right now it's - not used and you can use any string. - :type name: str - :param do_not_persist_state: False (the default) if ReliableCollections - state is persisted to disk as usual. True if you do not want to persist - state, in which case replication is still enabled and you can use - ReliableCollections as distributed cache. - :type do_not_persist_state: bool - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'do_not_persist_state': {'key': 'doNotPersistState', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ReliableCollectionsRef, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.do_not_persist_state = kwargs.get('do_not_persist_state', None) - - -class RemoteReplicatorAcknowledgementDetail(Model): - """Provides various statistics of the acknowledgements that are being received - from the remote replicator. - - :param average_receive_duration: Represents the average duration it takes - for the remote replicator to receive an operation. - :type average_receive_duration: str - :param average_apply_duration: Represents the average duration it takes - for the remote replicator to apply an operation. This usually entails - writing the operation to disk. - :type average_apply_duration: str - :param not_received_count: Represents the number of operations not yet - received by a remote replicator. - :type not_received_count: str - :param received_and_not_applied_count: Represents the number of operations - received and not yet applied by a remote replicator. - :type received_and_not_applied_count: str - """ - - _attribute_map = { - 'average_receive_duration': {'key': 'AverageReceiveDuration', 'type': 'str'}, - 'average_apply_duration': {'key': 'AverageApplyDuration', 'type': 'str'}, - 'not_received_count': {'key': 'NotReceivedCount', 'type': 'str'}, - 'received_and_not_applied_count': {'key': 'ReceivedAndNotAppliedCount', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RemoteReplicatorAcknowledgementDetail, self).__init__(**kwargs) - self.average_receive_duration = kwargs.get('average_receive_duration', None) - self.average_apply_duration = kwargs.get('average_apply_duration', None) - self.not_received_count = kwargs.get('not_received_count', None) - self.received_and_not_applied_count = kwargs.get('received_and_not_applied_count', None) - - -class RemoteReplicatorAcknowledgementStatus(Model): - """Provides details about the remote replicators from the primary replicator's - point of view. - - :param replication_stream_acknowledgement_detail: Details about the - acknowledgements for operations that are part of the replication stream - data. - :type replication_stream_acknowledgement_detail: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail - :param copy_stream_acknowledgement_detail: Details about the - acknowledgements for operations that are part of the copy stream data. - :type copy_stream_acknowledgement_detail: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail - """ - - _attribute_map = { - 'replication_stream_acknowledgement_detail': {'key': 'ReplicationStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, - 'copy_stream_acknowledgement_detail': {'key': 'CopyStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, - } - - def __init__(self, **kwargs): - super(RemoteReplicatorAcknowledgementStatus, self).__init__(**kwargs) - self.replication_stream_acknowledgement_detail = kwargs.get('replication_stream_acknowledgement_detail', None) - self.copy_stream_acknowledgement_detail = kwargs.get('copy_stream_acknowledgement_detail', None) - - -class RemoteReplicatorStatus(Model): - """Represents the state of the secondary replicator from the primary - replicator’s point of view. - - :param replica_id: Represents the replica ID of the remote secondary - replicator. - :type replica_id: str - :param last_acknowledgement_processed_time_utc: The last timestamp (in - UTC) when an acknowledgement from the secondary replicator was processed - on the primary. - UTC 0 represents an invalid value, indicating that no acknowledgement - messages were ever processed. - :type last_acknowledgement_processed_time_utc: datetime - :param last_received_replication_sequence_number: The highest replication - operation sequence number that the secondary has received from the - primary. - :type last_received_replication_sequence_number: str - :param last_applied_replication_sequence_number: The highest replication - operation sequence number that the secondary has applied to its state. - :type last_applied_replication_sequence_number: str - :param is_in_build: A value that indicates whether the secondary replica - is in the process of being built. - :type is_in_build: bool - :param last_received_copy_sequence_number: The highest copy operation - sequence number that the secondary has received from the primary. - A value of -1 implies that the secondary has received all copy operations. - :type last_received_copy_sequence_number: str - :param last_applied_copy_sequence_number: The highest copy operation - sequence number that the secondary has applied to its state. - A value of -1 implies that the secondary has applied all copy operations - and the copy process is complete. - :type last_applied_copy_sequence_number: str - :param remote_replicator_acknowledgement_status: Represents the - acknowledgment status for the remote secondary replicator. - :type remote_replicator_acknowledgement_status: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementStatus - """ - - _attribute_map = { - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'last_acknowledgement_processed_time_utc': {'key': 'LastAcknowledgementProcessedTimeUtc', 'type': 'iso-8601'}, - 'last_received_replication_sequence_number': {'key': 'LastReceivedReplicationSequenceNumber', 'type': 'str'}, - 'last_applied_replication_sequence_number': {'key': 'LastAppliedReplicationSequenceNumber', 'type': 'str'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'last_received_copy_sequence_number': {'key': 'LastReceivedCopySequenceNumber', 'type': 'str'}, - 'last_applied_copy_sequence_number': {'key': 'LastAppliedCopySequenceNumber', 'type': 'str'}, - 'remote_replicator_acknowledgement_status': {'key': 'RemoteReplicatorAcknowledgementStatus', 'type': 'RemoteReplicatorAcknowledgementStatus'}, - } - - def __init__(self, **kwargs): - super(RemoteReplicatorStatus, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.last_acknowledgement_processed_time_utc = kwargs.get('last_acknowledgement_processed_time_utc', None) - self.last_received_replication_sequence_number = kwargs.get('last_received_replication_sequence_number', None) - self.last_applied_replication_sequence_number = kwargs.get('last_applied_replication_sequence_number', None) - self.is_in_build = kwargs.get('is_in_build', None) - self.last_received_copy_sequence_number = kwargs.get('last_received_copy_sequence_number', None) - self.last_applied_copy_sequence_number = kwargs.get('last_applied_copy_sequence_number', None) - self.remote_replicator_acknowledgement_status = kwargs.get('remote_replicator_acknowledgement_status', None) - - -class RepairTask(Model): - """Represents a repair task, which includes information about what kind of - repair was requested, what its progress is, and what its final result was. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the repair task. - :type task_id: str - :param version: The version of the repair task. - When creating a new repair task, the version must be set to zero. When - updating a repair task, - the version is used for optimistic concurrency checks. If the version is - set to zero, the update will not check for write conflicts. If the - version is set to a non-zero value, then the - update will only succeed if the actual current version of the repair task - matches this value. - :type version: str - :param description: A description of the purpose of the repair task, or - other informational details. - May be set when the repair task is created, and is immutable once set. - :type description: str - :param state: Required. The workflow state of the repair task. Valid - initial states are Created, Claimed, and Preparing. Possible values - include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', - 'Executing', 'Restoring', 'Completed' - :type state: str or ~azure.servicefabric.models.State - :param flags: A bitwise-OR of the following values, which gives additional - details about the status of the repair task. - - 1 - Cancellation of the repair has been requested - - 2 - Abort of the repair has been requested - - 4 - Approval of the repair was forced via client request - :type flags: int - :param action: Required. The requested repair action. Must be specified - when the repair task is created, and is immutable once set. - :type action: str - :param target: The target object determines what actions the system will - take to prepare for the impact of the repair, prior to approving execution - of the repair. - May be set when the repair task is created, and is immutable once set. - :type target: ~azure.servicefabric.models.RepairTargetDescriptionBase - :param executor: The name of the repair executor. Must be specified in - Claimed and later states, and is immutable once set. - :type executor: str - :param executor_data: A data string that the repair executor can use to - store its internal state. - :type executor_data: str - :param impact: The impact object determines what actions the system will - take to prepare for the impact of the repair, prior to approving execution - of the repair. - Impact must be specified by the repair executor when transitioning to the - Preparing state, and is immutable once set. - :type impact: ~azure.servicefabric.models.RepairImpactDescriptionBase - :param result_status: A value describing the overall result of the repair - task execution. Must be specified in the Restoring and later states, and - is immutable once set. Possible values include: 'Invalid', 'Succeeded', - 'Cancelled', 'Interrupted', 'Failed', 'Pending' - :type result_status: str or ~azure.servicefabric.models.ResultStatus - :param result_code: A numeric value providing additional details about the - result of the repair task execution. - May be specified in the Restoring and later states, and is immutable once - set. - :type result_code: int - :param result_details: A string providing additional details about the - result of the repair task execution. - May be specified in the Restoring and later states, and is immutable once - set. - :type result_details: str - :param history: An object that contains timestamps of the repair task's - state transitions. - These timestamps are updated by the system, and cannot be directly - modified. - :type history: ~azure.servicefabric.models.RepairTaskHistory - :param preparing_health_check_state: The workflow state of the health - check when the repair task is in the Preparing state. Possible values - include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' - :type preparing_health_check_state: str or - ~azure.servicefabric.models.RepairTaskHealthCheckState - :param restoring_health_check_state: The workflow state of the health - check when the repair task is in the Restoring state. Possible values - include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' - :type restoring_health_check_state: str or - ~azure.servicefabric.models.RepairTaskHealthCheckState - :param perform_preparing_health_check: A value to determine if health - checks will be performed when the repair task enters the Preparing state. - :type perform_preparing_health_check: bool - :param perform_restoring_health_check: A value to determine if health - checks will be performed when the repair task enters the Restoring state. - :type perform_restoring_health_check: bool - """ - - _validation = { - 'task_id': {'required': True}, - 'state': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'action': {'key': 'Action', 'type': 'str'}, - 'target': {'key': 'Target', 'type': 'RepairTargetDescriptionBase'}, - 'executor': {'key': 'Executor', 'type': 'str'}, - 'executor_data': {'key': 'ExecutorData', 'type': 'str'}, - 'impact': {'key': 'Impact', 'type': 'RepairImpactDescriptionBase'}, - 'result_status': {'key': 'ResultStatus', 'type': 'str'}, - 'result_code': {'key': 'ResultCode', 'type': 'int'}, - 'result_details': {'key': 'ResultDetails', 'type': 'str'}, - 'history': {'key': 'History', 'type': 'RepairTaskHistory'}, - 'preparing_health_check_state': {'key': 'PreparingHealthCheckState', 'type': 'str'}, - 'restoring_health_check_state': {'key': 'RestoringHealthCheckState', 'type': 'str'}, - 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, - 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RepairTask, self).__init__(**kwargs) - self.task_id = kwargs.get('task_id', None) - self.version = kwargs.get('version', None) - self.description = kwargs.get('description', None) - self.state = kwargs.get('state', None) - self.flags = kwargs.get('flags', None) - self.action = kwargs.get('action', None) - self.target = kwargs.get('target', None) - self.executor = kwargs.get('executor', None) - self.executor_data = kwargs.get('executor_data', None) - self.impact = kwargs.get('impact', None) - self.result_status = kwargs.get('result_status', None) - self.result_code = kwargs.get('result_code', None) - self.result_details = kwargs.get('result_details', None) - self.history = kwargs.get('history', None) - self.preparing_health_check_state = kwargs.get('preparing_health_check_state', None) - self.restoring_health_check_state = kwargs.get('restoring_health_check_state', None) - self.perform_preparing_health_check = kwargs.get('perform_preparing_health_check', None) - self.perform_restoring_health_check = kwargs.get('perform_restoring_health_check', None) - - -class RepairTaskApproveDescription(Model): - """Describes a request for forced approval of a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the repair task. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current version of the repair task. If zero, then no version check - is performed. - :type version: str - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RepairTaskApproveDescription, self).__init__(**kwargs) - self.task_id = kwargs.get('task_id', None) - self.version = kwargs.get('version', None) - - -class RepairTaskCancelDescription(Model): - """Describes a request to cancel a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the repair task. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current version of the repair task. If zero, then no version check - is performed. - :type version: str - :param request_abort: _True_ if the repair should be stopped as soon as - possible even if it has already started executing. _False_ if the repair - should be cancelled only if execution has not yet started. - :type request_abort: bool - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'request_abort': {'key': 'RequestAbort', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RepairTaskCancelDescription, self).__init__(**kwargs) - self.task_id = kwargs.get('task_id', None) - self.version = kwargs.get('version', None) - self.request_abort = kwargs.get('request_abort', None) - - -class RepairTaskDeleteDescription(Model): - """Describes a request to delete a completed repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the completed repair task to be - deleted. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current version of the repair task. If zero, then no version check - is performed. - :type version: str - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RepairTaskDeleteDescription, self).__init__(**kwargs) - self.task_id = kwargs.get('task_id', None) - self.version = kwargs.get('version', None) - - -class RepairTaskHistory(Model): - """A record of the times when the repair task entered each state. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - :param created_utc_timestamp: The time when the repair task entered the - Created state. - :type created_utc_timestamp: datetime - :param claimed_utc_timestamp: The time when the repair task entered the - Claimed state. - :type claimed_utc_timestamp: datetime - :param preparing_utc_timestamp: The time when the repair task entered the - Preparing state. - :type preparing_utc_timestamp: datetime - :param approved_utc_timestamp: The time when the repair task entered the - Approved state - :type approved_utc_timestamp: datetime - :param executing_utc_timestamp: The time when the repair task entered the - Executing state - :type executing_utc_timestamp: datetime - :param restoring_utc_timestamp: The time when the repair task entered the - Restoring state - :type restoring_utc_timestamp: datetime - :param completed_utc_timestamp: The time when the repair task entered the - Completed state - :type completed_utc_timestamp: datetime - :param preparing_health_check_start_utc_timestamp: The time when the - repair task started the health check in the Preparing state. - :type preparing_health_check_start_utc_timestamp: datetime - :param preparing_health_check_end_utc_timestamp: The time when the repair - task completed the health check in the Preparing state. - :type preparing_health_check_end_utc_timestamp: datetime - :param restoring_health_check_start_utc_timestamp: The time when the - repair task started the health check in the Restoring state. - :type restoring_health_check_start_utc_timestamp: datetime - :param restoring_health_check_end_utc_timestamp: The time when the repair - task completed the health check in the Restoring state. - :type restoring_health_check_end_utc_timestamp: datetime - """ - - _attribute_map = { - 'created_utc_timestamp': {'key': 'CreatedUtcTimestamp', 'type': 'iso-8601'}, - 'claimed_utc_timestamp': {'key': 'ClaimedUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_utc_timestamp': {'key': 'PreparingUtcTimestamp', 'type': 'iso-8601'}, - 'approved_utc_timestamp': {'key': 'ApprovedUtcTimestamp', 'type': 'iso-8601'}, - 'executing_utc_timestamp': {'key': 'ExecutingUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_utc_timestamp': {'key': 'RestoringUtcTimestamp', 'type': 'iso-8601'}, - 'completed_utc_timestamp': {'key': 'CompletedUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_health_check_start_utc_timestamp': {'key': 'PreparingHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_health_check_end_utc_timestamp': {'key': 'PreparingHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_health_check_start_utc_timestamp': {'key': 'RestoringHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_health_check_end_utc_timestamp': {'key': 'RestoringHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RepairTaskHistory, self).__init__(**kwargs) - self.created_utc_timestamp = kwargs.get('created_utc_timestamp', None) - self.claimed_utc_timestamp = kwargs.get('claimed_utc_timestamp', None) - self.preparing_utc_timestamp = kwargs.get('preparing_utc_timestamp', None) - self.approved_utc_timestamp = kwargs.get('approved_utc_timestamp', None) - self.executing_utc_timestamp = kwargs.get('executing_utc_timestamp', None) - self.restoring_utc_timestamp = kwargs.get('restoring_utc_timestamp', None) - self.completed_utc_timestamp = kwargs.get('completed_utc_timestamp', None) - self.preparing_health_check_start_utc_timestamp = kwargs.get('preparing_health_check_start_utc_timestamp', None) - self.preparing_health_check_end_utc_timestamp = kwargs.get('preparing_health_check_end_utc_timestamp', None) - self.restoring_health_check_start_utc_timestamp = kwargs.get('restoring_health_check_start_utc_timestamp', None) - self.restoring_health_check_end_utc_timestamp = kwargs.get('restoring_health_check_end_utc_timestamp', None) - - -class RepairTaskUpdateHealthPolicyDescription(Model): - """Describes a request to update the health policy of a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the repair task to be updated. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current value of the repair task. If zero, then no version check is - performed. - :type version: str - :param perform_preparing_health_check: A boolean indicating if health - check is to be performed in the Preparing stage of the repair task. If not - specified the existing value should not be altered. Otherwise, specify the - desired new value. - :type perform_preparing_health_check: bool - :param perform_restoring_health_check: A boolean indicating if health - check is to be performed in the Restoring stage of the repair task. If not - specified the existing value should not be altered. Otherwise, specify the - desired new value. - :type perform_restoring_health_check: bool - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, - 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RepairTaskUpdateHealthPolicyDescription, self).__init__(**kwargs) - self.task_id = kwargs.get('task_id', None) - self.version = kwargs.get('version', None) - self.perform_preparing_health_check = kwargs.get('perform_preparing_health_check', None) - self.perform_restoring_health_check = kwargs.get('perform_restoring_health_check', None) - - -class RepairTaskUpdateInfo(Model): - """Describes the result of an operation that created or updated a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param version: Required. The new version of the repair task. - :type version: str - """ - - _validation = { - 'version': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RepairTaskUpdateInfo, self).__init__(**kwargs) - self.version = kwargs.get('version', None) - - -class ReplicaHealth(EntityHealth): - """Represents a base class for stateful service replica or stateless service - instance health. - Contains the replica aggregated health state, the health events and the - unhealthy evaluations. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaHealth, - StatelessServiceInstanceHealth - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param partition_id: Id of the partition to which this replica belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaHealth', 'Stateless': 'StatelessServiceInstanceHealth'} - } - - def __init__(self, **kwargs): - super(ReplicaHealth, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.service_kind = None - self.service_kind = 'ReplicaHealth' - - -class ReplicaHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a replica, containing information about - the data and the algorithm used by health store to evaluate health. The - evaluation is returned only when the aggregated health state is either - Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition to which the replica belongs. - :type partition_id: str - :param replica_or_instance_id: Id of a stateful service replica or a - stateless service instance. This ID is used in the queries that apply to - both stateful and stateless services. It is used by Service Fabric to - uniquely identify a replica of a partition of a stateful service or an - instance of a stateless service partition. It is unique within a partition - and does not change for the lifetime of the replica or the instance. If a - stateful replica gets dropped and another replica gets created on the same - node for the same partition, it will get a different value for the ID. If - a stateless instance is failed over on the same or different node it will - get a different value for the ID. - :type replica_or_instance_id: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the replica. The types of the - unhealthy evaluations can be EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(ReplicaHealthEvaluation, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.replica_or_instance_id = kwargs.get('replica_or_instance_id', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Replica' - - -class ReplicaHealthState(EntityHealthState): - """Represents a base class for stateful service replica or stateless service - instance health state. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaHealthState, - StatelessServiceInstanceHealthState - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param partition_id: The ID of the partition to which this replica - belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaHealthState', 'Stateless': 'StatelessServiceInstanceHealthState'} - } - - def __init__(self, **kwargs): - super(ReplicaHealthState, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.service_kind = None - self.service_kind = 'ReplicaHealthState' - - -class ReplicaHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a stateful service replica or a - stateless service instance. - The replica health state contains the replica ID and its aggregated health - state. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param replica_or_instance_id: Id of a stateful service replica or a - stateless service instance. This ID is used in the queries that apply to - both stateful and stateless services. It is used by Service Fabric to - uniquely identify a replica of a partition of a stateful service or an - instance of a stateless service partition. It is unique within a partition - and does not change for the lifetime of the replica or the instance. If a - stateful replica gets dropped and another replica gets created on the same - node for the same partition, it will get a different value for the ID. If - a stateless instance is failed over on the same or different node it will - get a different value for the ID. - :type replica_or_instance_id: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReplicaHealthStateChunk, self).__init__(**kwargs) - self.replica_or_instance_id = kwargs.get('replica_or_instance_id', None) - - -class ReplicaHealthStateChunkList(Model): - """The list of replica health state chunks that respect the input filters in - the chunk query. Returned by get cluster health state chunks query. - - :param items: The list of replica health state chunks that respect the - input filters in the chunk query. - :type items: list[~azure.servicefabric.models.ReplicaHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[ReplicaHealthStateChunk]'}, - } - - def __init__(self, **kwargs): - super(ReplicaHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) - - -class ReplicaHealthStateFilter(Model): - """Defines matching criteria to determine whether a replica should be included - as a child of a partition in the cluster health chunk. - The replicas are only returned if the parent entities match a filter - specified in the cluster health chunk query description. The parent - partition, service and application must be included in the cluster health - chunk. - One filter can match zero, one or multiple replicas, depending on its - properties. - - :param replica_or_instance_id_filter: Id of the stateful service replica - or stateless service instance that matches the filter. The filter is - applied only to the specified replica, if it exists. - If the replica doesn't exist, no replica is returned in the cluster health - chunk based on this filter. - If the replica exists, it is included in the cluster health chunk if it - respects the other filter properties. - If not specified, all replicas that match the parent filters (if any) are - taken into consideration and matched against the other filter members, - like health state filter. - :type replica_or_instance_id_filter: str - :param health_state_filter: The filter for the health state of the - replicas. It allows selecting replicas if they match the desired health - states. - The possible values are integer value of one of the following health - states. Only replicas that match the filter are returned. All replicas are - used to evaluate the parent partition aggregated health state. - If not specified, default value is None, unless the replica ID is - specified. If the filter has default value and replica ID is specified, - the matching replica is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches replicas with - HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - """ - - _attribute_map = { - 'replica_or_instance_id_filter': {'key': 'ReplicaOrInstanceIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ReplicaHealthStateFilter, self).__init__(**kwargs) - self.replica_or_instance_id_filter = kwargs.get('replica_or_instance_id_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - - -class ReplicaInfo(Model): - """Information about the identity, status, health, node name, uptime, and - other details about the replica. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaInfo, StatelessServiceInstanceInfo - - All required parameters must be populated in order to send to Azure. - - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param address: The address the replica is listening on. - :type address: str - :param last_in_build_duration_in_seconds: The last in build duration of - the replica in seconds. - :type last_in_build_duration_in_seconds: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaInfo', 'Stateless': 'StatelessServiceInstanceInfo'} - } - - def __init__(self, **kwargs): - super(ReplicaInfo, self).__init__(**kwargs) - self.replica_status = kwargs.get('replica_status', None) - self.health_state = kwargs.get('health_state', None) - self.node_name = kwargs.get('node_name', None) - self.address = kwargs.get('address', None) - self.last_in_build_duration_in_seconds = kwargs.get('last_in_build_duration_in_seconds', None) - self.service_kind = None - - -class ReplicaLifecycleDescription(Model): - """Describes how the replica will behave. - - :param is_singleton_replica_move_allowed_during_upgrade: If set to true, - replicas with a target replica set size of 1 will be permitted to move - during upgrade. - :type is_singleton_replica_move_allowed_during_upgrade: bool - :param restore_replica_location_after_upgrade: If set to true, move/swap - replica to original location after upgrade. - :type restore_replica_location_after_upgrade: bool - """ - - _attribute_map = { - 'is_singleton_replica_move_allowed_during_upgrade': {'key': 'IsSingletonReplicaMoveAllowedDuringUpgrade', 'type': 'bool'}, - 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ReplicaLifecycleDescription, self).__init__(**kwargs) - self.is_singleton_replica_move_allowed_during_upgrade = kwargs.get('is_singleton_replica_move_allowed_during_upgrade', None) - self.restore_replica_location_after_upgrade = kwargs.get('restore_replica_location_after_upgrade', None) - - -class ReplicaMetricLoadDescription(Model): - """Specifies metric loads of a partition's specific secondary replica or - instance. - - :param node_name: Node name of a specific secondary replica or instance. - :type node_name: str - :param replica_or_instance_load_entries: Loads of a different metrics for - a partition's secondary replica or instance. - :type replica_or_instance_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'replica_or_instance_load_entries': {'key': 'ReplicaOrInstanceLoadEntries', 'type': '[MetricLoadDescription]'}, - } - - def __init__(self, **kwargs): - super(ReplicaMetricLoadDescription, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.replica_or_instance_load_entries = kwargs.get('replica_or_instance_load_entries', None) - - -class ReplicasHealthEvaluation(HealthEvaluation): - """Represents health evaluation for replicas, containing health evaluations - for each unhealthy replica that impacted current aggregated health state. - Can be returned when evaluating partition health and the aggregated health - state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_replicas_per_partition: Maximum allowed - percentage of unhealthy replicas per partition from the - ApplicationHealthPolicy. - :type max_percent_unhealthy_replicas_per_partition: int - :param total_count: Total number of replicas in the partition from the - health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - ReplicaHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(ReplicasHealthEvaluation, self).__init__(**kwargs) - self.max_percent_unhealthy_replicas_per_partition = kwargs.get('max_percent_unhealthy_replicas_per_partition', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Replicas' - - -class ReplicatorQueueStatus(Model): - """Provides various statistics of the queue used in the service fabric - replicator. - Contains information about the service fabric replicator like the - replication/copy queue utilization, last acknowledgement received - timestamp, etc. - Depending on the role of the replicator, the properties in this type imply - different meanings. - - :param queue_utilization_percentage: Represents the utilization of the - queue. A value of 0 indicates that the queue is empty and a value of 100 - indicates the queue is full. - :type queue_utilization_percentage: int - :param queue_memory_size: Represents the virtual memory consumed by the - queue in bytes. - :type queue_memory_size: str - :param first_sequence_number: On a primary replicator, this is - semantically the sequence number of the operation for which all the - secondary replicas have sent an acknowledgement. - On a secondary replicator, this is the smallest sequence number of the - operation that is present in the queue. - :type first_sequence_number: str - :param completed_sequence_number: On a primary replicator, this is - semantically the highest sequence number of the operation for which all - the secondary replicas have sent an acknowledgement. - On a secondary replicator, this is semantically the highest sequence - number that has been applied to the persistent state. - :type completed_sequence_number: str - :param committed_sequence_number: On a primary replicator, this is - semantically the highest sequence number of the operation for which a - write quorum of the secondary replicas have sent an acknowledgement. - On a secondary replicator, this is semantically the highest sequence - number of the in-order operation received from the primary. - :type committed_sequence_number: str - :param last_sequence_number: Represents the latest sequence number of the - operation that is available in the queue. - :type last_sequence_number: str - """ - - _attribute_map = { - 'queue_utilization_percentage': {'key': 'QueueUtilizationPercentage', 'type': 'int'}, - 'queue_memory_size': {'key': 'QueueMemorySize', 'type': 'str'}, - 'first_sequence_number': {'key': 'FirstSequenceNumber', 'type': 'str'}, - 'completed_sequence_number': {'key': 'CompletedSequenceNumber', 'type': 'str'}, - 'committed_sequence_number': {'key': 'CommittedSequenceNumber', 'type': 'str'}, - 'last_sequence_number': {'key': 'LastSequenceNumber', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReplicatorQueueStatus, self).__init__(**kwargs) - self.queue_utilization_percentage = kwargs.get('queue_utilization_percentage', None) - self.queue_memory_size = kwargs.get('queue_memory_size', None) - self.first_sequence_number = kwargs.get('first_sequence_number', None) - self.completed_sequence_number = kwargs.get('completed_sequence_number', None) - self.committed_sequence_number = kwargs.get('committed_sequence_number', None) - self.last_sequence_number = kwargs.get('last_sequence_number', None) - - -class ResolvedServiceEndpoint(Model): - """Endpoint of a resolved service partition. - - :param kind: The role of the replica where the endpoint is reported. - Possible values include: 'Invalid', 'Stateless', 'StatefulPrimary', - 'StatefulSecondary' - :type kind: str or ~azure.servicefabric.models.ServiceEndpointRole - :param address: The address of the endpoint. If the endpoint has multiple - listeners the address is a JSON object with one property per listener with - the value as the address of that listener. - :type address: str - """ - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResolvedServiceEndpoint, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.address = kwargs.get('address', None) - - -class ResolvedServicePartition(Model): - """Information about a service partition and its associated endpoints. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The full name of the service with 'fabric:' URI - scheme. - :type name: str - :param partition_information: Required. A representation of the resolved - partition. - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param endpoints: Required. List of resolved service endpoints of a - service partition. - :type endpoints: list[~azure.servicefabric.models.ResolvedServiceEndpoint] - :param version: Required. The version of this resolved service partition - result. This version should be passed in the next time the ResolveService - call is made via the PreviousRspVersion query parameter. - :type version: str - """ - - _validation = { - 'name': {'required': True}, - 'partition_information': {'required': True}, - 'endpoints': {'required': True}, - 'version': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'endpoints': {'key': 'Endpoints', 'type': '[ResolvedServiceEndpoint]'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResolvedServicePartition, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.partition_information = kwargs.get('partition_information', None) - self.endpoints = kwargs.get('endpoints', None) - self.version = kwargs.get('version', None) - - -class ResourceLimits(Model): - """This type describes the resource limits for a given container. It describes - the most amount of resources a container is allowed to use before being - restarted. - - :param memory_in_gb: The memory limit in GB. - :type memory_in_gb: float - :param cpu: CPU limits in cores. At present, only full cores are - supported. - :type cpu: float - """ - - _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ResourceLimits, self).__init__(**kwargs) - self.memory_in_gb = kwargs.get('memory_in_gb', None) - self.cpu = kwargs.get('cpu', None) - - -class ResourceRequests(Model): - """This type describes the requested resources for a given container. It - describes the least amount of resources required for the container. A - container can consume more than requested resources up to the specified - limits before being restarted. Currently, the requested resources are - treated as limits. - - All required parameters must be populated in order to send to Azure. - - :param memory_in_gb: Required. The memory request in GB for this - container. - :type memory_in_gb: float - :param cpu: Required. Requested number of CPU cores. At present, only full - cores are supported. - :type cpu: float - """ - - _validation = { - 'memory_in_gb': {'required': True}, - 'cpu': {'required': True}, - } - - _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ResourceRequests, self).__init__(**kwargs) - self.memory_in_gb = kwargs.get('memory_in_gb', None) - self.cpu = kwargs.get('cpu', None) - - -class ResourceRequirements(Model): - """This type describes the resource requirements for a container or a service. - - All required parameters must be populated in order to send to Azure. - - :param requests: Required. Describes the requested resources for a given - container. - :type requests: ~azure.servicefabric.models.ResourceRequests - :param limits: Describes the maximum limits on the resources for a given - container. - :type limits: ~azure.servicefabric.models.ResourceLimits - """ - - _validation = { - 'requests': {'required': True}, - } - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'ResourceRequests'}, - 'limits': {'key': 'limits', 'type': 'ResourceLimits'}, - } - - def __init__(self, **kwargs): - super(ResourceRequirements, self).__init__(**kwargs) - self.requests = kwargs.get('requests', None) - self.limits = kwargs.get('limits', None) - - -class RestartDeployedCodePackageDescription(Model): - """Defines description for restarting a deployed code package on Service - Fabric node. - - All required parameters must be populated in order to send to Azure. - - :param service_manifest_name: Required. The name of service manifest that - specified this code package. - :type service_manifest_name: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param code_package_name: Required. The name of the code package defined - in the service manifest. - :type code_package_name: str - :param code_package_instance_id: Required. The instance ID for currently - running entry point. For a code package setup entry point (if specified) - runs first and after it finishes main entry point is started. - Each time entry point executable is run, its instance ID will change. If 0 - is passed in as the code package instance ID, the API will restart the - code package with whatever instance ID it is currently running. - If an instance ID other than 0 is passed in, the API will restart the code - package only if the current Instance ID matches the passed in instance ID. - Note, passing in the exact instance ID (not 0) in the API is safer, - because if ensures at most one restart of the code package. - :type code_package_instance_id: str - """ - - _validation = { - 'service_manifest_name': {'required': True}, - 'code_package_name': {'required': True}, - 'code_package_instance_id': {'required': True}, - } - - _attribute_map = { - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'code_package_instance_id': {'key': 'CodePackageInstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestartDeployedCodePackageDescription, self).__init__(**kwargs) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.code_package_instance_id = kwargs.get('code_package_instance_id', None) - - -class RestartNodeDescription(Model): - """Describes the parameters to restart a Service Fabric node. - - All required parameters must be populated in order to send to Azure. - - :param node_instance_id: Required. The instance ID of the target node. If - instance ID is specified the node is restarted only if it matches with the - current instance of the node. A default value of "0" would match any - instance ID. The instance ID can be obtained using get node query. Default - value: "0" . - :type node_instance_id: str - :param create_fabric_dump: Specify True to create a dump of the fabric - node process. This is case-sensitive. Possible values include: 'False', - 'True'. Default value: "False" . - :type create_fabric_dump: str or - ~azure.servicefabric.models.CreateFabricDump - """ - - _validation = { - 'node_instance_id': {'required': True}, - } - - _attribute_map = { - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - 'create_fabric_dump': {'key': 'CreateFabricDump', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestartNodeDescription, self).__init__(**kwargs) - self.node_instance_id = kwargs.get('node_instance_id', "0") - self.create_fabric_dump = kwargs.get('create_fabric_dump', "False") - - -class RestartPartitionResult(Model): - """Represents information about an operation in a terminal state (Completed or - Faulted). - - :param error_code: If OperationState is Completed, this is 0. If - OperationState is Faulted, this is an error code indicating the reason. - :type error_code: int - :param selected_partition: This class returns information about the - partition that the user-induced operation acted upon. - :type selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__(self, **kwargs): - super(RestartPartitionResult, self).__init__(**kwargs) - self.error_code = kwargs.get('error_code', None) - self.selected_partition = kwargs.get('selected_partition', None) - - -class RestorePartitionDescription(Model): - """Specifies the parameters needed to trigger a restore of a specific - partition. - - All required parameters must be populated in order to send to Azure. - - :param backup_id: Required. Unique backup ID. - :type backup_id: str - :param backup_location: Required. Location of the backup relative to the - backup storage specified/ configured. - :type backup_location: str - :param backup_storage: Location of the backup from where the partition - will be restored. - :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription - """ - - _validation = { - 'backup_id': {'required': True}, - 'backup_location': {'required': True}, - } - - _attribute_map = { - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, - } - - def __init__(self, **kwargs): - super(RestorePartitionDescription, self).__init__(**kwargs) - self.backup_id = kwargs.get('backup_id', None) - self.backup_location = kwargs.get('backup_location', None) - self.backup_storage = kwargs.get('backup_storage', None) - - -class RestoreProgressInfo(Model): - """Describes the progress of a restore operation on a partition. - - :param restore_state: Represents the current state of the partition - restore operation. Possible values include: 'Invalid', 'Accepted', - 'RestoreInProgress', 'Success', 'Failure', 'Timeout' - :type restore_state: str or ~azure.servicefabric.models.RestoreState - :param time_stamp_utc: Timestamp when operation succeeded or failed. - :type time_stamp_utc: datetime - :param restored_epoch: Describes the epoch at which the partition is - restored. - :type restored_epoch: ~azure.servicefabric.models.Epoch - :param restored_lsn: Restored LSN. - :type restored_lsn: str - :param failure_error: Denotes the failure encountered in performing - restore operation. - :type failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'restore_state': {'key': 'RestoreState', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'restored_epoch': {'key': 'RestoredEpoch', 'type': 'Epoch'}, - 'restored_lsn': {'key': 'RestoredLsn', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__(self, **kwargs): - super(RestoreProgressInfo, self).__init__(**kwargs) - self.restore_state = kwargs.get('restore_state', None) - self.time_stamp_utc = kwargs.get('time_stamp_utc', None) - self.restored_epoch = kwargs.get('restored_epoch', None) - self.restored_lsn = kwargs.get('restored_lsn', None) - self.failure_error = kwargs.get('failure_error', None) - - -class ResumeApplicationUpgradeDescription(Model): - """Describes the parameters for resuming an unmonitored manual Service Fabric - application upgrade. - - All required parameters must be populated in order to send to Azure. - - :param upgrade_domain_name: Required. The name of the upgrade domain in - which to resume the upgrade. - :type upgrade_domain_name: str - """ - - _validation = { - 'upgrade_domain_name': {'required': True}, - } - - _attribute_map = { - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResumeApplicationUpgradeDescription, self).__init__(**kwargs) - self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) - - -class ResumeClusterUpgradeDescription(Model): - """Describes the parameters for resuming a cluster upgrade. - - All required parameters must be populated in order to send to Azure. - - :param upgrade_domain: Required. The next upgrade domain for this cluster - upgrade. - :type upgrade_domain: str - """ - - _validation = { - 'upgrade_domain': {'required': True}, - } - - _attribute_map = { - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResumeClusterUpgradeDescription, self).__init__(**kwargs) - self.upgrade_domain = kwargs.get('upgrade_domain', None) - - -class RollingUpgradeUpdateDescription(Model): - """Describes the parameters for updating a rolling upgrade of application or - cluster. - - All required parameters must be populated in order to send to Azure. - - :param rolling_upgrade_mode: Required. The mode used to monitor health - during a rolling upgrade. The values are UnmonitoredAuto, - UnmonitoredManual, and Monitored. Possible values include: 'Invalid', - 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: - "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param replica_set_check_timeout_in_milliseconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type replica_set_check_timeout_in_milliseconds: long - :param failure_action: The compensating action to perform when a Monitored - upgrade encounters monitoring policy or health policy violations. - Invalid indicates the failure action is invalid. Rollback specifies that - the upgrade will start rolling back automatically. - Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - mode. Possible values include: 'Invalid', 'Rollback', 'Manual' - :type failure_action: str or ~azure.servicefabric.models.FailureAction - :param health_check_wait_duration_in_milliseconds: The amount of time to - wait after completing an upgrade domain before applying health policies. - It is first interpreted as a string representing an ISO 8601 duration. If - that fails, then it is interpreted as a number representing the total - number of milliseconds. - :type health_check_wait_duration_in_milliseconds: str - :param health_check_stable_duration_in_milliseconds: The amount of time - that the application or cluster must remain healthy before the upgrade - proceeds to the next upgrade domain. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type health_check_stable_duration_in_milliseconds: str - :param health_check_retry_timeout_in_milliseconds: The amount of time to - retry health evaluation when the application or cluster is unhealthy - before FailureAction is executed. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type health_check_retry_timeout_in_milliseconds: str - :param upgrade_timeout_in_milliseconds: The amount of time the overall - upgrade has to complete before FailureAction is executed. It is first - interpreted as a string representing an ISO 8601 duration. If that fails, - then it is interpreted as a number representing the total number of - milliseconds. - :type upgrade_timeout_in_milliseconds: str - :param upgrade_domain_timeout_in_milliseconds: The amount of time each - upgrade domain has to complete before FailureAction is executed. It is - first interpreted as a string representing an ISO 8601 duration. If that - fails, then it is interpreted as a number representing the total number of - milliseconds. - :type upgrade_domain_timeout_in_milliseconds: str - :param instance_close_delay_duration_in_seconds: Duration in seconds, to - wait before a stateless instance is closed, to allow the active requests - to drain gracefully. This would be effective when the instance is closing - during the application/cluster - upgrade, only for those instances which have a non-zero delay duration - configured in the service description. See - InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is - 4294967295, which indicates that the behavior will entirely depend on the - delay configured in the stateless service description. - :type instance_close_delay_duration_in_seconds: long - """ - - _validation = { - 'rolling_upgrade_mode': {'required': True}, - } - - _attribute_map = { - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'replica_set_check_timeout_in_milliseconds': {'key': 'ReplicaSetCheckTimeoutInMilliseconds', 'type': 'long'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, - 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, - 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeUpdateDescription, self).__init__(**kwargs) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.force_restart = kwargs.get('force_restart', None) - self.replica_set_check_timeout_in_milliseconds = kwargs.get('replica_set_check_timeout_in_milliseconds', None) - self.failure_action = kwargs.get('failure_action', None) - self.health_check_wait_duration_in_milliseconds = kwargs.get('health_check_wait_duration_in_milliseconds', None) - self.health_check_stable_duration_in_milliseconds = kwargs.get('health_check_stable_duration_in_milliseconds', None) - self.health_check_retry_timeout_in_milliseconds = kwargs.get('health_check_retry_timeout_in_milliseconds', None) - self.upgrade_timeout_in_milliseconds = kwargs.get('upgrade_timeout_in_milliseconds', None) - self.upgrade_domain_timeout_in_milliseconds = kwargs.get('upgrade_domain_timeout_in_milliseconds', None) - self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', None) - - -class RunToCompletionExecutionPolicy(ExecutionPolicy): - """The run to completion execution policy, the service will perform its - desired operation and complete successfully. If the service encounters - failure, it will restarted based on restart policy specified. If the - service completes its operation successfully, it will not be restarted - again. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param restart: Required. Enumerates the restart policy for - RunToCompletionExecutionPolicy. Possible values include: 'OnFailure', - 'Never' - :type restart: str or ~azure.servicefabric.models.RestartPolicy - """ - - _validation = { - 'type': {'required': True}, - 'restart': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'restart': {'key': 'restart', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunToCompletionExecutionPolicy, self).__init__(**kwargs) - self.restart = kwargs.get('restart', None) - self.type = 'RunToCompletion' - - -class SafetyCheckWrapper(Model): - """A wrapper for the safety check object. Safety checks are performed by - service fabric before continuing with the operations. These checks ensure - the availability of the service and the reliability of the state. - - :param safety_check: Represents a safety check performed by service fabric - before continuing with the operations. These checks ensure the - availability of the service and the reliability of the state. - :type safety_check: ~azure.servicefabric.models.SafetyCheck - """ - - _attribute_map = { - 'safety_check': {'key': 'SafetyCheck', 'type': 'SafetyCheck'}, - } - - def __init__(self, **kwargs): - super(SafetyCheckWrapper, self).__init__(**kwargs) - self.safety_check = kwargs.get('safety_check', None) - - -class ScalingPolicyDescription(Model): - """Describes how the scaling should be performed. - - All required parameters must be populated in order to send to Azure. - - :param scaling_trigger: Required. Specifies the trigger associated with - this scaling policy - :type scaling_trigger: - ~azure.servicefabric.models.ScalingTriggerDescription - :param scaling_mechanism: Required. Specifies the mechanism associated - with this scaling policy - :type scaling_mechanism: - ~azure.servicefabric.models.ScalingMechanismDescription - """ - - _validation = { - 'scaling_trigger': {'required': True}, - 'scaling_mechanism': {'required': True}, - } - - _attribute_map = { - 'scaling_trigger': {'key': 'ScalingTrigger', 'type': 'ScalingTriggerDescription'}, - 'scaling_mechanism': {'key': 'ScalingMechanism', 'type': 'ScalingMechanismDescription'}, - } - - def __init__(self, **kwargs): - super(ScalingPolicyDescription, self).__init__(**kwargs) - self.scaling_trigger = kwargs.get('scaling_trigger', None) - self.scaling_mechanism = kwargs.get('scaling_mechanism', None) - - -class SecondaryReplicatorStatus(ReplicatorStatus): - """Provides statistics about the Service Fabric Replicator, when it is - functioning in a ActiveSecondary role. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SecondaryActiveReplicatorStatus, - SecondaryIdleReplicatorStatus - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param replication_queue_status: Details about the replication queue on - the secondary replicator. - :type replication_queue_status: - ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_replication_operation_received_time_utc: The last time-stamp - (UTC) at which a replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation - message was never received. - :type last_replication_operation_received_time_utc: datetime - :param is_in_build: Value that indicates whether the replica is currently - being built. - :type is_in_build: bool - :param copy_queue_status: Details about the copy queue on the secondary - replicator. - :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at - which a copy operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation - message was never received. - :type last_copy_operation_received_time_utc: datetime - :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at - which an acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment - message was never sent. - :type last_acknowledgement_sent_time_utc: datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - _subtype_map = { - 'kind': {'ActiveSecondary': 'SecondaryActiveReplicatorStatus', 'IdleSecondary': 'SecondaryIdleReplicatorStatus'} - } - - def __init__(self, **kwargs): - super(SecondaryReplicatorStatus, self).__init__(**kwargs) - self.replication_queue_status = kwargs.get('replication_queue_status', None) - self.last_replication_operation_received_time_utc = kwargs.get('last_replication_operation_received_time_utc', None) - self.is_in_build = kwargs.get('is_in_build', None) - self.copy_queue_status = kwargs.get('copy_queue_status', None) - self.last_copy_operation_received_time_utc = kwargs.get('last_copy_operation_received_time_utc', None) - self.last_acknowledgement_sent_time_utc = kwargs.get('last_acknowledgement_sent_time_utc', None) - self.kind = 'SecondaryReplicatorStatus' - - -class SecondaryActiveReplicatorStatus(SecondaryReplicatorStatus): - """Status of the secondary replicator when it is in active mode and is part of - the replica set. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param replication_queue_status: Details about the replication queue on - the secondary replicator. - :type replication_queue_status: - ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_replication_operation_received_time_utc: The last time-stamp - (UTC) at which a replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation - message was never received. - :type last_replication_operation_received_time_utc: datetime - :param is_in_build: Value that indicates whether the replica is currently - being built. - :type is_in_build: bool - :param copy_queue_status: Details about the copy queue on the secondary - replicator. - :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at - which a copy operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation - message was never received. - :type last_copy_operation_received_time_utc: datetime - :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at - which an acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment - message was never sent. - :type last_acknowledgement_sent_time_utc: datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SecondaryActiveReplicatorStatus, self).__init__(**kwargs) - self.kind = 'ActiveSecondary' - - -class SecondaryIdleReplicatorStatus(SecondaryReplicatorStatus): - """Status of the secondary replicator when it is in idle mode and is being - built by the primary. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param replication_queue_status: Details about the replication queue on - the secondary replicator. - :type replication_queue_status: - ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_replication_operation_received_time_utc: The last time-stamp - (UTC) at which a replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation - message was never received. - :type last_replication_operation_received_time_utc: datetime - :param is_in_build: Value that indicates whether the replica is currently - being built. - :type is_in_build: bool - :param copy_queue_status: Details about the copy queue on the secondary - replicator. - :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at - which a copy operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation - message was never received. - :type last_copy_operation_received_time_utc: datetime - :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at - which an acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment - message was never sent. - :type last_acknowledgement_sent_time_utc: datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SecondaryIdleReplicatorStatus, self).__init__(**kwargs) - self.kind = 'IdleSecondary' - - -class SecretResourceDescription(Model): - """This type describes a secret resource. - - All required parameters must be populated in order to send to Azure. - - :param properties: Required. Describes the properties of a secret - resource. - :type properties: ~azure.servicefabric.models.SecretResourceProperties - :param name: Required. Name of the Secret resource. - :type name: str - """ - - _validation = { - 'properties': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'SecretResourceProperties'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecretResourceDescription, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.name = kwargs.get('name', None) - - -class SecretValue(Model): - """This type represents the unencrypted value of the secret. - - :param value: The actual value of the secret. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecretValue, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class SecretValueProperties(Model): - """This type describes properties of secret value resource. - - :param value: The actual value of the secret. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecretValueProperties, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class SecretValueResourceDescription(Model): - """This type describes a value of a secret resource. The name of this resource - is the version identifier corresponding to this secret value. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Version identifier of the secret value. - :type name: str - :param value: The actual value of the secret. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecretValueResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - - -class SeedNodeSafetyCheck(SafetyCheck): - """Represents a safety check for the seed nodes being performed by service - fabric before continuing with node level operations. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SeedNodeSafetyCheck, self).__init__(**kwargs) - self.kind = 'EnsureSeedNodeQuorum' - - -class SelectedPartition(Model): - """This class returns information about the partition that the user-induced - operation acted upon. - - :param service_name: The name of the service the partition belongs to. - :type service_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SelectedPartition, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - - -class ServiceBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information for a specific Service Fabric service - specifying what backup policy is being applied and suspend description, if - any. - - All required parameters must be populated in order to send to Azure. - - :param policy_name: The name of the backup policy which is applicable to - this Service Fabric application or service or partition. - :type policy_name: str - :param policy_inherited_from: Specifies the scope at which the backup - policy is applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type policy_inherited_from: str or - ~azure.servicefabric.models.BackupPolicyScope - :param suspension_info: Describes the backup suspension details. - :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :param kind: Required. Constant filled by server. - :type kind: str - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceBackupConfigurationInfo, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.kind = 'Service' - - -class ServiceBackupEntity(BackupEntity): - """Identifies the Service Fabric stateful service which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :param entity_kind: Required. Constant filled by server. - :type entity_kind: str - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceBackupEntity, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.entity_kind = 'Service' - - -class ServiceCorrelationDescription(Model): - """Creates a particular correlation between services. - - All required parameters must be populated in order to send to Azure. - - :param scheme: Required. The ServiceCorrelationScheme which describes the - relationship between this service and the service specified via - ServiceName. Possible values include: 'Invalid', 'Affinity', - 'AlignedAffinity', 'NonAlignedAffinity' - :type scheme: str or ~azure.servicefabric.models.ServiceCorrelationScheme - :param service_name: Required. The name of the service that the - correlation relationship is established with. - :type service_name: str - """ - - _validation = { - 'scheme': {'required': True}, - 'service_name': {'required': True}, - } - - _attribute_map = { - 'scheme': {'key': 'Scheme', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceCorrelationDescription, self).__init__(**kwargs) - self.scheme = kwargs.get('scheme', None) - self.service_name = kwargs.get('service_name', None) - - -class ServiceEvent(FabricEvent): - """Represents the base for all Service Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServiceCreatedEvent, ServiceDeletedEvent, - ServiceNewHealthReportEvent, ServiceHealthReportExpiredEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ServiceCreated': 'ServiceCreatedEvent', 'ServiceDeleted': 'ServiceDeletedEvent', 'ServiceNewHealthReport': 'ServiceNewHealthReportEvent', 'ServiceHealthReportExpired': 'ServiceHealthReportExpiredEvent'} - } - - def __init__(self, **kwargs): - super(ServiceEvent, self).__init__(**kwargs) - self.service_id = kwargs.get('service_id', None) - self.kind = 'ServiceEvent' - - -class ServiceCreatedEvent(ServiceEvent): - """Service Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param service_type_name: Required. Service type name. - :type service_type_name: str - :param application_name: Required. Application name. - :type application_name: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param service_instance: Required. Id of Service instance. - :type service_instance: long - :param is_stateful: Required. Indicates if Service is stateful. - :type is_stateful: bool - :param partition_count: Required. Number of partitions. - :type partition_count: int - :param target_replica_set_size: Required. Size of target replicas set. - :type target_replica_set_size: int - :param min_replica_set_size: Required. Minimum size of replicas set. - :type min_replica_set_size: int - :param service_package_version: Required. Version of Service package. - :type service_package_version: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'service_type_name': {'required': True}, - 'application_name': {'required': True}, - 'application_type_name': {'required': True}, - 'service_instance': {'required': True}, - 'is_stateful': {'required': True}, - 'partition_count': {'required': True}, - 'target_replica_set_size': {'required': True}, - 'min_replica_set_size': {'required': True}, - 'service_package_version': {'required': True}, - 'partition_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceCreatedEvent, self).__init__(**kwargs) - self.service_type_name = kwargs.get('service_type_name', None) - self.application_name = kwargs.get('application_name', None) - self.application_type_name = kwargs.get('application_type_name', None) - self.service_instance = kwargs.get('service_instance', None) - self.is_stateful = kwargs.get('is_stateful', None) - self.partition_count = kwargs.get('partition_count', None) - self.target_replica_set_size = kwargs.get('target_replica_set_size', None) - self.min_replica_set_size = kwargs.get('min_replica_set_size', None) - self.service_package_version = kwargs.get('service_package_version', None) - self.partition_id = kwargs.get('partition_id', None) - self.kind = 'ServiceCreated' - - -class ServiceDeletedEvent(ServiceEvent): - """Service Deleted event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param service_type_name: Required. Service type name. - :type service_type_name: str - :param application_name: Required. Application name. - :type application_name: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param service_instance: Required. Id of Service instance. - :type service_instance: long - :param is_stateful: Required. Indicates if Service is stateful. - :type is_stateful: bool - :param partition_count: Required. Number of partitions. - :type partition_count: int - :param target_replica_set_size: Required. Size of target replicas set. - :type target_replica_set_size: int - :param min_replica_set_size: Required. Minimum size of replicas set. - :type min_replica_set_size: int - :param service_package_version: Required. Version of Service package. - :type service_package_version: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'service_type_name': {'required': True}, - 'application_name': {'required': True}, - 'application_type_name': {'required': True}, - 'service_instance': {'required': True}, - 'is_stateful': {'required': True}, - 'partition_count': {'required': True}, - 'target_replica_set_size': {'required': True}, - 'min_replica_set_size': {'required': True}, - 'service_package_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceDeletedEvent, self).__init__(**kwargs) - self.service_type_name = kwargs.get('service_type_name', None) - self.application_name = kwargs.get('application_name', None) - self.application_type_name = kwargs.get('application_type_name', None) - self.service_instance = kwargs.get('service_instance', None) - self.is_stateful = kwargs.get('is_stateful', None) - self.partition_count = kwargs.get('partition_count', None) - self.target_replica_set_size = kwargs.get('target_replica_set_size', None) - self.min_replica_set_size = kwargs.get('min_replica_set_size', None) - self.service_package_version = kwargs.get('service_package_version', None) - self.kind = 'ServiceDeleted' - - -class ServiceDescription(Model): - """A ServiceDescription contains all of the information necessary to create a - service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceDescription, StatelessServiceDescription - - All required parameters must be populated in order to send to Azure. - - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_name: Required. The full name of the service with 'fabric:' - URI scheme. - :type service_name: str - :param service_type_name: Required. Name of the service type as specified - in the service manifest. - :type service_type_name: str - :param initialization_data: The initialization data as an array of bytes. - Initialization data is passed to service instances or replicas when they - are created. - :type initialization_data: list[int] - :param partition_description: Required. The partition description as an - object. - :type partition_description: - ~azure.servicefabric.models.PartitionSchemeDescription - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics. - :type service_load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param is_default_move_cost_specified: Indicates if the DefaultMoveCost - property is specified. - :type is_default_move_cost_specified: bool - :param service_package_activation_mode: The activation mode of service - package to be used for a service. Possible values include: - 'SharedProcess', 'ExclusiveProcess' - :type service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS - system service to be enabled in Service Fabric cluster. - :type service_dns_name: str - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param tags_required_to_place: Tags for placement of this service. - :type tags_required_to_place: - ~azure.servicefabric.models.NodeTagsDescription - :param tags_required_to_run: Tags for running of this service. - :type tags_required_to_run: - ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceDescription', 'Stateless': 'StatelessServiceDescription'} - } - - def __init__(self, **kwargs): - super(ServiceDescription, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.service_name = kwargs.get('service_name', None) - self.service_type_name = kwargs.get('service_type_name', None) - self.initialization_data = kwargs.get('initialization_data', None) - self.partition_description = kwargs.get('partition_description', None) - self.placement_constraints = kwargs.get('placement_constraints', None) - self.correlation_scheme = kwargs.get('correlation_scheme', None) - self.service_load_metrics = kwargs.get('service_load_metrics', None) - self.service_placement_policies = kwargs.get('service_placement_policies', None) - self.default_move_cost = kwargs.get('default_move_cost', None) - self.is_default_move_cost_specified = kwargs.get('is_default_move_cost_specified', None) - self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) - self.service_dns_name = kwargs.get('service_dns_name', None) - self.scaling_policies = kwargs.get('scaling_policies', None) - self.tags_required_to_place = kwargs.get('tags_required_to_place', None) - self.tags_required_to_run = kwargs.get('tags_required_to_run', None) - self.service_kind = None - - -class ServiceFromTemplateDescription(Model): - """Defines description for creating a Service Fabric service from a template - defined in the application manifest. - - All required parameters must be populated in order to send to Azure. - - :param application_name: Required. The name of the application, including - the 'fabric:' URI scheme. - :type application_name: str - :param service_name: Required. The full name of the service with 'fabric:' - URI scheme. - :type service_name: str - :param service_type_name: Required. Name of the service type as specified - in the service manifest. - :type service_type_name: str - :param initialization_data: The initialization data for the newly created - service instance. - :type initialization_data: list[int] - :param service_package_activation_mode: The activation mode of service - package to be used for a service. Possible values include: - 'SharedProcess', 'ExclusiveProcess' - :type service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS - system service to be enabled in Service Fabric cluster. - :type service_dns_name: str - """ - - _validation = { - 'application_name': {'required': True}, - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceFromTemplateDescription, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.service_name = kwargs.get('service_name', None) - self.service_type_name = kwargs.get('service_type_name', None) - self.initialization_data = kwargs.get('initialization_data', None) - self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) - self.service_dns_name = kwargs.get('service_dns_name', None) - - -class ServiceHealth(EntityHealth): - """Information about the health of a Service Fabric service. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param name: The name of the service whose health information is described - by this object. - :type name: str - :param partition_health_states: The list of partition health states - associated with the service. - :type partition_health_states: - list[~azure.servicefabric.models.PartitionHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'partition_health_states': {'key': 'PartitionHealthStates', 'type': '[PartitionHealthState]'}, - } - - def __init__(self, **kwargs): - super(ServiceHealth, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.partition_health_states = kwargs.get('partition_health_states', None) - - -class ServiceHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a service, containing information about - the data and the algorithm used by health store to evaluate health. The - evaluation is returned only when the aggregated health state is either - Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param service_name: Name of the service whose health evaluation is - described by this object. - :type service_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the service. The types of the - unhealthy evaluations can be PartitionsHealthEvaluation or - EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(ServiceHealthEvaluation, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Service' - - -class ServiceHealthReportExpiredEvent(ServiceEvent): - """Service Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param instance_id: Required. Id of Service instance. - :type instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServiceHealthReportExpiredEvent, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ServiceHealthReportExpired' - - -class ServiceHealthState(EntityHealthState): - """Represents the health state of a service, which contains the service - identifier and its aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param service_name: Name of the service whose health state is represented - by this object. - :type service_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceHealthState, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - - -class ServiceHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a service, which contains the service - name, its aggregated health state and any partitions that respect the - filters in the cluster health chunk query description. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_name: The name of the service whose health state chunk is - provided in this object. - :type service_name: str - :param partition_health_state_chunks: The list of partition health state - chunks belonging to the service that respect the filters in the cluster - health chunk query description. - :type partition_health_state_chunks: - ~azure.servicefabric.models.PartitionHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_health_state_chunks': {'key': 'PartitionHealthStateChunks', 'type': 'PartitionHealthStateChunkList'}, - } - - def __init__(self, **kwargs): - super(ServiceHealthStateChunk, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_health_state_chunks = kwargs.get('partition_health_state_chunks', None) - - -class ServiceHealthStateChunkList(Model): - """The list of service health state chunks that respect the input filters in - the chunk query. Returned by get cluster health state chunks query. - - :param items: The list of service health state chunks that respect the - input filters in the chunk query. - :type items: list[~azure.servicefabric.models.ServiceHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[ServiceHealthStateChunk]'}, - } - - def __init__(self, **kwargs): - super(ServiceHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) - - -class ServiceHealthStateFilter(Model): - """Defines matching criteria to determine whether a service should be included - as a child of an application in the cluster health chunk. - The services are only returned if the parent application matches a filter - specified in the cluster health chunk query description. - One filter can match zero, one or multiple services, depending on its - properties. - - :param service_name_filter: The name of the service that matches the - filter. The filter is applied only to the specified service, if it exists. - If the service doesn't exist, no service is returned in the cluster health - chunk based on this filter. - If the service exists, it is included as the application's child if the - health state matches the other filter properties. - If not specified, all services that match the parent filters (if any) are - taken into consideration and matched against the other filter members, - like health state filter. - :type service_name_filter: str - :param health_state_filter: The filter for the health state of the - services. It allows selecting services if they match the desired health - states. - The possible values are integer value of one of the following health - states. Only services that match the filter are returned. All services are - used to evaluate the cluster aggregated health state. - If not specified, default value is None, unless the service name is - specified. If the filter has default value and service name is specified, - the matching service is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches services with - HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - :param partition_filters: Defines a list of filters that specify which - partitions to be included in the returned cluster health chunk as children - of the service. The partitions are returned only if the parent service - matches a filter. - If the list is empty, no partitions are returned. All the partitions are - used to evaluate the parent service aggregated health state, regardless of - the input filters. - The service filter may specify multiple partition filters. - For example, it can specify a filter to return all partitions with health - state Error and another filter to always include a partition identified by - its partition ID. - :type partition_filters: - list[~azure.servicefabric.models.PartitionHealthStateFilter] - """ - - _attribute_map = { - 'service_name_filter': {'key': 'ServiceNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'partition_filters': {'key': 'PartitionFilters', 'type': '[PartitionHealthStateFilter]'}, - } - - def __init__(self, **kwargs): - super(ServiceHealthStateFilter, self).__init__(**kwargs) - self.service_name_filter = kwargs.get('service_name_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - self.partition_filters = kwargs.get('partition_filters', None) - - -class ServiceIdentity(Model): - """Map service identity friendly name to an application identity. - - :param name: The identity friendly name. - :type name: str - :param identity_ref: The application identity name. - :type identity_ref: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'identity_ref': {'key': 'identityRef', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceIdentity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.identity_ref = kwargs.get('identity_ref', None) - - -class ServiceInfo(Model): - """Information about a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceInfo, StatelessServiceInfo - - All required parameters must be populated in order to send to Azure. - - :param id: The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to - identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type id: str - :param name: The full name of the service with 'fabric:' URI scheme. - :type name: str - :param type_name: Name of the service type as specified in the service - manifest. - :type type_name: str - :param manifest_version: The version of the service manifest. - :type manifest_version: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_status: The status of the application. Possible values - include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', - 'Failed' - :type service_status: str or ~azure.servicefabric.models.ServiceStatus - :param is_service_group: Whether the service is in a service group. - :type is_service_group: bool - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceInfo', 'Stateless': 'StatelessServiceInfo'} - } - - def __init__(self, **kwargs): - super(ServiceInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.manifest_version = kwargs.get('manifest_version', None) - self.health_state = kwargs.get('health_state', None) - self.service_status = kwargs.get('service_status', None) - self.is_service_group = kwargs.get('is_service_group', None) - self.service_kind = None - - -class ServiceLoadMetricDescription(Model): - """Specifies a metric to load balance a service during runtime. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the metric. If the service chooses to - report load during runtime, the load metric name should match the name - that is specified in Name exactly. Note that metric names are - case-sensitive. - :type name: str - :param weight: The service load metric relative weight, compared to other - metrics configured for this service, as a number. Possible values include: - 'Zero', 'Low', 'Medium', 'High' - :type weight: str or ~azure.servicefabric.models.ServiceLoadMetricWeight - :param primary_default_load: Used only for Stateful services. The default - amount of load, as a number, that this service creates for this metric - when it is a Primary replica. - :type primary_default_load: int - :param secondary_default_load: Used only for Stateful services. The - default amount of load, as a number, that this service creates for this - metric when it is a Secondary replica. - :type secondary_default_load: int - :param default_load: Used only for Stateless services. The default amount - of load, as a number, that this service creates for this metric. - :type default_load: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'weight': {'key': 'Weight', 'type': 'str'}, - 'primary_default_load': {'key': 'PrimaryDefaultLoad', 'type': 'int'}, - 'secondary_default_load': {'key': 'SecondaryDefaultLoad', 'type': 'int'}, - 'default_load': {'key': 'DefaultLoad', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ServiceLoadMetricDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.weight = kwargs.get('weight', None) - self.primary_default_load = kwargs.get('primary_default_load', None) - self.secondary_default_load = kwargs.get('secondary_default_load', None) - self.default_load = kwargs.get('default_load', None) - - -class ServiceNameInfo(Model): - """Information about the service name. - - :param id: The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to - identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type id: str - :param name: The full name of the service with 'fabric:' URI scheme. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceNameInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - - -class ServiceNewHealthReportEvent(ServiceEvent): - """Service Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param instance_id: Required. Id of Service instance. - :type instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServiceNewHealthReportEvent, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ServiceNewHealthReport' - - -class ServicePartitionInfo(Model): - """Information about a partition of a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServicePartitionInfo, - StatelessServicePartitionInfo - - All required parameters must be populated in order to send to Azure. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param partition_status: The status of the service fabric service - partition. Possible values include: 'Invalid', 'Ready', 'NotReady', - 'InQuorumLoss', 'Reconfiguring', 'Deleting' - :type partition_status: str or - ~azure.servicefabric.models.ServicePartitionStatus - :param partition_information: Information about the partition identity, - partitioning scheme and keys supported by it. - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServicePartitionInfo', 'Stateless': 'StatelessServicePartitionInfo'} - } - - def __init__(self, **kwargs): - super(ServicePartitionInfo, self).__init__(**kwargs) - self.health_state = kwargs.get('health_state', None) - self.partition_status = kwargs.get('partition_status', None) - self.partition_information = kwargs.get('partition_information', None) - self.service_kind = None - - -class ServicePlacementPolicyDescription(Model): - """Describes the policy to be used for placement of a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServicePlacementInvalidDomainPolicyDescription, - ServicePlacementNonPartiallyPlaceServicePolicyDescription, - ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, - ServicePlacementPreferPrimaryDomainPolicyDescription, - ServicePlacementRequiredDomainPolicyDescription, - ServicePlacementRequireDomainDistributionPolicyDescription - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'AllowMultipleStatelessInstancesOnNode': 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} - } - - def __init__(self, **kwargs): - super(ServicePlacementPolicyDescription, self).__init__(**kwargs) - self.type = None - - -class ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - allowing multiple stateless instances of a partition of the service to be - placed on a node. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: Holdover from other policy descriptions, not used for - this policy, values are ignored by runtime. Keeping it for any - backwards-compatibility with clients. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.type = 'AllowMultipleStatelessInstancesOnNode' - - -class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where a particular fault or upgrade domain should not be used for placement - of the instances or replicas of that service. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: The name of the domain that should not be used for - placement. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServicePlacementInvalidDomainPolicyDescription, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.type = 'InvalidDomain' - - -class ServicePlacementNonPartiallyPlaceServicePolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where all replicas must be able to be placed in order for any replicas to - be created. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServicePlacementNonPartiallyPlaceServicePolicyDescription, self).__init__(**kwargs) - self.type = 'NonPartiallyPlaceService' - - -class ServicePlacementPreferPrimaryDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where the service's Primary replicas should optimally be placed in a - particular domain. - This placement policy is usually used with fault domains in scenarios where - the Service Fabric cluster is geographically distributed in order to - indicate that a service's primary replica should be located in a particular - fault domain, which in geo-distributed scenarios usually aligns with - regional or datacenter boundaries. Note that since this is an optimization - it is possible that the Primary replica may not end up located in this - domain due to failures, capacity limits, or other constraints. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: The name of the domain that should used for placement - as per this policy. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServicePlacementPreferPrimaryDomainPolicyDescription, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.type = 'PreferPrimaryDomain' - - -class ServicePlacementRequiredDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where the instances or replicas of that service must be placed in a - particular domain. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: The name of the domain that should used for placement - as per this policy. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServicePlacementRequiredDomainPolicyDescription, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.type = 'RequireDomain' - - -class ServicePlacementRequireDomainDistributionPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where two replicas from the same partition should never be placed in the - same fault or upgrade domain. - While this is not common it can expose the service to an increased risk of - concurrent failures due to unplanned outages or other cases of - subsequent/concurrent failures. As an example, consider a case where - replicas are deployed across different data center, with one replica per - location. In the event that one of the datacenters goes offline, normally - the replica that was placed in that datacenter will be packed into one of - the remaining datacenters. If this is not desirable then this policy should - be set. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: The name of the domain that should used for placement - as per this policy. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServicePlacementRequireDomainDistributionPolicyDescription, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.type = 'RequireDomainDistribution' - - -class ServiceProperties(Model): - """Describes properties of a service resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param description: User readable description of the service. - :type description: str - :param replica_count: The number of replicas of the service to create. - Defaults to 1 if not specified. - :type replica_count: int - :param execution_policy: The execution policy of the service - :type execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :param auto_scaling_policies: Auto scaling policies - :type auto_scaling_policies: - list[~azure.servicefabric.models.AutoScalingPolicy] - :ivar status: Status of the service. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the service. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the service's health state is not 'Ok', - this additional details from service fabric Health Manager for the user to - know why the service is marked unhealthy. - :vartype unhealthy_evaluation: str - :param identity_refs: The service identity list. - :type identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :param dns_name: Dns name of the service. - :type dns_name: str - """ - - _validation = { - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'replica_count': {'key': 'replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'health_state': {'key': 'healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.replica_count = kwargs.get('replica_count', None) - self.execution_policy = kwargs.get('execution_policy', None) - self.auto_scaling_policies = kwargs.get('auto_scaling_policies', None) - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity_refs = kwargs.get('identity_refs', None) - self.dns_name = kwargs.get('dns_name', None) - - -class ServiceReplicaProperties(Model): - """Describes the properties of a service replica. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. The operation system required by the code in - service. Possible values include: 'Linux', 'Windows' - :type os_type: str or ~azure.servicefabric.models.OperatingSystemType - :param code_packages: Required. Describes the set of code packages that - forms the service. A code package describes the container and the - properties for running it. All the code packages are started together on - the same host and share the same context (network, process etc.). - :type code_packages: - list[~azure.servicefabric.models.ContainerCodePackageProperties] - :param network_refs: The names of the private networks that this service - needs to be part of. - :type network_refs: list[~azure.servicefabric.models.NetworkRef] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef - """ - - _validation = { - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'str'}, - 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - } - - def __init__(self, **kwargs): - super(ServiceReplicaProperties, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.code_packages = kwargs.get('code_packages', None) - self.network_refs = kwargs.get('network_refs', None) - self.diagnostics = kwargs.get('diagnostics', None) - - -class ServiceReplicaDescription(ServiceReplicaProperties): - """Describes a replica of a service resource. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. The operation system required by the code in - service. Possible values include: 'Linux', 'Windows' - :type os_type: str or ~azure.servicefabric.models.OperatingSystemType - :param code_packages: Required. Describes the set of code packages that - forms the service. A code package describes the container and the - properties for running it. All the code packages are started together on - the same host and share the same context (network, process etc.). - :type code_packages: - list[~azure.servicefabric.models.ContainerCodePackageProperties] - :param network_refs: The names of the private networks that this service - needs to be part of. - :type network_refs: list[~azure.servicefabric.models.NetworkRef] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :param replica_name: Required. Name of the replica. - :type replica_name: str - """ - - _validation = { - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - 'replica_name': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'str'}, - 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - 'replica_name': {'key': 'replicaName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceReplicaDescription, self).__init__(**kwargs) - self.replica_name = kwargs.get('replica_name', None) - - -class ServiceResourceDescription(Model): - """This type describes a service resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Service resource. - :type name: str - :param os_type: Required. The operation system required by the code in - service. Possible values include: 'Linux', 'Windows' - :type os_type: str or ~azure.servicefabric.models.OperatingSystemType - :param code_packages: Required. Describes the set of code packages that - forms the service. A code package describes the container and the - properties for running it. All the code packages are started together on - the same host and share the same context (network, process etc.). - :type code_packages: - list[~azure.servicefabric.models.ContainerCodePackageProperties] - :param network_refs: The names of the private networks that this service - needs to be part of. - :type network_refs: list[~azure.servicefabric.models.NetworkRef] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :param description: User readable description of the service. - :type description: str - :param replica_count: The number of replicas of the service to create. - Defaults to 1 if not specified. - :type replica_count: int - :param execution_policy: The execution policy of the service - :type execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :param auto_scaling_policies: Auto scaling policies - :type auto_scaling_policies: - list[~azure.servicefabric.models.AutoScalingPolicy] - :ivar status: Status of the service. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the service. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the service's health state is not 'Ok', - this additional details from service fabric Health Manager for the user to - know why the service is marked unhealthy. - :vartype unhealthy_evaluation: str - :param identity_refs: The service identity list. - :type identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :param dns_name: Dns name of the service. - :type dns_name: str - """ - - _validation = { - 'name': {'required': True}, - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'code_packages': {'key': 'properties.codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'properties.networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsRef'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'properties.executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'properties.autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'properties.identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', None) - self.code_packages = kwargs.get('code_packages', None) - self.network_refs = kwargs.get('network_refs', None) - self.diagnostics = kwargs.get('diagnostics', None) - self.description = kwargs.get('description', None) - self.replica_count = kwargs.get('replica_count', None) - self.execution_policy = kwargs.get('execution_policy', None) - self.auto_scaling_policies = kwargs.get('auto_scaling_policies', None) - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity_refs = kwargs.get('identity_refs', None) - self.dns_name = kwargs.get('dns_name', None) - - -class ServicesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for services of a certain service type - belonging to an application, containing health evaluations for each - unhealthy service that impacted current aggregated health state. Can be - returned when evaluating application health and the aggregated health state - is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param service_type_name: Name of the service type of the services. - :type service_type_name: str - :param max_percent_unhealthy_services: Maximum allowed percentage of - unhealthy services from the ServiceTypeHealthPolicy. - :type max_percent_unhealthy_services: int - :param total_count: Total number of services of the current service type - in the application from the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - ServiceHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(ServicesHealthEvaluation, self).__init__(**kwargs) - self.service_type_name = kwargs.get('service_type_name', None) - self.max_percent_unhealthy_services = kwargs.get('max_percent_unhealthy_services', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Services' - - -class ServiceTypeDescription(Model): - """Describes a service type defined in the service manifest of a provisioned - application type. The properties the ones defined in the service manifest. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceTypeDescription, - StatelessServiceTypeDescription - - All required parameters must be populated in order to send to Azure. - - :param is_stateful: Indicates whether the service type is a stateful - service type or a stateless service type. This property is true if the - service type is a stateful service type, false otherwise. - :type is_stateful: bool - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param placement_constraints: The placement constraint to be used when - instantiating this service in a Service Fabric cluster. - :type placement_constraints: str - :param load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: List of service placement policy - descriptions. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param extensions: List of service type extensions. - :type extensions: - list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Stateful': 'StatefulServiceTypeDescription', 'Stateless': 'StatelessServiceTypeDescription'} - } - - def __init__(self, **kwargs): - super(ServiceTypeDescription, self).__init__(**kwargs) - self.is_stateful = kwargs.get('is_stateful', None) - self.service_type_name = kwargs.get('service_type_name', None) - self.placement_constraints = kwargs.get('placement_constraints', None) - self.load_metrics = kwargs.get('load_metrics', None) - self.service_placement_policies = kwargs.get('service_placement_policies', None) - self.extensions = kwargs.get('extensions', None) - self.kind = None - - -class ServiceTypeExtensionDescription(Model): - """Describes extension of a service type defined in the service manifest. - - :param key: The name of the extension. - :type key: str - :param value: The extension value. - :type value: str - """ - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceTypeExtensionDescription, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) - - -class ServiceTypeHealthPolicy(Model): - """Represents the health policy used to evaluate the health of services - belonging to a service type. - - :param max_percent_unhealthy_partitions_per_service: The maximum allowed - percentage of unhealthy partitions per service. Allowed values are Byte - values from zero to 100 - The percentage represents the maximum tolerated percentage of partitions - that can be unhealthy before the service is considered in error. - If the percentage is respected but there is at least one unhealthy - partition, the health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy - partitions over the total number of partitions in the service. - The computation rounds up to tolerate one failure on small numbers of - partitions. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_partitions_per_service: int - :param max_percent_unhealthy_replicas_per_partition: The maximum allowed - percentage of unhealthy replicas per partition. Allowed values are Byte - values from zero to 100. - The percentage represents the maximum tolerated percentage of replicas - that can be unhealthy before the partition is considered in error. - If the percentage is respected but there is at least one unhealthy - replica, the health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy replicas - over the total number of replicas in the partition. - The computation rounds up to tolerate one failure on small numbers of - replicas. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_replicas_per_partition: int - :param max_percent_unhealthy_services: The maximum allowed percentage of - unhealthy services. Allowed values are Byte values from zero to 100. - The percentage represents the maximum tolerated percentage of services - that can be unhealthy before the application is considered in error. - If the percentage is respected but there is at least one unhealthy - service, the health is evaluated as Warning. - This is calculated by dividing the number of unhealthy services of the - specific service type over the total number of services of the specific - service type. - The computation rounds up to tolerate one failure on small numbers of - services. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_services: int - """ - - _attribute_map = { - 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, - 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, - 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ServiceTypeHealthPolicy, self).__init__(**kwargs) - self.max_percent_unhealthy_partitions_per_service = kwargs.get('max_percent_unhealthy_partitions_per_service', 0) - self.max_percent_unhealthy_replicas_per_partition = kwargs.get('max_percent_unhealthy_replicas_per_partition', 0) - self.max_percent_unhealthy_services = kwargs.get('max_percent_unhealthy_services', 0) - - -class ServiceTypeHealthPolicyMapItem(Model): - """Defines an item in ServiceTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key of the service type health policy map item. - This is the name of the service type. - :type key: str - :param value: Required. The value of the service type health policy map - item. This is the ServiceTypeHealthPolicy for this service type. - :type value: ~azure.servicefabric.models.ServiceTypeHealthPolicy - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ServiceTypeHealthPolicy'}, - } - - def __init__(self, **kwargs): - super(ServiceTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) - - -class ServiceTypeInfo(Model): - """Information about a service type that is defined in a service manifest of a - provisioned application type. - - :param service_type_description: Describes a service type defined in the - service manifest of a provisioned application type. The properties the - ones defined in the service manifest. - :type service_type_description: - ~azure.servicefabric.models.ServiceTypeDescription - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param service_manifest_version: The version of the service manifest in - which this service type is defined. - :type service_manifest_version: str - :param is_service_group: Indicates whether the service is a service group. - If it is, the property value is true otherwise false. - :type is_service_group: bool - """ - - _attribute_map = { - 'service_type_description': {'key': 'ServiceTypeDescription', 'type': 'ServiceTypeDescription'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ServiceTypeInfo, self).__init__(**kwargs) - self.service_type_description = kwargs.get('service_type_description', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_manifest_version = kwargs.get('service_manifest_version', None) - self.is_service_group = kwargs.get('is_service_group', None) - - -class ServiceTypeManifest(Model): - """Contains the manifest describing a service type registered as part of an - application in a Service Fabric cluster. - - :param manifest: The XML manifest as a string. - :type manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceTypeManifest, self).__init__(**kwargs) - self.manifest = kwargs.get('manifest', None) - - -class ServiceUpdateDescription(Model): - """A ServiceUpdateDescription contains all of the information necessary to - update a service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceUpdateDescription, - StatelessServiceUpdateDescription - - All required parameters must be populated in order to send to Azure. - - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 6 then the flags for - ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. - - None - Does not indicate any other properties are set. The value is - zero. - - TargetReplicaSetSize/InstanceCount - Indicates whether the - TargetReplicaSetSize property (for Stateful services) or the InstanceCount - property (for Stateless services) is set. The value is 1. - - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - property is set. The value is 2. - - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property - is set. The value is 4. - - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - property is set. The value is 8. - - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The - value is 16. - - PlacementConstraints - Indicates the PlacementConstraints property is - set. The value is 32. - - PlacementPolicyList - Indicates the ServicePlacementPolicies property is - set. The value is 64. - - Correlation - Indicates the CorrelationScheme property is set. The value - is 128. - - Metrics - Indicates the ServiceLoadMetrics property is set. The value is - 256. - - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The - value is 512. - - ScalingPolicy - Indicates the ScalingPolicies property is set. The value - is 1024. - - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit - property is set. The value is 2048. - - MinInstanceCount - Indicates the MinInstanceCount property is set. The - value is 4096. - - MinInstancePercentage - Indicates the MinInstancePercentage property is - set. The value is 8192. - - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 16384. - - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 32768. - - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property - is set. The value is 65536. - - ServiceDnsName - Indicates the ServiceDnsName property is set. The value - is 131072. - - TagsForPlacement - Indicates the TagsForPlacement property is set. The - value is 1048576. - - TagsForRunning - Indicates the TagsForRunning property is set. The value - is 2097152. - :type flags: str - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param load_metrics: The service load metrics. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param service_dns_name: The DNS name of the service. - :type service_dns_name: str - :param tags_for_placement: Tags for placement of this service. - :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :param tags_for_running: Tags for running of this service. - :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceUpdateDescription', 'Stateless': 'StatelessServiceUpdateDescription'} - } - - def __init__(self, **kwargs): - super(ServiceUpdateDescription, self).__init__(**kwargs) - self.flags = kwargs.get('flags', None) - self.placement_constraints = kwargs.get('placement_constraints', None) - self.correlation_scheme = kwargs.get('correlation_scheme', None) - self.load_metrics = kwargs.get('load_metrics', None) - self.service_placement_policies = kwargs.get('service_placement_policies', None) - self.default_move_cost = kwargs.get('default_move_cost', None) - self.scaling_policies = kwargs.get('scaling_policies', None) - self.service_dns_name = kwargs.get('service_dns_name', None) - self.tags_for_placement = kwargs.get('tags_for_placement', None) - self.tags_for_running = kwargs.get('tags_for_running', None) - self.service_kind = None - - -class ServiceUpgradeProgress(Model): - """Information about how many replicas are completed or pending for a specific - service during upgrade. - - :param service_name: Name of the Service resource. - :type service_name: str - :param completed_replica_count: The number of replicas that completes the - upgrade in the service. - :type completed_replica_count: str - :param pending_replica_count: The number of replicas that are waiting to - be upgraded in the service. - :type pending_replica_count: str - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'completed_replica_count': {'key': 'CompletedReplicaCount', 'type': 'str'}, - 'pending_replica_count': {'key': 'PendingReplicaCount', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceUpgradeProgress, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.completed_replica_count = kwargs.get('completed_replica_count', None) - self.pending_replica_count = kwargs.get('pending_replica_count', None) - - -class Setting(Model): - """Describes a setting for the container. The setting file path can be fetched - from environment variable "Fabric_SettingPath". The path for Windows - container is "C:\\secrets". The path for Linux container is "/var/secrets". - - :param type: The type of the setting being given in value. Possible values - include: 'ClearText', 'KeyVaultReference', 'SecretValueReference'. Default - value: "ClearText" . - :type type: str or ~azure.servicefabric.models.SettingType - :param name: The name of the setting. - :type name: str - :param value: The value of the setting, will be processed based on the - type provided. - :type value: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Setting, self).__init__(**kwargs) - self.type = kwargs.get('type', "ClearText") - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - - -class SingletonPartitionInformation(PartitionInformation): - """Information about a partition that is singleton. The services with - singleton partitioning scheme are effectively non-partitioned. They only - have one partition. - - All required parameters must be populated in order to send to Azure. - - :param id: An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. - The partition ID is unique and does not change for the lifetime of the - service. If the same service was deleted and recreated the IDs of its - partitions would be different. - :type id: str - :param service_partition_kind: Required. Constant filled by server. - :type service_partition_kind: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SingletonPartitionInformation, self).__init__(**kwargs) - self.service_partition_kind = 'Singleton' - - -class SingletonPartitionSchemeDescription(PartitionSchemeDescription): - """Describes the partition scheme of a singleton-partitioned, or - non-partitioned service. - - All required parameters must be populated in order to send to Azure. - - :param partition_scheme: Required. Constant filled by server. - :type partition_scheme: str - """ - - _validation = { - 'partition_scheme': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SingletonPartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = 'Singleton' - - -class StartClusterUpgradeDescription(Model): - """Describes the parameters for starting a cluster upgrade. - - :param code_version: The cluster code version. - :type code_version: str - :param config_version: The cluster configuration version. - :type config_version: str - :param upgrade_kind: The kind of upgrade out of the following possible - values. Possible values include: 'Invalid', 'Rolling'. Default value: - "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param sort_order: Defines the order in which an upgrade proceeds through - the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', - 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default - value: "Default" . - :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param enable_delta_health_evaluation: When true, enables delta health - evaluation rather than absolute health evaluation after completion of each - upgrade domain. - :type enable_delta_health_evaluation: bool - :param cluster_upgrade_health_policy: Defines a health policy used to - evaluate the health of the cluster during a cluster upgrade. - :type cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :param application_health_policy_map: Defines the application health - policy map used to evaluate the health of an application or one of its - children entities. - :type application_health_policy_map: - ~azure.servicefabric.models.ApplicationHealthPolicies - :param instance_close_delay_duration_in_seconds: Duration in seconds, to - wait before a stateless instance is closed, to allow the active requests - to drain gracefully. This would be effective when the instance is closing - during the application/cluster - upgrade, only for those instances which have a non-zero delay duration - configured in the service description. See - InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is - 4294967295, which indicates that the behavior will entirely depend on the - delay configured in the stateless service description. - :type instance_close_delay_duration_in_seconds: long - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(StartClusterUpgradeDescription, self).__init__(**kwargs) - self.code_version = kwargs.get('code_version', None) - self.config_version = kwargs.get('config_version', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) - self.force_restart = kwargs.get('force_restart', None) - self.sort_order = kwargs.get('sort_order', "Default") - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) - self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) - self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', None) - - -class StartedChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos is started. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param chaos_parameters: Defines all the parameters to configure a Chaos - run. - :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, - } - - def __init__(self, **kwargs): - super(StartedChaosEvent, self).__init__(**kwargs) - self.chaos_parameters = kwargs.get('chaos_parameters', None) - self.kind = 'Started' - - -class StatefulReplicaHealthReportExpiredEvent(ReplicaEvent): - """Stateful Replica Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param replica_instance_id: Required. Id of Replica instance. - :type replica_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'replica_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(StatefulReplicaHealthReportExpiredEvent, self).__init__(**kwargs) - self.replica_instance_id = kwargs.get('replica_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'StatefulReplicaHealthReportExpired' - - -class StatefulReplicaNewHealthReportEvent(ReplicaEvent): - """Stateful Replica Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param replica_instance_id: Required. Id of Replica instance. - :type replica_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'replica_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(StatefulReplicaNewHealthReportEvent, self).__init__(**kwargs) - self.replica_instance_id = kwargs.get('replica_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'StatefulReplicaNewHealthReport' - - -class StatefulServiceDescription(ServiceDescription): - """Describes a stateful service. - - All required parameters must be populated in order to send to Azure. - - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_name: Required. The full name of the service with 'fabric:' - URI scheme. - :type service_name: str - :param service_type_name: Required. Name of the service type as specified - in the service manifest. - :type service_type_name: str - :param initialization_data: The initialization data as an array of bytes. - Initialization data is passed to service instances or replicas when they - are created. - :type initialization_data: list[int] - :param partition_description: Required. The partition description as an - object. - :type partition_description: - ~azure.servicefabric.models.PartitionSchemeDescription - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics. - :type service_load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param is_default_move_cost_specified: Indicates if the DefaultMoveCost - property is specified. - :type is_default_move_cost_specified: bool - :param service_package_activation_mode: The activation mode of service - package to be used for a service. Possible values include: - 'SharedProcess', 'ExclusiveProcess' - :type service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS - system service to be enabled in Service Fabric cluster. - :type service_dns_name: str - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param tags_required_to_place: Tags for placement of this service. - :type tags_required_to_place: - ~azure.servicefabric.models.NodeTagsDescription - :param tags_required_to_run: Tags for running of this service. - :type tags_required_to_run: - ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param target_replica_set_size: Required. The target replica set size as a - number. - :type target_replica_set_size: int - :param min_replica_set_size: Required. The minimum replica set size as a - number. - :type min_replica_set_size: int - :param has_persisted_state: Required. A flag indicating whether this is a - persistent service which stores states on the local disk. If it is then - the value of this property is true, if not it is false. - :type has_persisted_state: bool - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 6 then the flags for - QuorumLossWaitDuration (2) and StandByReplicaKeepDuration(4) are set. - - None - Does not indicate any other properties are set. The value is - zero. - - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - property is set. The value is 1. - - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property - is set. The value is 2. - - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - property is set. The value is 4. - - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit - property is set. The value is 8. - - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property - is set. The value is 16. - :type flags: int - :param replica_restart_wait_duration_seconds: The duration, in seconds, - between when a replica goes down and when a new replica is created. - :type replica_restart_wait_duration_seconds: long - :param quorum_loss_wait_duration_seconds: The maximum duration, in - seconds, for which a partition is allowed to be in a state of quorum loss. - :type quorum_loss_wait_duration_seconds: long - :param stand_by_replica_keep_duration_seconds: The definition on how long - StandBy replicas should be maintained before being removed. - :type stand_by_replica_keep_duration_seconds: long - :param service_placement_time_limit_seconds: The duration for which - replicas can stay InBuild before reporting that build is stuck. - :type service_placement_time_limit_seconds: long - :param drop_source_replica_on_move: Indicates whether to drop source - Secondary replica even if the target replica has not finished build. If - desired behavior is to drop it as soon as possible the value of this - property is true, if not it is false. - :type drop_source_replica_on_move: bool - :param replica_lifecycle_description: Defines how replicas of this service - will behave during ther lifecycle. - :type replica_lifecycle_description: - ~azure.servicefabric.models.ReplicaLifecycleDescription - """ - - _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, - 'target_replica_set_size': {'required': True, 'minimum': 1}, - 'min_replica_set_size': {'required': True, 'minimum': 1}, - 'has_persisted_state': {'required': True}, - 'replica_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'quorum_loss_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'stand_by_replica_keep_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'service_placement_time_limit_seconds': {'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'long'}, - 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'long'}, - 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'long'}, - 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'long'}, - 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, - 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, - } - - def __init__(self, **kwargs): - super(StatefulServiceDescription, self).__init__(**kwargs) - self.target_replica_set_size = kwargs.get('target_replica_set_size', None) - self.min_replica_set_size = kwargs.get('min_replica_set_size', None) - self.has_persisted_state = kwargs.get('has_persisted_state', None) - self.flags = kwargs.get('flags', None) - self.replica_restart_wait_duration_seconds = kwargs.get('replica_restart_wait_duration_seconds', None) - self.quorum_loss_wait_duration_seconds = kwargs.get('quorum_loss_wait_duration_seconds', None) - self.stand_by_replica_keep_duration_seconds = kwargs.get('stand_by_replica_keep_duration_seconds', None) - self.service_placement_time_limit_seconds = kwargs.get('service_placement_time_limit_seconds', None) - self.drop_source_replica_on_move = kwargs.get('drop_source_replica_on_move', None) - self.replica_lifecycle_description = kwargs.get('replica_lifecycle_description', None) - self.service_kind = 'Stateful' - - -class StatefulServiceInfo(ServiceInfo): - """Information about a stateful Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :param id: The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to - identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type id: str - :param name: The full name of the service with 'fabric:' URI scheme. - :type name: str - :param type_name: Name of the service type as specified in the service - manifest. - :type type_name: str - :param manifest_version: The version of the service manifest. - :type manifest_version: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_status: The status of the application. Possible values - include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', - 'Failed' - :type service_status: str or ~azure.servicefabric.models.ServiceStatus - :param is_service_group: Whether the service is in a service group. - :type is_service_group: bool - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param has_persisted_state: Whether the service has persisted state. - :type has_persisted_state: bool - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(StatefulServiceInfo, self).__init__(**kwargs) - self.has_persisted_state = kwargs.get('has_persisted_state', None) - self.service_kind = 'Stateful' - - -class StatefulServicePartitionInfo(ServicePartitionInfo): - """Information about a partition of a stateful Service Fabric service.. - - All required parameters must be populated in order to send to Azure. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param partition_status: The status of the service fabric service - partition. Possible values include: 'Invalid', 'Ready', 'NotReady', - 'InQuorumLoss', 'Reconfiguring', 'Deleting' - :type partition_status: str or - ~azure.servicefabric.models.ServicePartitionStatus - :param partition_information: Information about the partition identity, - partitioning scheme and keys supported by it. - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param target_replica_set_size: The target replica set size as a number. - :type target_replica_set_size: long - :param min_replica_set_size: The minimum replica set size as a number. - :type min_replica_set_size: long - :param last_quorum_loss_duration: The duration for which this partition - was in quorum loss. If the partition is currently in quorum loss, it - returns the duration since it has been in that state. This field is using - ISO8601 format for specifying the duration. - :type last_quorum_loss_duration: timedelta - :param primary_epoch: An Epoch is a configuration number for the partition - as a whole. When the configuration of the replica set changes, for example - when the Primary replica changes, the operations that are replicated from - the new Primary replica are said to be a new Epoch from the ones which - were sent by the old Primary replica. - :type primary_epoch: ~azure.servicefabric.models.Epoch - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'long'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'long'}, - 'last_quorum_loss_duration': {'key': 'LastQuorumLossDuration', 'type': 'duration'}, - 'primary_epoch': {'key': 'PrimaryEpoch', 'type': 'Epoch'}, - } - - def __init__(self, **kwargs): - super(StatefulServicePartitionInfo, self).__init__(**kwargs) - self.target_replica_set_size = kwargs.get('target_replica_set_size', None) - self.min_replica_set_size = kwargs.get('min_replica_set_size', None) - self.last_quorum_loss_duration = kwargs.get('last_quorum_loss_duration', None) - self.primary_epoch = kwargs.get('primary_epoch', None) - self.service_kind = 'Stateful' - - -class StatefulServiceReplicaHealth(ReplicaHealth): - """Represents the health of the stateful service replica. - Contains the replica aggregated health state, the health events and the - unhealthy evaluations. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param partition_id: Id of the partition to which this replica belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StatefulServiceReplicaHealth, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.service_kind = 'Stateful' - - -class StatefulServiceReplicaHealthState(ReplicaHealthState): - """Represents the health state of the stateful service replica, which contains - the replica ID and the aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param partition_id: The ID of the partition to which this replica - belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StatefulServiceReplicaHealthState, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.service_kind = 'Stateful' - - -class StatefulServiceReplicaInfo(ReplicaInfo): - """Represents a stateful service replica. This includes information about the - identity, role, status, health, node name, uptime, and other details about - the replica. - - All required parameters must be populated in order to send to Azure. - - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param address: The address the replica is listening on. - :type address: str - :param last_in_build_duration_in_seconds: The last in build duration of - the replica in seconds. - :type last_in_build_duration_in_seconds: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_role: The role of a replica of a stateful service. Possible - values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', - 'ActiveSecondary' - :type replica_role: str or ~azure.servicefabric.models.ReplicaRole - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StatefulServiceReplicaInfo, self).__init__(**kwargs) - self.replica_role = kwargs.get('replica_role', None) - self.replica_id = kwargs.get('replica_id', None) - self.service_kind = 'Stateful' - - -class StatefulServiceTypeDescription(ServiceTypeDescription): - """Describes a stateful service type defined in the service manifest of a - provisioned application type. - - All required parameters must be populated in order to send to Azure. - - :param is_stateful: Indicates whether the service type is a stateful - service type or a stateless service type. This property is true if the - service type is a stateful service type, false otherwise. - :type is_stateful: bool - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param placement_constraints: The placement constraint to be used when - instantiating this service in a Service Fabric cluster. - :type placement_constraints: str - :param load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: List of service placement policy - descriptions. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param extensions: List of service type extensions. - :type extensions: - list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :param kind: Required. Constant filled by server. - :type kind: str - :param has_persisted_state: A flag indicating whether this is a persistent - service which stores states on the local disk. If it is then the value of - this property is true, if not it is false. - :type has_persisted_state: bool - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(StatefulServiceTypeDescription, self).__init__(**kwargs) - self.has_persisted_state = kwargs.get('has_persisted_state', None) - self.kind = 'Stateful' - - -class StatefulServiceUpdateDescription(ServiceUpdateDescription): - """Describes an update for a stateful service. - - All required parameters must be populated in order to send to Azure. - - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 6 then the flags for - ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. - - None - Does not indicate any other properties are set. The value is - zero. - - TargetReplicaSetSize/InstanceCount - Indicates whether the - TargetReplicaSetSize property (for Stateful services) or the InstanceCount - property (for Stateless services) is set. The value is 1. - - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - property is set. The value is 2. - - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property - is set. The value is 4. - - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - property is set. The value is 8. - - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The - value is 16. - - PlacementConstraints - Indicates the PlacementConstraints property is - set. The value is 32. - - PlacementPolicyList - Indicates the ServicePlacementPolicies property is - set. The value is 64. - - Correlation - Indicates the CorrelationScheme property is set. The value - is 128. - - Metrics - Indicates the ServiceLoadMetrics property is set. The value is - 256. - - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The - value is 512. - - ScalingPolicy - Indicates the ScalingPolicies property is set. The value - is 1024. - - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit - property is set. The value is 2048. - - MinInstanceCount - Indicates the MinInstanceCount property is set. The - value is 4096. - - MinInstancePercentage - Indicates the MinInstancePercentage property is - set. The value is 8192. - - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 16384. - - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 32768. - - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property - is set. The value is 65536. - - ServiceDnsName - Indicates the ServiceDnsName property is set. The value - is 131072. - - TagsForPlacement - Indicates the TagsForPlacement property is set. The - value is 1048576. - - TagsForRunning - Indicates the TagsForRunning property is set. The value - is 2097152. - :type flags: str - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param load_metrics: The service load metrics. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param service_dns_name: The DNS name of the service. - :type service_dns_name: str - :param tags_for_placement: Tags for placement of this service. - :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :param tags_for_running: Tags for running of this service. - :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param target_replica_set_size: The target replica set size as a number. - :type target_replica_set_size: int - :param min_replica_set_size: The minimum replica set size as a number. - :type min_replica_set_size: int - :param replica_restart_wait_duration_seconds: The duration, in seconds, - between when a replica goes down and when a new replica is created. - :type replica_restart_wait_duration_seconds: str - :param quorum_loss_wait_duration_seconds: The maximum duration, in - seconds, for which a partition is allowed to be in a state of quorum loss. - :type quorum_loss_wait_duration_seconds: str - :param stand_by_replica_keep_duration_seconds: The definition on how long - StandBy replicas should be maintained before being removed. - :type stand_by_replica_keep_duration_seconds: str - :param service_placement_time_limit_seconds: The duration for which - replicas can stay InBuild before reporting that build is stuck. - :type service_placement_time_limit_seconds: str - :param drop_source_replica_on_move: Indicates whether to drop source - Secondary replica even if the target replica has not finished build. If - desired behavior is to drop it as soon as possible the value of this - property is true, if not it is false. - :type drop_source_replica_on_move: bool - :param replica_lifecycle_description: Defines how replicas of this service - will behave during ther lifecycle. - :type replica_lifecycle_description: - ~azure.servicefabric.models.ReplicaLifecycleDescription - """ - - _validation = { - 'service_kind': {'required': True}, - 'target_replica_set_size': {'minimum': 1}, - 'min_replica_set_size': {'minimum': 1}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'str'}, - 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'str'}, - 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'str'}, - 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'str'}, - 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, - 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, - } - - def __init__(self, **kwargs): - super(StatefulServiceUpdateDescription, self).__init__(**kwargs) - self.target_replica_set_size = kwargs.get('target_replica_set_size', None) - self.min_replica_set_size = kwargs.get('min_replica_set_size', None) - self.replica_restart_wait_duration_seconds = kwargs.get('replica_restart_wait_duration_seconds', None) - self.quorum_loss_wait_duration_seconds = kwargs.get('quorum_loss_wait_duration_seconds', None) - self.stand_by_replica_keep_duration_seconds = kwargs.get('stand_by_replica_keep_duration_seconds', None) - self.service_placement_time_limit_seconds = kwargs.get('service_placement_time_limit_seconds', None) - self.drop_source_replica_on_move = kwargs.get('drop_source_replica_on_move', None) - self.replica_lifecycle_description = kwargs.get('replica_lifecycle_description', None) - self.service_kind = 'Stateful' - - -class StatelessReplicaHealthReportExpiredEvent(ReplicaEvent): - """Stateless Replica Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(StatelessReplicaHealthReportExpiredEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'StatelessReplicaHealthReportExpired' - - -class StatelessReplicaNewHealthReportEvent(ReplicaEvent): - """Stateless Replica Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(StatelessReplicaNewHealthReportEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'StatelessReplicaNewHealthReport' - - -class StatelessServiceDescription(ServiceDescription): - """Describes a stateless service. - - All required parameters must be populated in order to send to Azure. - - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_name: Required. The full name of the service with 'fabric:' - URI scheme. - :type service_name: str - :param service_type_name: Required. Name of the service type as specified - in the service manifest. - :type service_type_name: str - :param initialization_data: The initialization data as an array of bytes. - Initialization data is passed to service instances or replicas when they - are created. - :type initialization_data: list[int] - :param partition_description: Required. The partition description as an - object. - :type partition_description: - ~azure.servicefabric.models.PartitionSchemeDescription - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics. - :type service_load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param is_default_move_cost_specified: Indicates if the DefaultMoveCost - property is specified. - :type is_default_move_cost_specified: bool - :param service_package_activation_mode: The activation mode of service - package to be used for a service. Possible values include: - 'SharedProcess', 'ExclusiveProcess' - :type service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS - system service to be enabled in Service Fabric cluster. - :type service_dns_name: str - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param tags_required_to_place: Tags for placement of this service. - :type tags_required_to_place: - ~azure.servicefabric.models.NodeTagsDescription - :param tags_required_to_run: Tags for running of this service. - :type tags_required_to_run: - ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_count: Required. The instance count. - :type instance_count: int - :param min_instance_count: MinInstanceCount is the minimum number of - instances that must be up to meet the EnsureAvailability safety check - during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation - -1 is first converted into the number of nodes on which the instances are - allowed to be placed according to the placement constraints on the - service. - :type min_instance_count: int - :param min_instance_percentage: MinInstancePercentage is the minimum - percentage of InstanceCount that must be up to meet the EnsureAvailability - safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage - computation, -1 is first converted into the number of nodes on which the - instances are allowed to be placed according to the placement constraints - on the service. - :type min_instance_percentage: int - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 1 then the flags for - InstanceCloseDelayDuration is set. - - None - Does not indicate any other properties are set. The value is - zero. - - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 1. - - InstanceRestartWaitDuration - Indicates the - InstanceRestartWaitDurationSeconds property is set. The value is 2. - :type flags: int - :param instance_close_delay_duration_seconds: Duration in seconds, to wait - before a stateless instance is closed, to allow the active requests to - drain gracefully. This would be effective when the instance is closing - during the application/cluster upgrade and disabling node. - The endpoint exposed on this instance is removed prior to starting the - delay, which prevents new connections to this instance. - In addition, clients that have subscribed to service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do - the following upon receiving the endpoint removal notification: - - Stop sending new requests to this instance. - - Close existing connections after in-flight requests have completed. - - Connect to a different instance of the service partition for future - requests. - Note, the default value of InstanceCloseDelayDuration is 0, which - indicates that there won't be any delay or removal of the endpoint prior - to closing the instance. - :type instance_close_delay_duration_seconds: long - :param instance_lifecycle_description: Defines how instances of this - service will behave during ther lifecycle. - :type instance_lifecycle_description: - ~azure.servicefabric.models.InstanceLifecycleDescription - :param instance_restart_wait_duration_seconds: When a stateless instance - goes down, this timer starts. When it expires Service Fabric will create a - new instance on any node in the cluster. - This configuration is to reduce unnecessary creation of a new instance in - situations where the instance going down is likely to recover in a short - time. For example, during an upgrade. - The default value is 0, which indicates that when stateless instance goes - down, Service Fabric will immediately start building its replacement. - :type instance_restart_wait_duration_seconds: long - """ - - _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, - 'instance_count': {'required': True, 'minimum': -1}, - 'instance_close_delay_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'instance_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'long'}, - 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, - 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(StatelessServiceDescription, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) - self.min_instance_count = kwargs.get('min_instance_count', None) - self.min_instance_percentage = kwargs.get('min_instance_percentage', None) - self.flags = kwargs.get('flags', None) - self.instance_close_delay_duration_seconds = kwargs.get('instance_close_delay_duration_seconds', None) - self.instance_lifecycle_description = kwargs.get('instance_lifecycle_description', None) - self.instance_restart_wait_duration_seconds = kwargs.get('instance_restart_wait_duration_seconds', None) - self.service_kind = 'Stateless' - - -class StatelessServiceInfo(ServiceInfo): - """Information about a stateless Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :param id: The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to - identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type id: str - :param name: The full name of the service with 'fabric:' URI scheme. - :type name: str - :param type_name: Name of the service type as specified in the service - manifest. - :type type_name: str - :param manifest_version: The version of the service manifest. - :type manifest_version: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_status: The status of the application. Possible values - include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', - 'Failed' - :type service_status: str or ~azure.servicefabric.models.ServiceStatus - :param is_service_group: Whether the service is in a service group. - :type is_service_group: bool - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StatelessServiceInfo, self).__init__(**kwargs) - self.service_kind = 'Stateless' - - -class StatelessServiceInstanceHealth(ReplicaHealth): - """Represents the health of the stateless service instance. - Contains the instance aggregated health state, the health events and the - unhealthy evaluations. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param partition_id: Id of the partition to which this replica belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_id: Id of a stateless service instance. InstanceId is used - by Service Fabric to uniquely identify an instance of a partition of a - stateless service. It is unique within a partition and does not change for - the lifetime of the instance. If the instance has failed over on the same - or different node, it will get a different value for the InstanceId. - :type instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StatelessServiceInstanceHealth, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.service_kind = 'Stateless' - - -class StatelessServiceInstanceHealthState(ReplicaHealthState): - """Represents the health state of the stateless service instance, which - contains the instance ID and the aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param partition_id: The ID of the partition to which this replica - belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of the stateless service instance on the wire this - field is called ReplicaId. - :type replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StatelessServiceInstanceHealthState, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.service_kind = 'Stateless' - - -class StatelessServiceInstanceInfo(ReplicaInfo): - """Represents a stateless service instance. This includes information about - the identity, status, health, node name, uptime, and other details about - the instance. - - All required parameters must be populated in order to send to Azure. - - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param address: The address the replica is listening on. - :type address: str - :param last_in_build_duration_in_seconds: The last in build duration of - the replica in seconds. - :type last_in_build_duration_in_seconds: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_id: Id of a stateless service instance. InstanceId is used - by Service Fabric to uniquely identify an instance of a partition of a - stateless service. It is unique within a partition and does not change for - the lifetime of the instance. If the instance has failed over on the same - or different node, it will get a different value for the InstanceId. - :type instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StatelessServiceInstanceInfo, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.service_kind = 'Stateless' - - -class StatelessServicePartitionInfo(ServicePartitionInfo): - """Information about a partition of a stateless Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param partition_status: The status of the service fabric service - partition. Possible values include: 'Invalid', 'Ready', 'NotReady', - 'InQuorumLoss', 'Reconfiguring', 'Deleting' - :type partition_status: str or - ~azure.servicefabric.models.ServicePartitionStatus - :param partition_information: Information about the partition identity, - partitioning scheme and keys supported by it. - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_count: Number of instances of this partition. - :type instance_count: long - :param min_instance_count: MinInstanceCount is the minimum number of - instances that must be up to meet the EnsureAvailability safety check - during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation - -1 is first converted into the number of nodes on which the instances are - allowed to be placed according to the placement constraints on the - service. - :type min_instance_count: int - :param min_instance_percentage: MinInstancePercentage is the minimum - percentage of InstanceCount that must be up to meet the EnsureAvailability - safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage - computation, -1 is first converted into the number of nodes on which the - instances are allowed to be placed according to the placement constraints - on the service. - :type min_instance_percentage: int - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'long'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(StatelessServicePartitionInfo, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) - self.min_instance_count = kwargs.get('min_instance_count', None) - self.min_instance_percentage = kwargs.get('min_instance_percentage', None) - self.service_kind = 'Stateless' - - -class StatelessServiceTypeDescription(ServiceTypeDescription): - """Describes a stateless service type defined in the service manifest of a - provisioned application type. - - All required parameters must be populated in order to send to Azure. - - :param is_stateful: Indicates whether the service type is a stateful - service type or a stateless service type. This property is true if the - service type is a stateful service type, false otherwise. - :type is_stateful: bool - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param placement_constraints: The placement constraint to be used when - instantiating this service in a Service Fabric cluster. - :type placement_constraints: str - :param load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: List of service placement policy - descriptions. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param extensions: List of service type extensions. - :type extensions: - list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :param kind: Required. Constant filled by server. - :type kind: str - :param use_implicit_host: A flag indicating if this type is not - implemented and hosted by a user service process, but is implicitly hosted - by a system created process. This value is true for services using the - guest executable services, false otherwise. - :type use_implicit_host: bool - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'use_implicit_host': {'key': 'UseImplicitHost', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(StatelessServiceTypeDescription, self).__init__(**kwargs) - self.use_implicit_host = kwargs.get('use_implicit_host', None) - self.kind = 'Stateless' - - -class StatelessServiceUpdateDescription(ServiceUpdateDescription): - """Describes an update for a stateless service. - - All required parameters must be populated in order to send to Azure. - - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 6 then the flags for - ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. - - None - Does not indicate any other properties are set. The value is - zero. - - TargetReplicaSetSize/InstanceCount - Indicates whether the - TargetReplicaSetSize property (for Stateful services) or the InstanceCount - property (for Stateless services) is set. The value is 1. - - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - property is set. The value is 2. - - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property - is set. The value is 4. - - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - property is set. The value is 8. - - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The - value is 16. - - PlacementConstraints - Indicates the PlacementConstraints property is - set. The value is 32. - - PlacementPolicyList - Indicates the ServicePlacementPolicies property is - set. The value is 64. - - Correlation - Indicates the CorrelationScheme property is set. The value - is 128. - - Metrics - Indicates the ServiceLoadMetrics property is set. The value is - 256. - - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The - value is 512. - - ScalingPolicy - Indicates the ScalingPolicies property is set. The value - is 1024. - - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit - property is set. The value is 2048. - - MinInstanceCount - Indicates the MinInstanceCount property is set. The - value is 4096. - - MinInstancePercentage - Indicates the MinInstancePercentage property is - set. The value is 8192. - - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 16384. - - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 32768. - - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property - is set. The value is 65536. - - ServiceDnsName - Indicates the ServiceDnsName property is set. The value - is 131072. - - TagsForPlacement - Indicates the TagsForPlacement property is set. The - value is 1048576. - - TagsForRunning - Indicates the TagsForRunning property is set. The value - is 2097152. - :type flags: str - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param load_metrics: The service load metrics. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param service_dns_name: The DNS name of the service. - :type service_dns_name: str - :param tags_for_placement: Tags for placement of this service. - :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :param tags_for_running: Tags for running of this service. - :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_count: The instance count. - :type instance_count: int - :param min_instance_count: MinInstanceCount is the minimum number of - instances that must be up to meet the EnsureAvailability safety check - during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation - -1 is first converted into the number of nodes on which the instances are - allowed to be placed according to the placement constraints on the - service. - :type min_instance_count: int - :param min_instance_percentage: MinInstancePercentage is the minimum - percentage of InstanceCount that must be up to meet the EnsureAvailability - safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage - computation, -1 is first converted into the number of nodes on which the - instances are allowed to be placed according to the placement constraints - on the service. - :type min_instance_percentage: int - :param instance_close_delay_duration_seconds: Duration in seconds, to wait - before a stateless instance is closed, to allow the active requests to - drain gracefully. This would be effective when the instance is closing - during the application/cluster upgrade and disabling node. - The endpoint exposed on this instance is removed prior to starting the - delay, which prevents new connections to this instance. - In addition, clients that have subscribed to service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do - the following upon receiving the endpoint removal notification: - - Stop sending new requests to this instance. - - Close existing connections after in-flight requests have completed. - - Connect to a different instance of the service partition for future - requests. - :type instance_close_delay_duration_seconds: str - :param instance_lifecycle_description: Defines how instances of this - service will behave during ther lifecycle. - :type instance_lifecycle_description: - ~azure.servicefabric.models.InstanceLifecycleDescription - :param instance_restart_wait_duration_seconds: When a stateless instance - goes down, this timer starts. When it expires Service Fabric will create a - new instance on any node in the cluster. - This configuration is to reduce unnecessary creation of a new instance in - situations where the instance going down is likely to recover in a short - time. For example, during an upgrade. - The default value is 0, which indicates that when stateless instance goes - down, Service Fabric will immediately start building its replacement. - :type instance_restart_wait_duration_seconds: str - """ - - _validation = { - 'service_kind': {'required': True}, - 'instance_count': {'minimum': -1}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'str'}, - 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, - 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StatelessServiceUpdateDescription, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) - self.min_instance_count = kwargs.get('min_instance_count', None) - self.min_instance_percentage = kwargs.get('min_instance_percentage', None) - self.instance_close_delay_duration_seconds = kwargs.get('instance_close_delay_duration_seconds', None) - self.instance_lifecycle_description = kwargs.get('instance_lifecycle_description', None) - self.instance_restart_wait_duration_seconds = kwargs.get('instance_restart_wait_duration_seconds', None) - self.service_kind = 'Stateless' - - -class StoppedChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos stops because either - the user issued a stop or the time to run was up. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Describes why Chaos stopped. Chaos can stop because of - StopChaos API call or the timeToRun provided in ChaosParameters is over. - :type reason: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StoppedChaosEvent, self).__init__(**kwargs) - self.reason = kwargs.get('reason', None) - self.kind = 'Stopped' - - -class StringPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type String. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. The data of the property value. - :type data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StringPropertyValue, self).__init__(**kwargs) - self.data = kwargs.get('data', None) - self.kind = 'String' - - -class SuccessfulPropertyBatchInfo(PropertyBatchInfo): - """Derived from PropertyBatchInfo. Represents the property batch succeeding. - Contains the results of any "Get" operations in the batch. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param properties: A map containing the properties that were requested - through any "Get" property batch operations. The key represents the index - of the "Get" operation in the original request, in string form. The value - is the property. If a property is not found, it will not be in the map. - :type properties: dict[str, ~azure.servicefabric.models.PropertyInfo] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'properties': {'key': 'Properties', 'type': '{PropertyInfo}'}, - } - - def __init__(self, **kwargs): - super(SuccessfulPropertyBatchInfo, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.kind = 'Successful' - - -class SystemApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for the fabric:/System application, containing - information about the data and the algorithm used by health store to - evaluate health. The evaluation is returned only when the aggregated health - state of the cluster is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the system application. The types - of the unhealthy evaluations can be DeployedApplicationsHealthEvaluation, - ServicesHealthEvaluation or EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(SystemApplicationHealthEvaluation, self).__init__(**kwargs) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'SystemApplication' - - -class TcpConfig(Model): - """Describes the tcp configuration for external connectivity for this network. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. tcp gateway config name. - :type name: str - :param port: Required. Specifies the port at which the service endpoint - below needs to be exposed. - :type port: int - :param destination: Required. Describes destination endpoint for routing - traffic. - :type destination: ~azure.servicefabric.models.GatewayDestination - """ - - _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, - } - - def __init__(self, **kwargs): - super(TcpConfig, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.port = kwargs.get('port', None) - self.destination = kwargs.get('destination', None) - - -class TestErrorChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when an unexpected event occurs - in the Chaos engine. - For example, due to the cluster snapshot being inconsistent, while faulting - an entity, Chaos found that the entity was already faulted -- which would - be an unexpected event. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Describes why TestErrorChaosEvent was generated. For - example, Chaos tries to fault a partition but finds that the partition is - no longer fault tolerant, then a TestErrorEvent gets generated with the - reason stating that the partition is not fault tolerant. - :type reason: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TestErrorChaosEvent, self).__init__(**kwargs) - self.reason = kwargs.get('reason', None) - self.kind = 'TestError' - - -class TimeBasedBackupScheduleDescription(BackupScheduleDescription): - """Describes the time based backup schedule. - - All required parameters must be populated in order to send to Azure. - - :param schedule_kind: Required. Constant filled by server. - :type schedule_kind: str - :param schedule_frequency_type: Required. Describes the frequency with - which to run the time based backup schedule. Possible values include: - 'Invalid', 'Daily', 'Weekly' - :type schedule_frequency_type: str or - ~azure.servicefabric.models.BackupScheduleFrequencyType - :param run_days: List of days of a week when to trigger the periodic - backup. This is valid only when the backup schedule frequency type is - weekly. - :type run_days: list[str or ~azure.servicefabric.models.DayOfWeek] - :param run_times: Required. Represents the list of exact time during the - day in ISO8601 format. Like '19:00:00' will represent '7PM' during the - day. Date specified along with time will be ignored. - :type run_times: list[datetime] - """ - - _validation = { - 'schedule_kind': {'required': True}, - 'schedule_frequency_type': {'required': True}, - 'run_times': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - 'schedule_frequency_type': {'key': 'ScheduleFrequencyType', 'type': 'str'}, - 'run_days': {'key': 'RunDays', 'type': '[str]'}, - 'run_times': {'key': 'RunTimes', 'type': '[iso-8601]'}, - } - - def __init__(self, **kwargs): - super(TimeBasedBackupScheduleDescription, self).__init__(**kwargs) - self.schedule_frequency_type = kwargs.get('schedule_frequency_type', None) - self.run_days = kwargs.get('run_days', None) - self.run_times = kwargs.get('run_times', None) - self.schedule_kind = 'TimeBased' - - -class TimeOfDay(Model): - """Defines an hour and minute of the day specified in 24 hour time. - - :param hour: Represents the hour of the day. Value must be between 0 and - 23 inclusive. - :type hour: int - :param minute: Represents the minute of the hour. Value must be between 0 - to 59 inclusive. - :type minute: int - """ - - _validation = { - 'hour': {'maximum': 23, 'minimum': 0}, - 'minute': {'maximum': 59, 'minimum': 0}, - } - - _attribute_map = { - 'hour': {'key': 'Hour', 'type': 'int'}, - 'minute': {'key': 'Minute', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(TimeOfDay, self).__init__(**kwargs) - self.hour = kwargs.get('hour', None) - self.minute = kwargs.get('minute', None) - - -class TimeRange(Model): - """Defines a time range in a 24 hour day specified by a start and end time. - - :param start_time: Defines an hour and minute of the day specified in 24 - hour time. - :type start_time: ~azure.servicefabric.models.TimeOfDay - :param end_time: Defines an hour and minute of the day specified in 24 - hour time. - :type end_time: ~azure.servicefabric.models.TimeOfDay - """ - - _attribute_map = { - 'start_time': {'key': 'StartTime', 'type': 'TimeOfDay'}, - 'end_time': {'key': 'EndTime', 'type': 'TimeOfDay'}, - } - - def __init__(self, **kwargs): - super(TimeRange, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - - -class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): - """Describes a partitioning scheme where an integer range is allocated evenly - across a number of partitions. - - All required parameters must be populated in order to send to Azure. - - :param partition_scheme: Required. Constant filled by server. - :type partition_scheme: str - :param count: Required. The number of partitions. - :type count: int - :param low_key: Required. String indicating the lower bound of the - partition key range that - should be split between the partitions. - :type low_key: str - :param high_key: Required. String indicating the upper bound of the - partition key range that - should be split between the partitions. - :type high_key: str - """ - - _validation = { - 'partition_scheme': {'required': True}, - 'count': {'required': True}, - 'low_key': {'required': True}, - 'high_key': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UniformInt64RangePartitionSchemeDescription, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.low_key = kwargs.get('low_key', None) - self.high_key = kwargs.get('high_key', None) - self.partition_scheme = 'UniformInt64Range' - - -class UnplacedReplicaInformation(Model): - """Contains information for an unplaced replica. - - :param service_name: The name of the service. - :type service_name: str - :param partition_id: The ID of the partition. - :type partition_id: str - :param unplaced_replica_details: List of reasons due to which a replica - cannot be placed. - :type unplaced_replica_details: list[str] - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'unplaced_replica_details': {'key': 'UnplacedReplicaDetails', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(UnplacedReplicaInformation, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.unplaced_replica_details = kwargs.get('unplaced_replica_details', None) - - -class UnprovisionApplicationTypeDescriptionInfo(Model): - """Describes the operation to unregister or unprovision an application type - and its version that was registered with the Service Fabric. - - All required parameters must be populated in order to send to Azure. - - :param application_type_version: Required. The version of the application - type as defined in the application manifest. - :type application_type_version: str - :param async_property: The flag indicating whether or not unprovision - should occur asynchronously. When set to true, the unprovision operation - returns when the request is accepted by the system, and the unprovision - operation continues without any timeout limit. The default value is false. - However, we recommend setting it to true for large application packages - that were provisioned. - :type async_property: bool - """ - - _validation = { - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'async_property': {'key': 'Async', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(UnprovisionApplicationTypeDescriptionInfo, self).__init__(**kwargs) - self.application_type_version = kwargs.get('application_type_version', None) - self.async_property = kwargs.get('async_property', None) - - -class UnprovisionFabricDescription(Model): - """Describes the parameters for unprovisioning a cluster. - - :param code_version: The cluster code package version. - :type code_version: str - :param config_version: The cluster manifest version. - :type config_version: str - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UnprovisionFabricDescription, self).__init__(**kwargs) - self.code_version = kwargs.get('code_version', None) - self.config_version = kwargs.get('config_version', None) - - -class UpdateClusterUpgradeDescription(Model): - """Parameters for updating a cluster upgrade. - - :param upgrade_kind: The type of upgrade out of the following possible - values. Possible values include: 'Invalid', 'Rolling', - 'Rolling_ForceRestart'. Default value: "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeType - :param update_description: Describes the parameters for updating a rolling - upgrade of application or cluster. - :type update_description: - ~azure.servicefabric.models.RollingUpgradeUpdateDescription - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param enable_delta_health_evaluation: When true, enables delta health - evaluation rather than absolute health evaluation after completion of each - upgrade domain. - :type enable_delta_health_evaluation: bool - :param cluster_upgrade_health_policy: Defines a health policy used to - evaluate the health of the cluster during a cluster upgrade. - :type cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :param application_health_policy_map: Defines the application health - policy map used to evaluate the health of an application or one of its - children entities. - :type application_health_policy_map: - ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _attribute_map = { - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__(self, **kwargs): - super(UpdateClusterUpgradeDescription, self).__init__(**kwargs) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.update_description = kwargs.get('update_description', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) - self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) - - -class UpdatePartitionLoadResult(Model): - """Specifies result of updating load for specified partitions. The output will - be ordered based on the partition ID. - - :param partition_id: Id of the partition. - :type partition_id: str - :param partition_error_code: If OperationState is Completed - this is 0. - If OperationState is Faulted - this is an error code indicating the - reason. - :type partition_error_code: int - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'partition_error_code': {'key': 'PartitionErrorCode', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(UpdatePartitionLoadResult, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.partition_error_code = kwargs.get('partition_error_code', None) - - -class UpgradeDomainDeltaNodesCheckHealthEvaluation(HealthEvaluation): - """Represents health evaluation for delta unhealthy cluster nodes in an - upgrade domain, containing health evaluations for each unhealthy node that - impacted current aggregated health state. - Can be returned during cluster upgrade when cluster aggregated health state - is Warning or Error. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param upgrade_domain_name: Name of the upgrade domain where nodes health - is currently evaluated. - :type upgrade_domain_name: str - :param baseline_error_count: Number of upgrade domain nodes with - aggregated heath state Error in the health store at the beginning of the - cluster upgrade. - :type baseline_error_count: long - :param baseline_total_count: Total number of upgrade domain nodes in the - health store at the beginning of the cluster upgrade. - :type baseline_total_count: long - :param max_percent_delta_unhealthy_nodes: Maximum allowed percentage of - upgrade domain delta unhealthy nodes from the ClusterUpgradeHealthPolicy. - :type max_percent_delta_unhealthy_nodes: int - :param total_count: Total number of upgrade domain nodes in the health - store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - NodeHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, - 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(UpgradeDomainDeltaNodesCheckHealthEvaluation, self).__init__(**kwargs) - self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) - self.baseline_error_count = kwargs.get('baseline_error_count', None) - self.baseline_total_count = kwargs.get('baseline_total_count', None) - self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'UpgradeDomainDeltaNodesCheck' - - -class UpgradeDomainInfo(Model): - """Information about an upgrade domain. - - :param name: The name of the upgrade domain - :type name: str - :param state: The state of the upgrade domain. Possible values include: - 'Invalid', 'Pending', 'InProgress', 'Completed' - :type state: str or ~azure.servicefabric.models.UpgradeDomainState - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UpgradeDomainInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.state = kwargs.get('state', None) - - -class UpgradeDomainNodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for cluster nodes in an upgrade domain, - containing health evaluations for each unhealthy node that impacted current - aggregated health state. Can be returned when evaluating cluster health - during cluster upgrade and the aggregated health state is either Error or - Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param upgrade_domain_name: Name of the upgrade domain where nodes health - is currently evaluated. - :type upgrade_domain_name: str - :param max_percent_unhealthy_nodes: Maximum allowed percentage of - unhealthy nodes from the ClusterHealthPolicy. - :type max_percent_unhealthy_nodes: int - :param total_count: Total number of nodes in the current upgrade domain. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - NodeHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(UpgradeDomainNodesHealthEvaluation, self).__init__(**kwargs) - self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'UpgradeDomainNodes' - - -class UpgradeOrchestrationServiceState(Model): - """Service state of Service Fabric Upgrade Orchestration Service. - - :param service_state: The state of Service Fabric Upgrade Orchestration - Service. - :type service_state: str - """ - - _attribute_map = { - 'service_state': {'key': 'ServiceState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UpgradeOrchestrationServiceState, self).__init__(**kwargs) - self.service_state = kwargs.get('service_state', None) - - -class UpgradeOrchestrationServiceStateSummary(Model): - """Service state summary of Service Fabric Upgrade Orchestration Service. - - :param current_code_version: The current code version of the cluster. - :type current_code_version: str - :param current_manifest_version: The current manifest version of the - cluster. - :type current_manifest_version: str - :param target_code_version: The target code version of the cluster. - :type target_code_version: str - :param target_manifest_version: The target manifest version of the - cluster. - :type target_manifest_version: str - :param pending_upgrade_type: The type of the pending upgrade of the - cluster. - :type pending_upgrade_type: str - """ - - _attribute_map = { - 'current_code_version': {'key': 'CurrentCodeVersion', 'type': 'str'}, - 'current_manifest_version': {'key': 'CurrentManifestVersion', 'type': 'str'}, - 'target_code_version': {'key': 'TargetCodeVersion', 'type': 'str'}, - 'target_manifest_version': {'key': 'TargetManifestVersion', 'type': 'str'}, - 'pending_upgrade_type': {'key': 'PendingUpgradeType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UpgradeOrchestrationServiceStateSummary, self).__init__(**kwargs) - self.current_code_version = kwargs.get('current_code_version', None) - self.current_manifest_version = kwargs.get('current_manifest_version', None) - self.target_code_version = kwargs.get('target_code_version', None) - self.target_manifest_version = kwargs.get('target_manifest_version', None) - self.pending_upgrade_type = kwargs.get('pending_upgrade_type', None) - - -class UploadChunkRange(Model): - """Information about which portion of the file to upload. - - :param start_position: The start position of the portion of the file. It's - represented by the number of bytes. - :type start_position: str - :param end_position: The end position of the portion of the file. It's - represented by the number of bytes. - :type end_position: str - """ - - _attribute_map = { - 'start_position': {'key': 'StartPosition', 'type': 'str'}, - 'end_position': {'key': 'EndPosition', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UploadChunkRange, self).__init__(**kwargs) - self.start_position = kwargs.get('start_position', None) - self.end_position = kwargs.get('end_position', None) - - -class UploadSession(Model): - """Information about a image store upload session. - - :param upload_sessions: When querying upload session by upload session ID, - the result contains only one upload session. When querying upload session - by image store relative path, the result might contain multiple upload - sessions. - :type upload_sessions: list[~azure.servicefabric.models.UploadSessionInfo] - """ - - _attribute_map = { - 'upload_sessions': {'key': 'UploadSessions', 'type': '[UploadSessionInfo]'}, - } - - def __init__(self, **kwargs): - super(UploadSession, self).__init__(**kwargs) - self.upload_sessions = kwargs.get('upload_sessions', None) - - -class UploadSessionInfo(Model): - """Information about an image store upload session. A session is associated - with a relative path in the image store. - - :param store_relative_path: The remote location within image store. This - path is relative to the image store root. - :type store_relative_path: str - :param session_id: A unique ID of the upload session. A session ID can be - reused only if the session was committed or removed. - :type session_id: str - :param modified_date: The date and time when the upload session was last - modified. - :type modified_date: datetime - :param file_size: The size in bytes of the uploading file. - :type file_size: str - :param expected_ranges: List of chunk ranges that image store has not - received yet. - :type expected_ranges: list[~azure.servicefabric.models.UploadChunkRange] - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'session_id': {'key': 'SessionId', 'type': 'str'}, - 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, - 'file_size': {'key': 'FileSize', 'type': 'str'}, - 'expected_ranges': {'key': 'ExpectedRanges', 'type': '[UploadChunkRange]'}, - } - - def __init__(self, **kwargs): - super(UploadSessionInfo, self).__init__(**kwargs) - self.store_relative_path = kwargs.get('store_relative_path', None) - self.session_id = kwargs.get('session_id', None) - self.modified_date = kwargs.get('modified_date', None) - self.file_size = kwargs.get('file_size', None) - self.expected_ranges = kwargs.get('expected_ranges', None) - - -class UsageInfo(Model): - """Information about how much space and how many files in the file system the - ImageStore is using in this category. - - :param used_space: the size of all files in this category - :type used_space: str - :param file_count: the number of all files in this category - :type file_count: str - """ - - _attribute_map = { - 'used_space': {'key': 'UsedSpace', 'type': 'str'}, - 'file_count': {'key': 'FileCount', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageInfo, self).__init__(**kwargs) - self.used_space = kwargs.get('used_space', None) - self.file_count = kwargs.get('file_count', None) - - -class ValidationFailedChaosEvent(ChaosEvent): - """Chaos event corresponding to a failure during validation. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Describes why the ValidationFailedChaosEvent was generated. - This may happen because more than MaxPercentUnhealthyNodes are unhealthy - for more than MaxClusterStabilizationTimeout. This reason will be in the - Reason property of the ValidationFailedChaosEvent as a string. - :type reason: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ValidationFailedChaosEvent, self).__init__(**kwargs) - self.reason = kwargs.get('reason', None) - self.kind = 'ValidationFailed' - - -class VolumeProviderParametersAzureFile(Model): - """This type describes a volume provided by an Azure Files file share. - - All required parameters must be populated in order to send to Azure. - - :param account_name: Required. Name of the Azure storage account for the - File Share. - :type account_name: str - :param account_key: Access key of the Azure storage account for the File - Share. - :type account_key: str - :param share_name: Required. Name of the Azure Files file share that - provides storage for the volume. - :type share_name: str - """ - - _validation = { - 'account_name': {'required': True}, - 'share_name': {'required': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'account_key': {'key': 'accountKey', 'type': 'str'}, - 'share_name': {'key': 'shareName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VolumeProviderParametersAzureFile, self).__init__(**kwargs) - self.account_name = kwargs.get('account_name', None) - self.account_key = kwargs.get('account_key', None) - self.share_name = kwargs.get('share_name', None) - - -class VolumeResourceDescription(Model): - """This type describes a volume resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Volume resource. - :type name: str - :param description: User readable description of the volume. - :type description: str - :ivar status: Status of the volume. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the volume. - :vartype status_details: str - :ivar provider: Required. Provider of the volume. Default value: - "SFAzureFile" . - :vartype provider: str - :param azure_file_parameters: This type describes a volume provided by an - Azure Files file share. - :type azure_file_parameters: - ~azure.servicefabric.models.VolumeProviderParametersAzureFile - """ - - _validation = { - 'name': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'provider': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'provider': {'key': 'properties.provider', 'type': 'str'}, - 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, - } - - provider = "SFAzureFile" - - def __init__(self, **kwargs): - super(VolumeResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) - self.status = None - self.status_details = None - self.azure_file_parameters = kwargs.get('azure_file_parameters', None) - - -class WaitForInbuildReplicaSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the replica build operation to finish. This - indicates that there is a replica that is going through the copy or is - providing data for building another replica. Bring the node down will abort - this copy operation which are typically expensive involving data movements. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WaitForInbuildReplicaSafetyCheck, self).__init__(**kwargs) - self.kind = 'WaitForInbuildReplica' - - -class WaitForPrimaryPlacementSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the primary replica that was moved out of the - node due to upgrade to be placed back again on that node. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WaitForPrimaryPlacementSafetyCheck, self).__init__(**kwargs) - self.kind = 'WaitForPrimaryPlacement' - - -class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the primary replica to be moved out of the node - before starting an upgrade to ensure the availability of the primary - replica for the partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WaitForPrimarySwapSafetyCheck, self).__init__(**kwargs) - self.kind = 'WaitForPrimarySwap' - - -class WaitForReconfigurationSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the current reconfiguration of the partition to - be completed before starting an upgrade. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WaitForReconfigurationSafetyCheck, self).__init__(**kwargs) - self.kind = 'WaitForReconfiguration' - - -class WaitingChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos is waiting for the - cluster to become ready for faulting, for example, Chaos may be waiting for - the on-going upgrade to finish. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Describes why the WaitingChaosEvent was generated, for - example, due to a cluster upgrade. - :type reason: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WaitingChaosEvent, self).__init__(**kwargs) - self.reason = kwargs.get('reason', None) - self.kind = 'Waiting' diff --git a/customSDK/servicefabric/models/_models_py3.py b/customSDK/servicefabric/models/_models_py3.py deleted file mode 100644 index eece702..0000000 --- a/customSDK/servicefabric/models/_models_py3.py +++ /dev/null @@ -1,23493 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class AadMetadata(Model): - """Azure Active Directory metadata used for secured connection to cluster. - - :param authority: The AAD authority url. - :type authority: str - :param client: The AAD client application Id. - :type client: str - :param cluster: The AAD cluster application Id. - :type cluster: str - :param login: The AAD login url. - :type login: str - :param redirect: The client application redirect address. - :type redirect: str - :param tenant: The AAD tenant Id. - :type tenant: str - """ - - _attribute_map = { - 'authority': {'key': 'authority', 'type': 'str'}, - 'client': {'key': 'client', 'type': 'str'}, - 'cluster': {'key': 'cluster', 'type': 'str'}, - 'login': {'key': 'login', 'type': 'str'}, - 'redirect': {'key': 'redirect', 'type': 'str'}, - 'tenant': {'key': 'tenant', 'type': 'str'}, - } - - def __init__(self, *, authority: str=None, client: str=None, cluster: str=None, login: str=None, redirect: str=None, tenant: str=None, **kwargs) -> None: - super(AadMetadata, self).__init__(**kwargs) - self.authority = authority - self.client = client - self.cluster = cluster - self.login = login - self.redirect = redirect - self.tenant = tenant - - -class AadMetadataObject(Model): - """Azure Active Directory metadata object used for secured connection to - cluster. - - :param type: The client authentication method. - :type type: str - :param metadata: Azure Active Directory metadata used for secured - connection to cluster. - :type metadata: ~azure.servicefabric.models.AadMetadata - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'metadata': {'key': 'metadata', 'type': 'AadMetadata'}, - } - - def __init__(self, *, type: str=None, metadata=None, **kwargs) -> None: - super(AadMetadataObject, self).__init__(**kwargs) - self.type = type - self.metadata = metadata - - -class ScalingMechanismDescription(Model): - """Describes the mechanism for performing a scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionInstanceCountScaleMechanism, - AddRemoveIncrementalNamedPartitionScalingMechanism - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'PartitionInstanceCount': 'PartitionInstanceCountScaleMechanism', 'AddRemoveIncrementalNamedPartition': 'AddRemoveIncrementalNamedPartitionScalingMechanism'} - } - - def __init__(self, **kwargs) -> None: - super(ScalingMechanismDescription, self).__init__(**kwargs) - self.kind = None - - -class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription): - """Represents a scaling mechanism for adding or removing named partitions of a - stateless service. Partition names are in the format '0','1''N-1'. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param min_partition_count: Required. Minimum number of named partitions - of the service. - :type min_partition_count: int - :param max_partition_count: Required. Maximum number of named partitions - of the service. - :type max_partition_count: int - :param scale_increment: Required. The number of instances to add or remove - during a scaling operation. - :type scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_partition_count': {'required': True}, - 'max_partition_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'}, - 'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'}, - 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, - } - - def __init__(self, *, min_partition_count: int, max_partition_count: int, scale_increment: int, **kwargs) -> None: - super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs) - self.min_partition_count = min_partition_count - self.max_partition_count = max_partition_count - self.scale_increment = scale_increment - self.kind = 'AddRemoveIncrementalNamedPartition' - - -class AutoScalingMechanism(Model): - """Describes the mechanism for performing auto scaling operation. Derived - classes will describe the actual mechanism. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AddRemoveReplicaScalingMechanism - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AddRemoveReplica': 'AddRemoveReplicaScalingMechanism'} - } - - def __init__(self, **kwargs) -> None: - super(AutoScalingMechanism, self).__init__(**kwargs) - self.kind = None - - -class AddRemoveReplicaScalingMechanism(AutoScalingMechanism): - """Describes the horizontal auto scaling mechanism that adds or removes - replicas (containers or container groups). - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param min_count: Required. Minimum number of containers (scale down won't - be performed below this number). - :type min_count: int - :param max_count: Required. Maximum number of containers (scale up won't - be performed above this number). - :type max_count: int - :param scale_increment: Required. Each time auto scaling is performed, - this number of containers will be added or removed. - :type scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_count': {'required': True}, - 'max_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'scale_increment': {'key': 'scaleIncrement', 'type': 'int'}, - } - - def __init__(self, *, min_count: int, max_count: int, scale_increment: int, **kwargs) -> None: - super(AddRemoveReplicaScalingMechanism, self).__init__(**kwargs) - self.min_count = min_count - self.max_count = max_count - self.scale_increment = scale_increment - self.kind = 'AddRemoveReplica' - - -class AnalysisEventMetadata(Model): - """Metadata about an Analysis Event. - - :param delay: The analysis delay. - :type delay: timedelta - :param duration: The duration of analysis. - :type duration: timedelta - """ - - _attribute_map = { - 'delay': {'key': 'Delay', 'type': 'duration'}, - 'duration': {'key': 'Duration', 'type': 'duration'}, - } - - def __init__(self, *, delay=None, duration=None, **kwargs) -> None: - super(AnalysisEventMetadata, self).__init__(**kwargs) - self.delay = delay - self.duration = duration - - -class BackupConfigurationInfo(Model): - """Describes the backup configuration information. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationBackupConfigurationInfo, - ServiceBackupConfigurationInfo, PartitionBackupConfigurationInfo - - All required parameters must be populated in order to send to Azure. - - :param policy_name: The name of the backup policy which is applicable to - this Service Fabric application or service or partition. - :type policy_name: str - :param policy_inherited_from: Specifies the scope at which the backup - policy is applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type policy_inherited_from: str or - ~azure.servicefabric.models.BackupPolicyScope - :param suspension_info: Describes the backup suspension details. - :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Application': 'ApplicationBackupConfigurationInfo', 'Service': 'ServiceBackupConfigurationInfo', 'Partition': 'PartitionBackupConfigurationInfo'} - } - - def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, **kwargs) -> None: - super(BackupConfigurationInfo, self).__init__(**kwargs) - self.policy_name = policy_name - self.policy_inherited_from = policy_inherited_from - self.suspension_info = suspension_info - self.kind = None - - -class ApplicationBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information for a specific Service Fabric application - specifying what backup policy is being applied and suspend description, if - any. - - All required parameters must be populated in order to send to Azure. - - :param policy_name: The name of the backup policy which is applicable to - this Service Fabric application or service or partition. - :type policy_name: str - :param policy_inherited_from: Specifies the scope at which the backup - policy is applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type policy_inherited_from: str or - ~azure.servicefabric.models.BackupPolicyScope - :param suspension_info: Describes the backup suspension details. - :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :param kind: Required. Constant filled by server. - :type kind: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, application_name: str=None, **kwargs) -> None: - super(ApplicationBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) - self.application_name = application_name - self.kind = 'Application' - - -class BackupEntity(Model): - """Describes the Service Fabric entity that is configured for backup. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationBackupEntity, ServiceBackupEntity, - PartitionBackupEntity - - All required parameters must be populated in order to send to Azure. - - :param entity_kind: Required. Constant filled by server. - :type entity_kind: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - } - - _subtype_map = { - 'entity_kind': {'Application': 'ApplicationBackupEntity', 'Service': 'ServiceBackupEntity', 'Partition': 'PartitionBackupEntity'} - } - - def __init__(self, **kwargs) -> None: - super(BackupEntity, self).__init__(**kwargs) - self.entity_kind = None - - -class ApplicationBackupEntity(BackupEntity): - """Identifies the Service Fabric application which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :param entity_kind: Required. Constant filled by server. - :type entity_kind: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__(self, *, application_name: str=None, **kwargs) -> None: - super(ApplicationBackupEntity, self).__init__(**kwargs) - self.application_name = application_name - self.entity_kind = 'Application' - - -class ApplicationCapacityDescription(Model): - """Describes capacity information for services of this application. This - description can be used for describing the following. - - Reserving the capacity for the services on the nodes - - Limiting the total number of nodes that services of this application can - run on - - Limiting the custom capacity metrics to limit the total consumption of - this metric by the services of this application. - - :param minimum_nodes: The minimum number of nodes where Service Fabric - will reserve capacity for this application. Note that this does not mean - that the services of this application will be placed on all of those - nodes. If this property is set to zero, no capacity will be reserved. The - value of this property cannot be more than the value of the MaximumNodes - property. - :type minimum_nodes: long - :param maximum_nodes: The maximum number of nodes where Service Fabric - will reserve capacity for this application. Note that this does not mean - that the services of this application will be placed on all of those - nodes. By default, the value of this property is zero and it means that - the services can be placed on any node. Default value: 0 . - :type maximum_nodes: long - :param application_metrics: List of application capacity metric - description. - :type application_metrics: - list[~azure.servicefabric.models.ApplicationMetricDescription] - """ - - _validation = { - 'minimum_nodes': {'minimum': 0}, - 'maximum_nodes': {'minimum': 0}, - } - - _attribute_map = { - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, - } - - def __init__(self, *, minimum_nodes: int=None, maximum_nodes: int=0, application_metrics=None, **kwargs) -> None: - super(ApplicationCapacityDescription, self).__init__(**kwargs) - self.minimum_nodes = minimum_nodes - self.maximum_nodes = maximum_nodes - self.application_metrics = application_metrics - - -class FabricEvent(Model): - """Represents the base for all Fabric Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationEvent, ClusterEvent, ContainerInstanceEvent, - NodeEvent, PartitionEvent, ReplicaEvent, ServiceEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ApplicationEvent': 'ApplicationEvent', 'ClusterEvent': 'ClusterEvent', 'ContainerInstanceEvent': 'ContainerInstanceEvent', 'NodeEvent': 'NodeEvent', 'PartitionEvent': 'PartitionEvent', 'ReplicaEvent': 'ReplicaEvent', 'ServiceEvent': 'ServiceEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(FabricEvent, self).__init__(**kwargs) - self.event_instance_id = event_instance_id - self.category = category - self.time_stamp = time_stamp - self.has_correlated_events = has_correlated_events - self.kind = None - - -class ApplicationEvent(FabricEvent): - """Represents the base for all Application Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationCreatedEvent, ApplicationDeletedEvent, - ApplicationNewHealthReportEvent, ApplicationHealthReportExpiredEvent, - ApplicationUpgradeCompletedEvent, ApplicationUpgradeDomainCompletedEvent, - ApplicationUpgradeRollbackCompletedEvent, - ApplicationUpgradeRollbackStartedEvent, ApplicationUpgradeStartedEvent, - DeployedApplicationNewHealthReportEvent, - DeployedApplicationHealthReportExpiredEvent, ApplicationProcessExitedEvent, - ApplicationContainerInstanceExitedEvent, - DeployedServicePackageNewHealthReportEvent, - DeployedServicePackageHealthReportExpiredEvent, - ChaosCodePackageRestartScheduledEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ApplicationCreated': 'ApplicationCreatedEvent', 'ApplicationDeleted': 'ApplicationDeletedEvent', 'ApplicationNewHealthReport': 'ApplicationNewHealthReportEvent', 'ApplicationHealthReportExpired': 'ApplicationHealthReportExpiredEvent', 'ApplicationUpgradeCompleted': 'ApplicationUpgradeCompletedEvent', 'ApplicationUpgradeDomainCompleted': 'ApplicationUpgradeDomainCompletedEvent', 'ApplicationUpgradeRollbackCompleted': 'ApplicationUpgradeRollbackCompletedEvent', 'ApplicationUpgradeRollbackStarted': 'ApplicationUpgradeRollbackStartedEvent', 'ApplicationUpgradeStarted': 'ApplicationUpgradeStartedEvent', 'DeployedApplicationNewHealthReport': 'DeployedApplicationNewHealthReportEvent', 'DeployedApplicationHealthReportExpired': 'DeployedApplicationHealthReportExpiredEvent', 'ApplicationProcessExited': 'ApplicationProcessExitedEvent', 'ApplicationContainerInstanceExited': 'ApplicationContainerInstanceExitedEvent', 'DeployedServicePackageNewHealthReport': 'DeployedServicePackageNewHealthReportEvent', 'DeployedServicePackageHealthReportExpired': 'DeployedServicePackageHealthReportExpiredEvent', 'ChaosCodePackageRestartScheduled': 'ChaosCodePackageRestartScheduledEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.application_id = application_id - self.kind = 'ApplicationEvent' - - -class ApplicationContainerInstanceExitedEvent(ApplicationEvent): - """Container Exited event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param service_name: Required. Name of Service. - :type service_name: str - :param service_package_name: Required. Name of Service package. - :type service_package_name: str - :param service_package_activation_id: Required. Activation Id of Service - package. - :type service_package_activation_id: str - :param is_exclusive: Required. Indicates IsExclusive flag. - :type is_exclusive: bool - :param code_package_name: Required. Name of Code package. - :type code_package_name: str - :param entry_point_type: Required. Type of EntryPoint. - :type entry_point_type: str - :param image_name: Required. Name of Container image. - :type image_name: str - :param container_name: Required. Name of Container. - :type container_name: str - :param host_id: Required. Host Id. - :type host_id: str - :param exit_code: Required. Exit code of process. - :type exit_code: long - :param unexpected_termination: Required. Indicates if termination is - unexpected. - :type unexpected_termination: bool - :param start_time: Required. Start time of process. - :type start_time: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_name': {'required': True}, - 'service_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'is_exclusive': {'required': True}, - 'code_package_name': {'required': True}, - 'entry_point_type': {'required': True}, - 'image_name': {'required': True}, - 'container_name': {'required': True}, - 'host_id': {'required': True}, - 'exit_code': {'required': True}, - 'unexpected_termination': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, - 'image_name': {'key': 'ImageName', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - 'host_id': {'key': 'HostId', 'type': 'str'}, - 'exit_code': {'key': 'ExitCode', 'type': 'long'}, - 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_name: str, service_package_name: str, service_package_activation_id: str, is_exclusive: bool, code_package_name: str, entry_point_type: str, image_name: str, container_name: str, host_id: str, exit_code: int, unexpected_termination: bool, start_time, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationContainerInstanceExitedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.service_name = service_name - self.service_package_name = service_package_name - self.service_package_activation_id = service_package_activation_id - self.is_exclusive = is_exclusive - self.code_package_name = code_package_name - self.entry_point_type = entry_point_type - self.image_name = image_name - self.container_name = container_name - self.host_id = host_id - self.exit_code = exit_code - self.unexpected_termination = unexpected_termination - self.start_time = start_time - self.kind = 'ApplicationContainerInstanceExited' - - -class ApplicationCreatedEvent(ApplicationEvent): - """Application Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param application_type_version: Required. Application type version. - :type application_type_version: str - :param application_definition_kind: Required. Application definition kind. - :type application_definition_kind: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'application_definition_kind': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, application_definition_kind: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationCreatedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_type_name = application_type_name - self.application_type_version = application_type_version - self.application_definition_kind = application_definition_kind - self.kind = 'ApplicationCreated' - - -class ApplicationDeletedEvent(ApplicationEvent): - """Application Deleted event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param application_type_version: Required. Application type version. - :type application_type_version: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationDeletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_type_name = application_type_name - self.application_type_version = application_type_version - self.kind = 'ApplicationDeleted' - - -class ApplicationDescription(Model): - """Describes a Service Fabric application. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the application, including the - 'fabric:' URI scheme. - :type name: str - :param type_name: Required. The application type name as defined in the - application manifest. - :type type_name: str - :param type_version: Required. The version of the application type as - defined in the application manifest. - :type type_version: str - :param parameter_list: List of application parameters with overridden - values from their default values specified in the application manifest. - :type parameter_list: - list[~azure.servicefabric.models.ApplicationParameter] - :param application_capacity: Describes capacity information for services - of this application. This description can be used for describing the - following. - - Reserving the capacity for the services on the nodes - - Limiting the total number of nodes that services of this application can - run on - - Limiting the custom capacity metrics to limit the total consumption of - this metric by the services of this application - :type application_capacity: - ~azure.servicefabric.models.ApplicationCapacityDescription - :param managed_application_identity: Managed application identity - description. - :type managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - - _validation = { - 'name': {'required': True}, - 'type_name': {'required': True}, - 'type_version': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'parameter_list': {'key': 'ParameterList', 'type': '[ApplicationParameter]'}, - 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'ApplicationCapacityDescription'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__(self, *, name: str, type_name: str, type_version: str, parameter_list=None, application_capacity=None, managed_application_identity=None, **kwargs) -> None: - super(ApplicationDescription, self).__init__(**kwargs) - self.name = name - self.type_name = type_name - self.type_version = type_version - self.parameter_list = parameter_list - self.application_capacity = application_capacity - self.managed_application_identity = managed_application_identity - - -class EntityHealth(Model): - """Health information common to all entities in the cluster. It contains the - aggregated health state, health events and unhealthy evaluation. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, **kwargs) -> None: - super(EntityHealth, self).__init__(**kwargs) - self.aggregated_health_state = aggregated_health_state - self.health_events = health_events - self.unhealthy_evaluations = unhealthy_evaluations - self.health_statistics = health_statistics - - -class ApplicationHealth(EntityHealth): - """Represents the health of the application. Contains the application - aggregated health state and the service and deployed application health - states. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - :param service_health_states: Service health states as found in the health - store. - :type service_health_states: - list[~azure.servicefabric.models.ServiceHealthState] - :param deployed_application_health_states: Deployed application health - states as found in the health store. - :type deployed_application_health_states: - list[~azure.servicefabric.models.DeployedApplicationHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'service_health_states': {'key': 'ServiceHealthStates', 'type': '[ServiceHealthState]'}, - 'deployed_application_health_states': {'key': 'DeployedApplicationHealthStates', 'type': '[DeployedApplicationHealthState]'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, service_health_states=None, deployed_application_health_states=None, **kwargs) -> None: - super(ApplicationHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.name = name - self.service_health_states = service_health_states - self.deployed_application_health_states = deployed_application_health_states - - -class HealthEvaluation(Model): - """Represents a health evaluation which describes the data and the algorithm - used by health manager to evaluate the health of an entity. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationHealthEvaluation, ApplicationsHealthEvaluation, - ApplicationTypeApplicationsHealthEvaluation, - DeltaNodesCheckHealthEvaluation, DeployedApplicationHealthEvaluation, - DeployedApplicationsHealthEvaluation, - DeployedServicePackageHealthEvaluation, - DeployedServicePackagesHealthEvaluation, EventHealthEvaluation, - NodeHealthEvaluation, NodesHealthEvaluation, PartitionHealthEvaluation, - PartitionsHealthEvaluation, ReplicaHealthEvaluation, - ReplicasHealthEvaluation, ServiceHealthEvaluation, - ServicesHealthEvaluation, SystemApplicationHealthEvaluation, - UpgradeDomainDeltaNodesCheckHealthEvaluation, - UpgradeDomainNodesHealthEvaluation, NodeTypeNodesHealthEvaluation - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Application': 'ApplicationHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation', 'NodeTypeNodes': 'NodeTypeNodesHealthEvaluation'} - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, **kwargs) -> None: - super(HealthEvaluation, self).__init__(**kwargs) - self.aggregated_health_state = aggregated_health_state - self.description = description - self.kind = None - - -class ApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for an application, containing information - about the data and the algorithm used by the health store to evaluate - health. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the application. The types of the - unhealthy evaluations can be DeployedApplicationsHealthEvaluation, - ServicesHealthEvaluation or EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, application_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.application_name = application_name - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Application' - - -class ApplicationHealthPolicies(Model): - """Defines the application health policy map used to evaluate the health of an - application or one of its children entities. - - :param application_health_policy_map: The wrapper that contains the map - with application health policies used to evaluate specific applications in - the cluster. - :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - } - - def __init__(self, *, application_health_policy_map=None, **kwargs) -> None: - super(ApplicationHealthPolicies, self).__init__(**kwargs) - self.application_health_policy_map = application_health_policy_map - - -class ApplicationHealthPolicy(Model): - """Defines a health policy used to evaluate the health of an application or - one of its children entities. - - :param consider_warning_as_error: Indicates whether warnings are treated - with the same severity as errors. Default value: False . - :type consider_warning_as_error: bool - :param max_percent_unhealthy_deployed_applications: The maximum allowed - percentage of unhealthy deployed applications. Allowed values are Byte - values from zero to 100. - The percentage represents the maximum tolerated percentage of deployed - applications that can be unhealthy before the application is considered in - error. - This is calculated by dividing the number of unhealthy deployed - applications over the number of nodes where the application is currently - deployed on in the cluster. - The computation rounds up to tolerate one failure on small numbers of - nodes. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_deployed_applications: int - :param default_service_type_health_policy: The health policy used by - default to evaluate the health of a service type. - :type default_service_type_health_policy: - ~azure.servicefabric.models.ServiceTypeHealthPolicy - :param service_type_health_policy_map: The map with service type health - policy per service type name. The map is empty by default. - :type service_type_health_policy_map: - list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem] - """ - - _attribute_map = { - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'default_service_type_health_policy': {'key': 'DefaultServiceTypeHealthPolicy', 'type': 'ServiceTypeHealthPolicy'}, - 'service_type_health_policy_map': {'key': 'ServiceTypeHealthPolicyMap', 'type': '[ServiceTypeHealthPolicyMapItem]'}, - } - - def __init__(self, *, consider_warning_as_error: bool=False, max_percent_unhealthy_deployed_applications: int=0, default_service_type_health_policy=None, service_type_health_policy_map=None, **kwargs) -> None: - super(ApplicationHealthPolicy, self).__init__(**kwargs) - self.consider_warning_as_error = consider_warning_as_error - self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications - self.default_service_type_health_policy = default_service_type_health_policy - self.service_type_health_policy_map = service_type_health_policy_map - - -class ApplicationHealthPolicyMapItem(Model): - """Defines an item in ApplicationHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key of the application health policy map item. - This is the name of the application. - :type key: str - :param value: Required. The value of the application health policy map - item. This is the ApplicationHealthPolicy for this application. - :type value: ~azure.servicefabric.models.ApplicationHealthPolicy - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ApplicationHealthPolicy'}, - } - - def __init__(self, *, key: str, value, **kwargs) -> None: - super(ApplicationHealthPolicyMapItem, self).__init__(**kwargs) - self.key = key - self.value = value - - -class ApplicationHealthPolicyMapObject(Model): - """Represents the map of application health policies for a ServiceFabric - cluster upgrade. - - :param application_health_policy_map: Defines a map that contains specific - application health policies for different applications. - Each entry specifies as key the application name and as value an - ApplicationHealthPolicy used to evaluate the application health. - If an application is not specified in the map, the application health - evaluation uses the ApplicationHealthPolicy found in its application - manifest or the default application health policy (if no health policy is - defined in the manifest). - The map is empty by default. - :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - } - - def __init__(self, *, application_health_policy_map=None, **kwargs) -> None: - super(ApplicationHealthPolicyMapObject, self).__init__(**kwargs) - self.application_health_policy_map = application_health_policy_map - - -class ApplicationHealthReportExpiredEvent(ApplicationEvent): - """Application Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_instance_id: Required. Id of Application instance. - :type application_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_instance_id = application_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ApplicationHealthReportExpired' - - -class EntityHealthState(Model): - """A base type for the health state of various entities in the cluster. It - contains the aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, **kwargs) -> None: - super(EntityHealthState, self).__init__(**kwargs) - self.aggregated_health_state = aggregated_health_state - - -class ApplicationHealthState(EntityHealthState): - """Represents the health state of an application, which contains the - application identifier and the aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, name: str=None, **kwargs) -> None: - super(ApplicationHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.name = name - - -class EntityHealthStateChunk(Model): - """A base type for the health state chunk of various entities in the cluster. - It contains the aggregated health state. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - } - - def __init__(self, *, health_state=None, **kwargs) -> None: - super(EntityHealthStateChunk, self).__init__(**kwargs) - self.health_state = health_state - - -class ApplicationHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a application. - The application health state chunk contains the application name, its - aggregated health state and any children services and deployed applications - that respect the filters in cluster health chunk query description. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param application_type_name: The application type name as defined in the - application manifest. - :type application_type_name: str - :param service_health_state_chunks: The list of service health state - chunks in the cluster that respect the filters in the cluster health chunk - query description. - :type service_health_state_chunks: - ~azure.servicefabric.models.ServiceHealthStateChunkList - :param deployed_application_health_state_chunks: The list of deployed - application health state chunks in the cluster that respect the filters in - the cluster health chunk query description. - :type deployed_application_health_state_chunks: - ~azure.servicefabric.models.DeployedApplicationHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_health_state_chunks': {'key': 'ServiceHealthStateChunks', 'type': 'ServiceHealthStateChunkList'}, - 'deployed_application_health_state_chunks': {'key': 'DeployedApplicationHealthStateChunks', 'type': 'DeployedApplicationHealthStateChunkList'}, - } - - def __init__(self, *, health_state=None, application_name: str=None, application_type_name: str=None, service_health_state_chunks=None, deployed_application_health_state_chunks=None, **kwargs) -> None: - super(ApplicationHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.application_name = application_name - self.application_type_name = application_type_name - self.service_health_state_chunks = service_health_state_chunks - self.deployed_application_health_state_chunks = deployed_application_health_state_chunks - - -class EntityHealthStateChunkList(Model): - """A base type for the list of health state chunks found in the cluster. It - contains the total number of health states that match the input filters. - - :param total_count: Total number of entity health state objects that match - the specified filters from the cluster health chunk query description. - :type total_count: long - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - } - - def __init__(self, *, total_count: int=None, **kwargs) -> None: - super(EntityHealthStateChunkList, self).__init__(**kwargs) - self.total_count = total_count - - -class ApplicationHealthStateChunkList(EntityHealthStateChunkList): - """The list of application health state chunks in the cluster that respect the - input filters in the chunk query. Returned by get cluster health state - chunks query. - - :param total_count: Total number of entity health state objects that match - the specified filters from the cluster health chunk query description. - :type total_count: long - :param items: The list of application health state chunks that respect the - input filters in the chunk query. - :type items: list[~azure.servicefabric.models.ApplicationHealthStateChunk] - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'items': {'key': 'Items', 'type': '[ApplicationHealthStateChunk]'}, - } - - def __init__(self, *, total_count: int=None, items=None, **kwargs) -> None: - super(ApplicationHealthStateChunkList, self).__init__(total_count=total_count, **kwargs) - self.items = items - - -class ApplicationHealthStateFilter(Model): - """Defines matching criteria to determine whether a application should be - included in the cluster health chunk. - One filter can match zero, one or multiple applications, depending on its - properties. - - :param application_name_filter: The name of the application that matches - the filter, as a fabric uri. The filter is applied only to the specified - application, if it exists. - If the application doesn't exist, no application is returned in the - cluster health chunk based on this filter. - If the application exists, it is included in the cluster health chunk if - it respects the other filter properties. - If not specified, all applications are matched against the other filter - members, like health state filter. - :type application_name_filter: str - :param application_type_name_filter: The name of the application type that - matches the filter. - If specified, the filter is applied only to applications of the selected - application type, if any exists. - If no applications of the specified application type exists, no - application is returned in the cluster health chunk based on this filter. - Each application of the specified application type is included in the - cluster health chunk if it respects the other filter properties. - If not specified, all applications are matched against the other filter - members, like health state filter. - :type application_type_name_filter: str - :param health_state_filter: The filter for the health state of the - applications. It allows selecting applications if they match the desired - health states. - The possible values are integer value of one of the following health - states. Only applications that match the filter are returned. All - applications are used to evaluate the cluster aggregated health state. - If not specified, default value is None, unless the application name or - the application type name are specified. If the filter has default value - and application name is specified, the matching application is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches applications with - HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - :param service_filters: Defines a list of filters that specify which - services to be included in the returned cluster health chunk as children - of the application. The services are returned only if the parent - application matches a filter. - If the list is empty, no services are returned. All the services are used - to evaluate the parent application aggregated health state, regardless of - the input filters. - The application filter may specify multiple service filters. - For example, it can specify a filter to return all services with health - state Error and another filter to always include a service identified by - its service name. - :type service_filters: - list[~azure.servicefabric.models.ServiceHealthStateFilter] - :param deployed_application_filters: Defines a list of filters that - specify which deployed applications to be included in the returned cluster - health chunk as children of the application. The deployed applications are - returned only if the parent application matches a filter. - If the list is empty, no deployed applications are returned. All the - deployed applications are used to evaluate the parent application - aggregated health state, regardless of the input filters. - The application filter may specify multiple deployed application filters. - For example, it can specify a filter to return all deployed applications - with health state Error and another filter to always include a deployed - application on a specified node. - :type deployed_application_filters: - list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter] - """ - - _attribute_map = { - 'application_name_filter': {'key': 'ApplicationNameFilter', 'type': 'str'}, - 'application_type_name_filter': {'key': 'ApplicationTypeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'service_filters': {'key': 'ServiceFilters', 'type': '[ServiceHealthStateFilter]'}, - 'deployed_application_filters': {'key': 'DeployedApplicationFilters', 'type': '[DeployedApplicationHealthStateFilter]'}, - } - - def __init__(self, *, application_name_filter: str=None, application_type_name_filter: str=None, health_state_filter: int=0, service_filters=None, deployed_application_filters=None, **kwargs) -> None: - super(ApplicationHealthStateFilter, self).__init__(**kwargs) - self.application_name_filter = application_name_filter - self.application_type_name_filter = application_type_name_filter - self.health_state_filter = health_state_filter - self.service_filters = service_filters - self.deployed_application_filters = deployed_application_filters - - -class ApplicationInfo(Model): - """Information about a Service Fabric application. - - :param id: The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to - identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type id: str - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - :param type_name: The application type name as defined in the application - manifest. - :type type_name: str - :param type_version: The version of the application type as defined in the - application manifest. - :type type_version: str - :param status: The status of the application. Possible values include: - 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :type status: str or ~azure.servicefabric.models.ApplicationStatus - :param parameters: List of application parameters with overridden values - from their default values specified in the application manifest. - :type parameters: list[~azure.servicefabric.models.ApplicationParameter] - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param application_definition_kind: The mechanism used to define a Service - Fabric application. Possible values include: 'Invalid', - 'ServiceFabricApplicationDescription', 'Compose' - :type application_definition_kind: str or - ~azure.servicefabric.models.ApplicationDefinitionKind - :param managed_application_identity: Managed application identity - description. - :type managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__(self, *, id: str=None, name: str=None, type_name: str=None, type_version: str=None, status=None, parameters=None, health_state=None, application_definition_kind=None, managed_application_identity=None, **kwargs) -> None: - super(ApplicationInfo, self).__init__(**kwargs) - self.id = id - self.name = name - self.type_name = type_name - self.type_version = type_version - self.status = status - self.parameters = parameters - self.health_state = health_state - self.application_definition_kind = application_definition_kind - self.managed_application_identity = managed_application_identity - - -class ApplicationLoadInfo(Model): - """Load Information about a Service Fabric application. - - :param id: The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to - identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type id: str - :param minimum_nodes: The minimum number of nodes for this application. - It is the number of nodes where Service Fabric will reserve Capacity in - the cluster which equals to ReservedLoad * MinimumNodes for this - Application instance. - For applications that do not have application capacity defined this value - will be zero. - :type minimum_nodes: long - :param maximum_nodes: The maximum number of nodes where this application - can be instantiated. - It is the number of nodes this application is allowed to span. - For applications that do not have application capacity defined this value - will be zero. - :type maximum_nodes: long - :param node_count: The number of nodes on which this application is - instantiated. - For applications that do not have application capacity defined this value - will be zero. - :type node_count: long - :param application_load_metric_information: List of application load - metric information. - :type application_load_metric_information: - list[~azure.servicefabric.models.ApplicationLoadMetricInformation] - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'node_count': {'key': 'NodeCount', 'type': 'long'}, - 'application_load_metric_information': {'key': 'ApplicationLoadMetricInformation', 'type': '[ApplicationLoadMetricInformation]'}, - } - - def __init__(self, *, id: str=None, minimum_nodes: int=None, maximum_nodes: int=None, node_count: int=None, application_load_metric_information=None, **kwargs) -> None: - super(ApplicationLoadInfo, self).__init__(**kwargs) - self.id = id - self.minimum_nodes = minimum_nodes - self.maximum_nodes = maximum_nodes - self.node_count = node_count - self.application_load_metric_information = application_load_metric_information - - -class ApplicationLoadMetricInformation(Model): - """Describes load information for a custom resource balancing metric. This can - be used to limit the total consumption of this metric by the services of - this application. - - :param name: The name of the metric. - :type name: str - :param reservation_capacity: This is the capacity reserved in the cluster - for the application. - It's the product of NodeReservationCapacity and MinimumNodes. - If set to zero, no capacity is reserved for this metric. - When setting application capacity or when updating application capacity - this value must be smaller than or equal to MaximumCapacity for each - metric. - :type reservation_capacity: long - :param application_capacity: Total capacity for this metric in this - application instance. - :type application_capacity: long - :param application_load: Current load for this metric in this application - instance. - :type application_load: long - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, - 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'long'}, - 'application_load': {'key': 'ApplicationLoad', 'type': 'long'}, - } - - def __init__(self, *, name: str=None, reservation_capacity: int=None, application_capacity: int=None, application_load: int=None, **kwargs) -> None: - super(ApplicationLoadMetricInformation, self).__init__(**kwargs) - self.name = name - self.reservation_capacity = reservation_capacity - self.application_capacity = application_capacity - self.application_load = application_load - - -class ApplicationMetricDescription(Model): - """Describes capacity information for a custom resource balancing metric. This - can be used to limit the total consumption of this metric by the services - of this application. - - :param name: The name of the metric. - :type name: str - :param maximum_capacity: The maximum node capacity for Service Fabric - application. - This is the maximum Load for an instance of this application on a single - node. Even if the capacity of node is greater than this value, Service - Fabric will limit the total load of services within the application on - each node to this value. - If set to zero, capacity for this metric is unlimited on each node. - When creating a new application with application capacity defined, the - product of MaximumNodes and this value must always be smaller than or - equal to TotalApplicationCapacity. - When updating existing application with application capacity, the product - of MaximumNodes and this value must always be smaller than or equal to - TotalApplicationCapacity. - :type maximum_capacity: long - :param reservation_capacity: The node reservation capacity for Service - Fabric application. - This is the amount of load which is reserved on nodes which have instances - of this application. - If MinimumNodes is specified, then the product of these values will be the - capacity reserved in the cluster for the application. - If set to zero, no capacity is reserved for this metric. - When setting application capacity or when updating application capacity; - this value must be smaller than or equal to MaximumCapacity for each - metric. - :type reservation_capacity: long - :param total_application_capacity: The total metric capacity for Service - Fabric application. - This is the total metric capacity for this application in the cluster. - Service Fabric will try to limit the sum of loads of services within the - application to this value. - When creating a new application with application capacity defined, the - product of MaximumNodes and MaximumCapacity must always be smaller than or - equal to this value. - :type total_application_capacity: long - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'maximum_capacity': {'key': 'MaximumCapacity', 'type': 'long'}, - 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, - 'total_application_capacity': {'key': 'TotalApplicationCapacity', 'type': 'long'}, - } - - def __init__(self, *, name: str=None, maximum_capacity: int=None, reservation_capacity: int=None, total_application_capacity: int=None, **kwargs) -> None: - super(ApplicationMetricDescription, self).__init__(**kwargs) - self.name = name - self.maximum_capacity = maximum_capacity - self.reservation_capacity = reservation_capacity - self.total_application_capacity = total_application_capacity - - -class ApplicationNameInfo(Model): - """Information about the application name. - - :param id: The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to - identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type id: str - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: - super(ApplicationNameInfo, self).__init__(**kwargs) - self.id = id - self.name = name - - -class ApplicationNewHealthReportEvent(ApplicationEvent): - """Application Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_instance_id: Required. Id of Application instance. - :type application_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_instance_id = application_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ApplicationNewHealthReport' - - -class ApplicationParameter(Model): - """Describes an application parameter override to be applied when creating or - upgrading an application. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The name of the parameter. - :type key: str - :param value: Required. The value of the parameter. - :type value: str - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - } - - def __init__(self, *, key: str, value: str, **kwargs) -> None: - super(ApplicationParameter, self).__init__(**kwargs) - self.key = key - self.value = value - - -class ApplicationProcessExitedEvent(ApplicationEvent): - """Process Exited event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param service_name: Required. Name of Service. - :type service_name: str - :param service_package_name: Required. Name of Service package. - :type service_package_name: str - :param service_package_activation_id: Required. Activation Id of Service - package. - :type service_package_activation_id: str - :param is_exclusive: Required. Indicates IsExclusive flag. - :type is_exclusive: bool - :param code_package_name: Required. Name of Code package. - :type code_package_name: str - :param entry_point_type: Required. Type of EntryPoint. - :type entry_point_type: str - :param exe_name: Required. Name of executable. - :type exe_name: str - :param process_id: Required. Process Id. - :type process_id: long - :param host_id: Required. Host Id. - :type host_id: str - :param exit_code: Required. Exit code of process. - :type exit_code: long - :param unexpected_termination: Required. Indicates if termination is - unexpected. - :type unexpected_termination: bool - :param start_time: Required. Start time of process. - :type start_time: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_name': {'required': True}, - 'service_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'is_exclusive': {'required': True}, - 'code_package_name': {'required': True}, - 'entry_point_type': {'required': True}, - 'exe_name': {'required': True}, - 'process_id': {'required': True}, - 'host_id': {'required': True}, - 'exit_code': {'required': True}, - 'unexpected_termination': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, - 'exe_name': {'key': 'ExeName', 'type': 'str'}, - 'process_id': {'key': 'ProcessId', 'type': 'long'}, - 'host_id': {'key': 'HostId', 'type': 'str'}, - 'exit_code': {'key': 'ExitCode', 'type': 'long'}, - 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_name: str, service_package_name: str, service_package_activation_id: str, is_exclusive: bool, code_package_name: str, entry_point_type: str, exe_name: str, process_id: int, host_id: str, exit_code: int, unexpected_termination: bool, start_time, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationProcessExitedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.service_name = service_name - self.service_package_name = service_package_name - self.service_package_activation_id = service_package_activation_id - self.is_exclusive = is_exclusive - self.code_package_name = code_package_name - self.entry_point_type = entry_point_type - self.exe_name = exe_name - self.process_id = process_id - self.host_id = host_id - self.exit_code = exit_code - self.unexpected_termination = unexpected_termination - self.start_time = start_time - self.kind = 'ApplicationProcessExited' - - -class ApplicationResourceDescription(Model): - """This type describes a application resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Application resource. - :type name: str - :param description: User readable description of the application. - :type description: str - :param services: Describes the services in the application. This property - is used to create or modify services of the application. On get only the - name of the service is returned. The service description can be obtained - by querying for the service resource. - :type services: - list[~azure.servicefabric.models.ServiceResourceDescription] - :param diagnostics: Describes the diagnostics definition and usage for an - application resource. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsDescription - :param debug_params: Internal - used by Visual Studio to setup the - debugging session on the local development environment. - :type debug_params: str - :ivar service_names: Names of the services in the application. - :vartype service_names: list[str] - :ivar status: Status of the application. Possible values include: - 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the application. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the application's health state is not - 'Ok', this additional details from service fabric Health Manager for the - user to know why the application is marked unhealthy. - :vartype unhealthy_evaluation: str - :param identity: Describes the identity of the application. - :type identity: ~azure.servicefabric.models.IdentityDescription - """ - - _validation = { - 'name': {'required': True}, - 'service_names': {'readonly': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, - 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, - 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'IdentityDescription'}, - } - - def __init__(self, *, name: str, description: str=None, services=None, diagnostics=None, debug_params: str=None, identity=None, **kwargs) -> None: - super(ApplicationResourceDescription, self).__init__(**kwargs) - self.name = name - self.description = description - self.services = services - self.diagnostics = diagnostics - self.debug_params = debug_params - self.service_names = None - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity = identity - - -class ApplicationResourceUpgradeProgressInfo(Model): - """This type describes an application resource upgrade. - - :param name: Name of the Application resource. - :type name: str - :param target_application_type_version: The target application version for - the application upgrade. - :type target_application_type_version: str - :param start_timestamp_utc: The estimated UTC datetime when the upgrade - started. - :type start_timestamp_utc: str - :param upgrade_state: The state of the application resource upgrade. - Possible values include: 'Invalid', 'ProvisioningTarget', - 'RollingForward', 'UnprovisioningCurrent', 'CompletedRollforward', - 'RollingBack', 'UnprovisioningTarget', 'CompletedRollback', 'Failed' - :type upgrade_state: str or - ~azure.servicefabric.models.ApplicationResourceUpgradeState - :param percent_completed: The estimated percent of replicas are completed - in the upgrade. - :type percent_completed: str - :param service_upgrade_progress: List of service upgrade progresses. - :type service_upgrade_progress: - list[~azure.servicefabric.models.ServiceUpgradeProgress] - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "Monitored" . - :type rolling_upgrade_mode: str or - ~azure.servicefabric.models.RollingUpgradeMode - :param upgrade_duration: The estimated amount of time that the overall - upgrade elapsed. It is first interpreted as a string representing an ISO - 8601 duration. If that fails, then it is interpreted as a number - representing the total number of milliseconds. Default value: "PT0H2M0S" . - :type upgrade_duration: str - :param application_upgrade_status_details: Additional detailed information - about the status of the pending upgrade. - :type application_upgrade_status_details: str - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). Default value: 42949672925 . - :type upgrade_replica_set_check_timeout_in_seconds: long - :param failure_timestamp_utc: The estimated UTC datetime when the upgrade - failed and FailureAction was executed. - :type failure_timestamp_utc: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'percent_completed': {'key': 'PercentCompleted', 'type': 'str'}, - 'service_upgrade_progress': {'key': 'ServiceUpgradeProgress', 'type': '[ServiceUpgradeProgress]'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, target_application_type_version: str=None, start_timestamp_utc: str=None, upgrade_state=None, percent_completed: str=None, service_upgrade_progress=None, rolling_upgrade_mode="Monitored", upgrade_duration: str="PT0H2M0S", application_upgrade_status_details: str=None, upgrade_replica_set_check_timeout_in_seconds: int=42949672925, failure_timestamp_utc: str=None, **kwargs) -> None: - super(ApplicationResourceUpgradeProgressInfo, self).__init__(**kwargs) - self.name = name - self.target_application_type_version = target_application_type_version - self.start_timestamp_utc = start_timestamp_utc - self.upgrade_state = upgrade_state - self.percent_completed = percent_completed - self.service_upgrade_progress = service_upgrade_progress - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_duration = upgrade_duration - self.application_upgrade_status_details = application_upgrade_status_details - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.failure_timestamp_utc = failure_timestamp_utc - - -class VolumeReference(Model): - """Describes a reference to a volume resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the volume being referenced. - :type name: str - :param read_only: The flag indicating whether the volume is read only. - Default is 'false'. - :type read_only: bool - :param destination_path: Required. The path within the container at which - the volume should be mounted. Only valid path characters are allowed. - :type destination_path: str - """ - - _validation = { - 'name': {'required': True}, - 'destination_path': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'destination_path': {'key': 'destinationPath', 'type': 'str'}, - } - - def __init__(self, *, name: str, destination_path: str, read_only: bool=None, **kwargs) -> None: - super(VolumeReference, self).__init__(**kwargs) - self.name = name - self.read_only = read_only - self.destination_path = destination_path - - -class ApplicationScopedVolume(VolumeReference): - """Describes a volume whose lifetime is scoped to the application's lifetime. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the volume being referenced. - :type name: str - :param read_only: The flag indicating whether the volume is read only. - Default is 'false'. - :type read_only: bool - :param destination_path: Required. The path within the container at which - the volume should be mounted. Only valid path characters are allowed. - :type destination_path: str - :param creation_parameters: Required. Describes parameters for creating - application-scoped volumes. - :type creation_parameters: - ~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters - """ - - _validation = { - 'name': {'required': True}, - 'destination_path': {'required': True}, - 'creation_parameters': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'destination_path': {'key': 'destinationPath', 'type': 'str'}, - 'creation_parameters': {'key': 'creationParameters', 'type': 'ApplicationScopedVolumeCreationParameters'}, - } - - def __init__(self, *, name: str, destination_path: str, creation_parameters, read_only: bool=None, **kwargs) -> None: - super(ApplicationScopedVolume, self).__init__(name=name, read_only=read_only, destination_path=destination_path, **kwargs) - self.creation_parameters = creation_parameters - - -class ApplicationScopedVolumeCreationParameters(Model): - """Describes parameters for creating application-scoped volumes. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: - ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk - - All required parameters must be populated in order to send to Azure. - - :param description: User readable description of the volume. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ServiceFabricVolumeDisk': 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk'} - } - - def __init__(self, *, description: str=None, **kwargs) -> None: - super(ApplicationScopedVolumeCreationParameters, self).__init__(**kwargs) - self.description = description - self.kind = None - - -class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk(ApplicationScopedVolumeCreationParameters): - """Describes parameters for creating application-scoped volumes provided by - Service Fabric Volume Disks. - - All required parameters must be populated in order to send to Azure. - - :param description: User readable description of the volume. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param size_disk: Required. Volume size. Possible values include: 'Small', - 'Medium', 'Large' - :type size_disk: str or ~azure.servicefabric.models.SizeTypes - """ - - _validation = { - 'kind': {'required': True}, - 'size_disk': {'required': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'size_disk': {'key': 'sizeDisk', 'type': 'str'}, - } - - def __init__(self, *, size_disk, description: str=None, **kwargs) -> None: - super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__(description=description, **kwargs) - self.size_disk = size_disk - self.kind = 'ServiceFabricVolumeDisk' - - -class ApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for applications, containing health - evaluations for each unhealthy application that impacted current aggregated - health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_applications: Maximum allowed percentage of - unhealthy applications from the ClusterHealthPolicy. - :type max_percent_unhealthy_applications: int - :param total_count: Total number of applications from the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - ApplicationHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.max_percent_unhealthy_applications = max_percent_unhealthy_applications - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Applications' - - -class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for applications of a particular application - type. The application type applications evaluation can be returned when - cluster health evaluation returns unhealthy aggregated health state, either - Error or Warning. It contains health evaluations for each unhealthy - application of the included application type that impacted current - aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param application_type_name: The application type name as defined in the - application manifest. - :type application_type_name: str - :param max_percent_unhealthy_applications: Maximum allowed percentage of - unhealthy applications for the application type, specified as an entry in - ApplicationTypeHealthPolicyMap. - :type max_percent_unhealthy_applications: int - :param total_count: Total number of applications of the application type - found in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - ApplicationHealthEvaluation of this application type that impacted the - aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, application_type_name: str=None, max_percent_unhealthy_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ApplicationTypeApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.application_type_name = application_type_name - self.max_percent_unhealthy_applications = max_percent_unhealthy_applications - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'ApplicationTypeApplications' - - -class ApplicationTypeHealthPolicyMapItem(Model): - """Defines an item in ApplicationTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key of the application type health policy map - item. This is the name of the application type. - :type key: str - :param value: Required. The value of the application type health policy - map item. - The max percent unhealthy applications allowed for the application type. - Must be between zero and 100. - :type value: int - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - } - - def __init__(self, *, key: str, value: int, **kwargs) -> None: - super(ApplicationTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = key - self.value = value - - -class ApplicationTypeImageStorePath(Model): - """Path description for the application package in the image store specified - during the prior copy operation. - - All required parameters must be populated in order to send to Azure. - - :param application_type_build_path: Required. The relative image store - path to the application package. - :type application_type_build_path: str - """ - - _validation = { - 'application_type_build_path': {'required': True}, - } - - _attribute_map = { - 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, - } - - def __init__(self, *, application_type_build_path: str, **kwargs) -> None: - super(ApplicationTypeImageStorePath, self).__init__(**kwargs) - self.application_type_build_path = application_type_build_path - - -class ApplicationTypeInfo(Model): - """Information about an application type. - - :param name: The application type name as defined in the application - manifest. - :type name: str - :param version: The version of the application type as defined in the - application manifest. - :type version: str - :param default_parameter_list: List of application type parameters that - can be overridden when creating or updating the application. - :type default_parameter_list: - list[~azure.servicefabric.models.ApplicationParameter] - :param status: The status of the application type. Possible values - include: 'Invalid', 'Provisioning', 'Available', 'Unprovisioning', - 'Failed' - :type status: str or ~azure.servicefabric.models.ApplicationTypeStatus - :param status_details: Additional detailed information about the status of - the application type. - :type status_details: str - :param application_type_definition_kind: The mechanism used to define a - Service Fabric application type. Possible values include: 'Invalid', - 'ServiceFabricApplicationPackage', 'Compose' - :type application_type_definition_kind: str or - ~azure.servicefabric.models.ApplicationTypeDefinitionKind - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'default_parameter_list': {'key': 'DefaultParameterList', 'type': '[ApplicationParameter]'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - 'application_type_definition_kind': {'key': 'ApplicationTypeDefinitionKind', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, version: str=None, default_parameter_list=None, status=None, status_details: str=None, application_type_definition_kind=None, **kwargs) -> None: - super(ApplicationTypeInfo, self).__init__(**kwargs) - self.name = name - self.version = version - self.default_parameter_list = default_parameter_list - self.status = status - self.status_details = status_details - self.application_type_definition_kind = application_type_definition_kind - - -class ApplicationTypeManifest(Model): - """Contains the manifest describing an application type registered in a - Service Fabric cluster. - - :param manifest: The XML manifest as a string. - :type manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__(self, *, manifest: str=None, **kwargs) -> None: - super(ApplicationTypeManifest, self).__init__(**kwargs) - self.manifest = manifest - - -class ApplicationUpgradeCompletedEvent(ApplicationEvent): - """Application Upgrade Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param application_type_version: Required. Application type version. - :type application_type_version: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time - in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationUpgradeCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_type_name = application_type_name - self.application_type_version = application_type_version - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ApplicationUpgradeCompleted' - - -class ApplicationUpgradeDescription(Model): - """Describes the parameters for an application upgrade. Note that upgrade - description replaces the existing application description. This means that - if the parameters are not specified, the existing parameters on the - applications will be overwritten with the empty parameters list. This would - result in the application using the default value of the parameters from - the application manifest. If you do not want to change any existing - parameter values, please get the application parameters first using the - GetApplicationInfo query and then supply those values as Parameters in this - ApplicationUpgradeDescription. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the target application, including the - 'fabric:' URI scheme. - :type name: str - :param target_application_type_version: Required. The target application - type version (found in the application manifest) for the application - upgrade. - :type target_application_type_version: str - :param parameters: List of application parameters with overridden values - from their default values specified in the application manifest. - :type parameters: list[~azure.servicefabric.models.ApplicationParameter] - :param upgrade_kind: Required. The kind of upgrade out of the following - possible values. Possible values include: 'Invalid', 'Rolling'. Default - value: "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param sort_order: Defines the order in which an upgrade proceeds through - the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', - 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default - value: "Default" . - :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param instance_close_delay_duration_in_seconds: Duration in seconds, to - wait before a stateless instance is closed, to allow the active requests - to drain gracefully. This would be effective when the instance is closing - during the application/cluster - upgrade, only for those instances which have a non-zero delay duration - configured in the service description. See - InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is - 4294967295, which indicates that the behavior will entirely depend on the - delay configured in the stateless service description. - :type instance_close_delay_duration_in_seconds: long - :param managed_application_identity: Managed application identity - description. - :type managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - - _validation = { - 'name': {'required': True}, - 'target_application_type_version': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__(self, *, name: str, target_application_type_version: str, parameters=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", monitoring_policy=None, application_health_policy=None, instance_close_delay_duration_in_seconds: int=None, managed_application_identity=None, **kwargs) -> None: - super(ApplicationUpgradeDescription, self).__init__(**kwargs) - self.name = name - self.target_application_type_version = target_application_type_version - self.parameters = parameters - self.upgrade_kind = upgrade_kind - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.force_restart = force_restart - self.sort_order = sort_order - self.monitoring_policy = monitoring_policy - self.application_health_policy = application_health_policy - self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds - self.managed_application_identity = managed_application_identity - - -class ApplicationUpgradeDomainCompletedEvent(ApplicationEvent): - """Application Upgrade Domain Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param current_application_type_version: Required. Current Application - type version. - :type current_application_type_version: str - :param application_type_version: Required. Target Application type - version. - :type application_type_version: str - :param upgrade_state: Required. State of upgrade. - :type upgrade_state: str - :param upgrade_domains: Required. Upgrade domains. - :type upgrade_domains: str - :param upgrade_domain_elapsed_time_in_ms: Required. Upgrade time of domain - in milli-seconds. - :type upgrade_domain_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'upgrade_state': {'required': True}, - 'upgrade_domains': {'required': True}, - 'upgrade_domain_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, - 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, current_application_type_version: str, application_type_version: str, upgrade_state: str, upgrade_domains: str, upgrade_domain_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationUpgradeDomainCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_type_name = application_type_name - self.current_application_type_version = current_application_type_version - self.application_type_version = application_type_version - self.upgrade_state = upgrade_state - self.upgrade_domains = upgrade_domains - self.upgrade_domain_elapsed_time_in_ms = upgrade_domain_elapsed_time_in_ms - self.kind = 'ApplicationUpgradeDomainCompleted' - - -class ApplicationUpgradeProgressInfo(Model): - """Describes the parameters for an application upgrade. - - :param name: The name of the target application, including the 'fabric:' - URI scheme. - :type name: str - :param type_name: The application type name as defined in the application - manifest. - :type type_name: str - :param target_application_type_version: The target application type - version (found in the application manifest) for the application upgrade. - :type target_application_type_version: str - :param upgrade_domains: List of upgrade domains and their statuses. - :type upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] - :param upgrade_state: The state of the upgrade domain. Possible values - include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', - 'RollingForwardPending', 'RollingForwardInProgress', - 'RollingForwardCompleted', 'Failed' - :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :param next_upgrade_domain: The name of the next upgrade domain to be - processed. - :type next_upgrade_domain: str - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_description: Describes the parameters for an application - upgrade. Note that upgrade description replaces the existing application - description. This means that if the parameters are not specified, the - existing parameters on the applications will be overwritten with the empty - parameters list. This would result in the application using the default - value of the parameters from the application manifest. If you do not want - to change any existing parameter values, please get the application - parameters first using the GetApplicationInfo query and then supply those - values as Parameters in this ApplicationUpgradeDescription. - :type upgrade_description: - ~azure.servicefabric.models.ApplicationUpgradeDescription - :param upgrade_duration_in_milliseconds: The estimated total amount of - time spent processing the overall upgrade. - :type upgrade_duration_in_milliseconds: str - :param upgrade_domain_duration_in_milliseconds: The estimated total amount - of time spent processing the current upgrade domain. - :type upgrade_domain_duration_in_milliseconds: str - :param unhealthy_evaluations: List of health evaluations that resulted in - the current aggregated health state. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param current_upgrade_domain_progress: Information about the current - in-progress upgrade domain. - :type current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :param start_timestamp_utc: The estimated UTC datetime when the upgrade - started. - :type start_timestamp_utc: str - :param failure_timestamp_utc: The estimated UTC datetime when the upgrade - failed and FailureAction was executed. - :type failure_timestamp_utc: str - :param failure_reason: The cause of an upgrade failure that resulted in - FailureAction being executed. Possible values include: 'None', - 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', - 'OverallUpgradeTimeout' - :type failure_reason: str or ~azure.servicefabric.models.FailureReason - :param upgrade_domain_progress_at_failure: Information about the upgrade - domain progress at the time of upgrade failure. - :type upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo - :param upgrade_status_details: Additional detailed information about the - status of the pending upgrade. - :type upgrade_status_details: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ApplicationUpgradeDescription'}, - 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, - 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, - 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, type_name: str=None, target_application_type_version: str=None, upgrade_domains=None, upgrade_state=None, next_upgrade_domain: str=None, rolling_upgrade_mode="UnmonitoredAuto", upgrade_description=None, upgrade_duration_in_milliseconds: str=None, upgrade_domain_duration_in_milliseconds: str=None, unhealthy_evaluations=None, current_upgrade_domain_progress=None, start_timestamp_utc: str=None, failure_timestamp_utc: str=None, failure_reason=None, upgrade_domain_progress_at_failure=None, upgrade_status_details: str=None, **kwargs) -> None: - super(ApplicationUpgradeProgressInfo, self).__init__(**kwargs) - self.name = name - self.type_name = type_name - self.target_application_type_version = target_application_type_version - self.upgrade_domains = upgrade_domains - self.upgrade_state = upgrade_state - self.next_upgrade_domain = next_upgrade_domain - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_description = upgrade_description - self.upgrade_duration_in_milliseconds = upgrade_duration_in_milliseconds - self.upgrade_domain_duration_in_milliseconds = upgrade_domain_duration_in_milliseconds - self.unhealthy_evaluations = unhealthy_evaluations - self.current_upgrade_domain_progress = current_upgrade_domain_progress - self.start_timestamp_utc = start_timestamp_utc - self.failure_timestamp_utc = failure_timestamp_utc - self.failure_reason = failure_reason - self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure - self.upgrade_status_details = upgrade_status_details - - -class ApplicationUpgradeRollbackCompletedEvent(ApplicationEvent): - """Application Upgrade Rollback Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param application_type_version: Required. Application type version. - :type application_type_version: str - :param failure_reason: Required. Describes reason of failure. - :type failure_reason: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time - in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationUpgradeRollbackCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_type_name = application_type_name - self.application_type_version = application_type_version - self.failure_reason = failure_reason - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ApplicationUpgradeRollbackCompleted' - - -class ApplicationUpgradeRollbackStartedEvent(ApplicationEvent): - """Application Upgrade Rollback Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param current_application_type_version: Required. Current Application - type version. - :type current_application_type_version: str - :param application_type_version: Required. Target Application type - version. - :type application_type_version: str - :param failure_reason: Required. Describes reason of failure. - :type failure_reason: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time - in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, current_application_type_version: str, application_type_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationUpgradeRollbackStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_type_name = application_type_name - self.current_application_type_version = current_application_type_version - self.application_type_version = application_type_version - self.failure_reason = failure_reason - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ApplicationUpgradeRollbackStarted' - - -class ApplicationUpgradeStartedEvent(ApplicationEvent): - """Application Upgrade Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param current_application_type_version: Required. Current Application - type version. - :type current_application_type_version: str - :param application_type_version: Required. Target Application type - version. - :type application_type_version: str - :param upgrade_type: Required. Type of upgrade. - :type upgrade_type: str - :param rolling_upgrade_mode: Required. Mode of upgrade. - :type rolling_upgrade_mode: str - :param failure_action: Required. Action if failed. - :type failure_action: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'upgrade_type': {'required': True}, - 'rolling_upgrade_mode': {'required': True}, - 'failure_action': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, current_application_type_version: str, application_type_version: str, upgrade_type: str, rolling_upgrade_mode: str, failure_action: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationUpgradeStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_type_name = application_type_name - self.current_application_type_version = current_application_type_version - self.application_type_version = application_type_version - self.upgrade_type = upgrade_type - self.rolling_upgrade_mode = rolling_upgrade_mode - self.failure_action = failure_action - self.kind = 'ApplicationUpgradeStarted' - - -class ApplicationUpgradeUpdateDescription(Model): - """Describes the parameters for updating an ongoing application upgrade. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the application, including the - 'fabric:' URI scheme. - :type name: str - :param upgrade_kind: Required. The kind of upgrade out of the following - possible values. Possible values include: 'Invalid', 'Rolling'. Default - value: "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param update_description: Describes the parameters for updating a rolling - upgrade of application or cluster. - :type update_description: - ~azure.servicefabric.models.RollingUpgradeUpdateDescription - """ - - _validation = { - 'name': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, - } - - def __init__(self, *, name: str, upgrade_kind="Rolling", application_health_policy=None, update_description=None, **kwargs) -> None: - super(ApplicationUpgradeUpdateDescription, self).__init__(**kwargs) - self.name = name - self.upgrade_kind = upgrade_kind - self.application_health_policy = application_health_policy - self.update_description = update_description - - -class AutoScalingMetric(Model): - """Describes the metric that is used for triggering auto scaling operation. - Derived classes will describe resources or metrics. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AutoScalingResourceMetric - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Resource': 'AutoScalingResourceMetric'} - } - - def __init__(self, **kwargs) -> None: - super(AutoScalingMetric, self).__init__(**kwargs) - self.kind = None - - -class AutoScalingPolicy(Model): - """Describes the auto scaling policy. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the auto scaling policy. - :type name: str - :param trigger: Required. Determines when auto scaling operation will be - invoked. - :type trigger: ~azure.servicefabric.models.AutoScalingTrigger - :param mechanism: Required. The mechanism that is used to scale when auto - scaling operation is invoked. - :type mechanism: ~azure.servicefabric.models.AutoScalingMechanism - """ - - _validation = { - 'name': {'required': True}, - 'trigger': {'required': True}, - 'mechanism': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'trigger': {'key': 'trigger', 'type': 'AutoScalingTrigger'}, - 'mechanism': {'key': 'mechanism', 'type': 'AutoScalingMechanism'}, - } - - def __init__(self, *, name: str, trigger, mechanism, **kwargs) -> None: - super(AutoScalingPolicy, self).__init__(**kwargs) - self.name = name - self.trigger = trigger - self.mechanism = mechanism - - -class AutoScalingResourceMetric(AutoScalingMetric): - """Describes the resource that is used for triggering auto scaling. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param name: Required. Name of the resource. Possible values include: - 'cpu', 'memoryInGB' - :type name: str or - ~azure.servicefabric.models.AutoScalingResourceMetricName - """ - - _validation = { - 'kind': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name, **kwargs) -> None: - super(AutoScalingResourceMetric, self).__init__(**kwargs) - self.name = name - self.kind = 'Resource' - - -class AutoScalingTrigger(Model): - """Describes the trigger for performing auto scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AverageLoadScalingTrigger - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AverageLoad': 'AverageLoadScalingTrigger'} - } - - def __init__(self, **kwargs) -> None: - super(AutoScalingTrigger, self).__init__(**kwargs) - self.kind = None - - -class AverageLoadScalingTrigger(AutoScalingTrigger): - """Describes the average load trigger used for auto scaling. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param metric: Required. Description of the metric that is used for - scaling. - :type metric: ~azure.servicefabric.models.AutoScalingMetric - :param lower_load_threshold: Required. Lower load threshold (if average - load is below this threshold, service will scale down). - :type lower_load_threshold: float - :param upper_load_threshold: Required. Upper load threshold (if average - load is above this threshold, service will scale up). - :type upper_load_threshold: float - :param scale_interval_in_seconds: Required. Scale interval that indicates - how often will this trigger be checked. - :type scale_interval_in_seconds: int - """ - - _validation = { - 'kind': {'required': True}, - 'metric': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'minimum': 60}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'metric': {'key': 'metric', 'type': 'AutoScalingMetric'}, - 'lower_load_threshold': {'key': 'lowerLoadThreshold', 'type': 'float'}, - 'upper_load_threshold': {'key': 'upperLoadThreshold', 'type': 'float'}, - 'scale_interval_in_seconds': {'key': 'scaleIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, *, metric, lower_load_threshold: float, upper_load_threshold: float, scale_interval_in_seconds: int, **kwargs) -> None: - super(AverageLoadScalingTrigger, self).__init__(**kwargs) - self.metric = metric - self.lower_load_threshold = lower_load_threshold - self.upper_load_threshold = upper_load_threshold - self.scale_interval_in_seconds = scale_interval_in_seconds - self.kind = 'AverageLoad' - - -class ScalingTriggerDescription(Model): - """Describes the trigger for performing a scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AveragePartitionLoadScalingTrigger, - AverageServiceLoadScalingTrigger - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AveragePartitionLoad': 'AveragePartitionLoadScalingTrigger', 'AverageServiceLoad': 'AverageServiceLoadScalingTrigger'} - } - - def __init__(self, **kwargs) -> None: - super(ScalingTriggerDescription, self).__init__(**kwargs) - self.kind = None - - -class AveragePartitionLoadScalingTrigger(ScalingTriggerDescription): - """Represents a scaling trigger related to an average load of a - metric/resource of a partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param metric_name: Required. The name of the metric for which usage - should be tracked. - :type metric_name: str - :param lower_load_threshold: Required. The lower limit of the load below - which a scale in operation should be performed. - :type lower_load_threshold: str - :param upper_load_threshold: Required. The upper limit of the load beyond - which a scale out operation should be performed. - :type upper_load_threshold: str - :param scale_interval_in_seconds: Required. The period in seconds on which - a decision is made whether to scale or not. - :type scale_interval_in_seconds: long - """ - - _validation = { - 'kind': {'required': True}, - 'metric_name': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, - 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, - 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, - } - - def __init__(self, *, metric_name: str, lower_load_threshold: str, upper_load_threshold: str, scale_interval_in_seconds: int, **kwargs) -> None: - super(AveragePartitionLoadScalingTrigger, self).__init__(**kwargs) - self.metric_name = metric_name - self.lower_load_threshold = lower_load_threshold - self.upper_load_threshold = upper_load_threshold - self.scale_interval_in_seconds = scale_interval_in_seconds - self.kind = 'AveragePartitionLoad' - - -class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): - """Represents a scaling policy related to an average load of a metric/resource - of a service. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param metric_name: Required. The name of the metric for which usage - should be tracked. - :type metric_name: str - :param lower_load_threshold: Required. The lower limit of the load below - which a scale in operation should be performed. - :type lower_load_threshold: str - :param upper_load_threshold: Required. The upper limit of the load beyond - which a scale out operation should be performed. - :type upper_load_threshold: str - :param scale_interval_in_seconds: Required. The period in seconds on which - a decision is made whether to scale or not. - :type scale_interval_in_seconds: long - :param use_only_primary_load: Required. Flag determines whether only the - load of primary replica should be considered for scaling. - If set to true, then trigger will only consider the load of primary - replicas of stateful service. - If set to false, trigger will consider load of all replicas. - This parameter cannot be set to true for stateless service. - :type use_only_primary_load: bool - """ - - _validation = { - 'kind': {'required': True}, - 'metric_name': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, - 'use_only_primary_load': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, - 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, - 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, - 'use_only_primary_load': {'key': 'UseOnlyPrimaryLoad', 'type': 'bool'}, - } - - def __init__(self, *, metric_name: str, lower_load_threshold: str, upper_load_threshold: str, scale_interval_in_seconds: int, use_only_primary_load: bool, **kwargs) -> None: - super(AverageServiceLoadScalingTrigger, self).__init__(**kwargs) - self.metric_name = metric_name - self.lower_load_threshold = lower_load_threshold - self.upper_load_threshold = upper_load_threshold - self.scale_interval_in_seconds = scale_interval_in_seconds - self.use_only_primary_load = use_only_primary_load - self.kind = 'AverageServiceLoad' - - -class BackupStorageDescription(Model): - """Describes the parameters for the backup storage. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureBlobBackupStorageDescription, - FileShareBackupStorageDescription, DsmsAzureBlobBackupStorageDescription, - ManagedIdentityAzureBlobBackupStorageDescription - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - """ - - _validation = { - 'storage_kind': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - } - - _subtype_map = { - 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription', 'ManagedIdentityAzureBlobStore': 'ManagedIdentityAzureBlobBackupStorageDescription'} - } - - def __init__(self, *, friendly_name: str=None, **kwargs) -> None: - super(BackupStorageDescription, self).__init__(**kwargs) - self.friendly_name = friendly_name - self.storage_kind = None - - -class AzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Azure blob store used for storing and - enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - :param connection_string: Required. The connection string to connect to - the Azure blob store. - :type connection_string: str - :param container_name: Required. The name of the container in the blob - store to store and enumerate backups from. - :type container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'connection_string': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'connection_string': {'key': 'ConnectionString', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__(self, *, connection_string: str, container_name: str, friendly_name: str=None, **kwargs) -> None: - super(AzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) - self.connection_string = connection_string - self.container_name = container_name - self.storage_kind = 'AzureBlobStore' - - -class DiagnosticsSinkProperties(Model): - """Properties of a DiagnosticsSink. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureInternalMonitoringPipelineSinkDescription - - All required parameters must be populated in order to send to Azure. - - :param name: Name of the sink. This value is referenced by - DiagnosticsReferenceDescription - :type name: str - :param description: A description of the sink. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AzureInternalMonitoringPipeline': 'AzureInternalMonitoringPipelineSinkDescription'} - } - - def __init__(self, *, name: str=None, description: str=None, **kwargs) -> None: - super(DiagnosticsSinkProperties, self).__init__(**kwargs) - self.name = name - self.description = description - self.kind = None - - -class AzureInternalMonitoringPipelineSinkDescription(DiagnosticsSinkProperties): - """Diagnostics settings for Geneva. - - All required parameters must be populated in order to send to Azure. - - :param name: Name of the sink. This value is referenced by - DiagnosticsReferenceDescription - :type name: str - :param description: A description of the sink. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param account_name: Azure Internal monitoring pipeline account. - :type account_name: str - :param namespace: Azure Internal monitoring pipeline account namespace. - :type namespace: str - :param ma_config_url: Azure Internal monitoring agent configuration. - :type ma_config_url: str - :param fluentd_config_url: Azure Internal monitoring agent fluentd - configuration. - :type fluentd_config_url: str - :param auto_key_config_url: Azure Internal monitoring pipeline autokey - associated with the certificate. - :type auto_key_config_url: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'ma_config_url': {'key': 'maConfigUrl', 'type': 'str'}, - 'fluentd_config_url': {'key': 'fluentdConfigUrl', 'type': 'str'}, - 'auto_key_config_url': {'key': 'autoKeyConfigUrl', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, description: str=None, account_name: str=None, namespace: str=None, ma_config_url: str=None, fluentd_config_url: str=None, auto_key_config_url: str=None, **kwargs) -> None: - super(AzureInternalMonitoringPipelineSinkDescription, self).__init__(name=name, description=description, **kwargs) - self.account_name = account_name - self.namespace = namespace - self.ma_config_url = ma_config_url - self.fluentd_config_url = fluentd_config_url - self.auto_key_config_url = auto_key_config_url - self.kind = 'AzureInternalMonitoringPipeline' - - -class BackupInfo(Model): - """Represents a backup point which can be used to trigger a restore. - - :param backup_id: Unique backup ID . - :type backup_id: str - :param backup_chain_id: Unique backup chain ID. All backups part of the - same chain has the same backup chain id. A backup chain is comprised of 1 - full backup and multiple incremental backups. - :type backup_chain_id: str - :param application_name: Name of the Service Fabric application this - partition backup belongs to. - :type application_name: str - :param service_name: Name of the Service Fabric service this partition - backup belongs to. - :type service_name: str - :param partition_information: Information about the partition to which - this backup belongs to - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param backup_location: Location of the backup, relative to the backup - store. - :type backup_location: str - :param backup_type: Describes the type of backup, whether its full or - incremental. Possible values include: 'Invalid', 'Full', 'Incremental' - :type backup_type: str or ~azure.servicefabric.models.BackupType - :param epoch_of_last_backup_record: Epoch of the last record in this - backup. - :type epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch - :param lsn_of_last_backup_record: LSN of the last record in this backup. - :type lsn_of_last_backup_record: str - :param creation_time_utc: The date time when this backup was taken. - :type creation_time_utc: datetime - :param service_manifest_version: Manifest Version of the service this - partition backup belongs to. - :type service_manifest_version: str - :param failure_error: Denotes the failure encountered in getting backup - point information. - :type failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_chain_id': {'key': 'BackupChainId', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'backup_type': {'key': 'BackupType', 'type': 'str'}, - 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, - 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, - 'creation_time_utc': {'key': 'CreationTimeUtc', 'type': 'iso-8601'}, - 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__(self, *, backup_id: str=None, backup_chain_id: str=None, application_name: str=None, service_name: str=None, partition_information=None, backup_location: str=None, backup_type=None, epoch_of_last_backup_record=None, lsn_of_last_backup_record: str=None, creation_time_utc=None, service_manifest_version: str=None, failure_error=None, **kwargs) -> None: - super(BackupInfo, self).__init__(**kwargs) - self.backup_id = backup_id - self.backup_chain_id = backup_chain_id - self.application_name = application_name - self.service_name = service_name - self.partition_information = partition_information - self.backup_location = backup_location - self.backup_type = backup_type - self.epoch_of_last_backup_record = epoch_of_last_backup_record - self.lsn_of_last_backup_record = lsn_of_last_backup_record - self.creation_time_utc = creation_time_utc - self.service_manifest_version = service_manifest_version - self.failure_error = failure_error - - -class BackupPartitionDescription(Model): - """Describes the parameters for triggering partition's backup. - - :param backup_storage: Specifies the details of the backup storage where - to save the backup. - :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription - """ - - _attribute_map = { - 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, - } - - def __init__(self, *, backup_storage=None, **kwargs) -> None: - super(BackupPartitionDescription, self).__init__(**kwargs) - self.backup_storage = backup_storage - - -class BackupPolicyDescription(Model): - """Describes a backup policy for configuring periodic backup. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The unique name identifying this backup policy. - :type name: str - :param auto_restore_on_data_loss: Required. Specifies whether to trigger - restore automatically using the latest available backup in case the - partition experiences a data loss event. - :type auto_restore_on_data_loss: bool - :param max_incremental_backups: Required. Defines the maximum number of - incremental backups to be taken between two full backups. This is just the - upper limit. A full backup may be taken before specified number of - incremental backups are completed in one of the following conditions - - The replica has never taken a full backup since it has become primary, - - Some of the log records since the last backup has been truncated, or - - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. - :type max_incremental_backups: int - :param schedule: Required. Describes the backup schedule parameters. - :type schedule: ~azure.servicefabric.models.BackupScheduleDescription - :param storage: Required. Describes the details of backup storage where to - store the periodic backups. - :type storage: ~azure.servicefabric.models.BackupStorageDescription - :param retention_policy: Describes the policy to retain backups in - storage. - :type retention_policy: - ~azure.servicefabric.models.RetentionPolicyDescription - """ - - _validation = { - 'name': {'required': True}, - 'auto_restore_on_data_loss': {'required': True}, - 'max_incremental_backups': {'required': True, 'maximum': 255, 'minimum': 0}, - 'schedule': {'required': True}, - 'storage': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'auto_restore_on_data_loss': {'key': 'AutoRestoreOnDataLoss', 'type': 'bool'}, - 'max_incremental_backups': {'key': 'MaxIncrementalBackups', 'type': 'int'}, - 'schedule': {'key': 'Schedule', 'type': 'BackupScheduleDescription'}, - 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, - 'retention_policy': {'key': 'RetentionPolicy', 'type': 'RetentionPolicyDescription'}, - } - - def __init__(self, *, name: str, auto_restore_on_data_loss: bool, max_incremental_backups: int, schedule, storage, retention_policy=None, **kwargs) -> None: - super(BackupPolicyDescription, self).__init__(**kwargs) - self.name = name - self.auto_restore_on_data_loss = auto_restore_on_data_loss - self.max_incremental_backups = max_incremental_backups - self.schedule = schedule - self.storage = storage - self.retention_policy = retention_policy - - -class BackupProgressInfo(Model): - """Describes the progress of a partition's backup. - - :param backup_state: Represents the current state of the partition backup - operation. Possible values include: 'Invalid', 'Accepted', - 'BackupInProgress', 'Success', 'Failure', 'Timeout' - :type backup_state: str or ~azure.servicefabric.models.BackupState - :param time_stamp_utc: TimeStamp in UTC when operation succeeded or - failed. - :type time_stamp_utc: datetime - :param backup_id: Unique ID of the newly created backup. - :type backup_id: str - :param backup_location: Location, relative to the backup store, of the - newly created backup. - :type backup_location: str - :param epoch_of_last_backup_record: Specifies the epoch of the last record - included in backup. - :type epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch - :param lsn_of_last_backup_record: The LSN of last record included in - backup. - :type lsn_of_last_backup_record: str - :param failure_error: Denotes the failure encountered in performing backup - operation. - :type failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'backup_state': {'key': 'BackupState', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, - 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__(self, *, backup_state=None, time_stamp_utc=None, backup_id: str=None, backup_location: str=None, epoch_of_last_backup_record=None, lsn_of_last_backup_record: str=None, failure_error=None, **kwargs) -> None: - super(BackupProgressInfo, self).__init__(**kwargs) - self.backup_state = backup_state - self.time_stamp_utc = time_stamp_utc - self.backup_id = backup_id - self.backup_location = backup_location - self.epoch_of_last_backup_record = epoch_of_last_backup_record - self.lsn_of_last_backup_record = lsn_of_last_backup_record - self.failure_error = failure_error - - -class BackupScheduleDescription(Model): - """Describes the backup schedule parameters. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: FrequencyBasedBackupScheduleDescription, - TimeBasedBackupScheduleDescription - - All required parameters must be populated in order to send to Azure. - - :param schedule_kind: Required. Constant filled by server. - :type schedule_kind: str - """ - - _validation = { - 'schedule_kind': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - } - - _subtype_map = { - 'schedule_kind': {'FrequencyBased': 'FrequencyBasedBackupScheduleDescription', 'TimeBased': 'TimeBasedBackupScheduleDescription'} - } - - def __init__(self, **kwargs) -> None: - super(BackupScheduleDescription, self).__init__(**kwargs) - self.schedule_kind = None - - -class BackupSuspensionInfo(Model): - """Describes the backup suspension details. - - :param is_suspended: Indicates whether periodic backup is suspended at - this level or not. - :type is_suspended: bool - :param suspension_inherited_from: Specifies the scope at which the backup - suspension was applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type suspension_inherited_from: str or - ~azure.servicefabric.models.BackupSuspensionScope - """ - - _attribute_map = { - 'is_suspended': {'key': 'IsSuspended', 'type': 'bool'}, - 'suspension_inherited_from': {'key': 'SuspensionInheritedFrom', 'type': 'str'}, - } - - def __init__(self, *, is_suspended: bool=None, suspension_inherited_from=None, **kwargs) -> None: - super(BackupSuspensionInfo, self).__init__(**kwargs) - self.is_suspended = is_suspended - self.suspension_inherited_from = suspension_inherited_from - - -class RetentionPolicyDescription(Model): - """Describes the retention policy configured. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BasicRetentionPolicyDescription - - All required parameters must be populated in order to send to Azure. - - :param retention_policy_type: Required. Constant filled by server. - :type retention_policy_type: str - """ - - _validation = { - 'retention_policy_type': {'required': True}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, - } - - _subtype_map = { - 'retention_policy_type': {'Basic': 'BasicRetentionPolicyDescription'} - } - - def __init__(self, **kwargs) -> None: - super(RetentionPolicyDescription, self).__init__(**kwargs) - self.retention_policy_type = None - - -class BasicRetentionPolicyDescription(RetentionPolicyDescription): - """Describes basic retention policy. - - All required parameters must be populated in order to send to Azure. - - :param retention_policy_type: Required. Constant filled by server. - :type retention_policy_type: str - :param retention_duration: Required. It is the minimum duration for which - a backup created, will remain stored in the storage and might get deleted - after that span of time. It should be specified in ISO8601 format. - :type retention_duration: timedelta - :param minimum_number_of_backups: It is the minimum number of backups to - be retained at any point of time. If specified with a non zero value, - backups will not be deleted even if the backups have gone past retention - duration and have number of backups less than or equal to it. - :type minimum_number_of_backups: int - """ - - _validation = { - 'retention_policy_type': {'required': True}, - 'retention_duration': {'required': True}, - 'minimum_number_of_backups': {'minimum': 0}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, - 'retention_duration': {'key': 'RetentionDuration', 'type': 'duration'}, - 'minimum_number_of_backups': {'key': 'MinimumNumberOfBackups', 'type': 'int'}, - } - - def __init__(self, *, retention_duration, minimum_number_of_backups: int=None, **kwargs) -> None: - super(BasicRetentionPolicyDescription, self).__init__(**kwargs) - self.retention_duration = retention_duration - self.minimum_number_of_backups = minimum_number_of_backups - self.retention_policy_type = 'Basic' - - -class PropertyValue(Model): - """Describes a Service Fabric property value. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BinaryPropertyValue, Int64PropertyValue, - DoublePropertyValue, StringPropertyValue, GuidPropertyValue - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Binary': 'BinaryPropertyValue', 'Int64': 'Int64PropertyValue', 'Double': 'DoublePropertyValue', 'String': 'StringPropertyValue', 'Guid': 'GuidPropertyValue'} - } - - def __init__(self, **kwargs) -> None: - super(PropertyValue, self).__init__(**kwargs) - self.kind = None - - -class BinaryPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Binary. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. Array of bytes to be sent as an integer array. Each - element of array is a number between 0 and 255. - :type data: list[int] - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': '[int]'}, - } - - def __init__(self, *, data, **kwargs) -> None: - super(BinaryPropertyValue, self).__init__(**kwargs) - self.data = data - self.kind = 'Binary' - - -class Chaos(Model): - """Contains a description of Chaos. - - :param chaos_parameters: If Chaos is running, these are the parameters - Chaos is running with. - :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters - :param status: Current status of the Chaos run. Possible values include: - 'Invalid', 'Running', 'Stopped' - :type status: str or ~azure.servicefabric.models.ChaosStatus - :param schedule_status: Current status of the schedule. Possible values - include: 'Invalid', 'Stopped', 'Active', 'Expired', 'Pending' - :type schedule_status: str or - ~azure.servicefabric.models.ChaosScheduleStatus - """ - - _attribute_map = { - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'schedule_status': {'key': 'ScheduleStatus', 'type': 'str'}, - } - - def __init__(self, *, chaos_parameters=None, status=None, schedule_status=None, **kwargs) -> None: - super(Chaos, self).__init__(**kwargs) - self.chaos_parameters = chaos_parameters - self.status = status - self.schedule_status = schedule_status - - -class ChaosCodePackageRestartScheduledEvent(ApplicationEvent): - """Chaos Restart Code Package Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param service_manifest_name: Required. Service manifest name. - :type service_manifest_name: str - :param code_package_name: Required. Code package name. - :type code_package_name: str - :param service_package_activation_id: Required. Id of Service package - activation. - :type service_package_activation_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'node_name': {'required': True}, - 'service_manifest_name': {'required': True}, - 'code_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, fault_group_id: str, fault_id: str, node_name: str, service_manifest_name: str, code_package_name: str, service_package_activation_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosCodePackageRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.fault_group_id = fault_group_id - self.fault_id = fault_id - self.node_name = node_name - self.service_manifest_name = service_manifest_name - self.code_package_name = code_package_name - self.service_package_activation_id = service_package_activation_id - self.kind = 'ChaosCodePackageRestartScheduled' - - -class ChaosContext(Model): - """Describes a map, which is a collection of (string, string) type key-value - pairs. The map can be used to record information about - the Chaos run. There cannot be more than 100 such pairs and each string - (key or value) can be at most 4095 characters long. - This map is set by the starter of the Chaos run to optionally store the - context about the specific run. - - :param map: Describes a map that contains a collection of - ChaosContextMapItem's. - :type map: dict[str, str] - """ - - _attribute_map = { - 'map': {'key': 'Map', 'type': '{str}'}, - } - - def __init__(self, *, map=None, **kwargs) -> None: - super(ChaosContext, self).__init__(**kwargs) - self.map = map - - -class ChaosEvent(Model): - """Represents an event generated during a Chaos run. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ExecutingFaultsChaosEvent, StartedChaosEvent, - StoppedChaosEvent, TestErrorChaosEvent, ValidationFailedChaosEvent, - WaitingChaosEvent - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ExecutingFaults': 'ExecutingFaultsChaosEvent', 'Started': 'StartedChaosEvent', 'Stopped': 'StoppedChaosEvent', 'TestError': 'TestErrorChaosEvent', 'ValidationFailed': 'ValidationFailedChaosEvent', 'Waiting': 'WaitingChaosEvent'} - } - - def __init__(self, *, time_stamp_utc, **kwargs) -> None: - super(ChaosEvent, self).__init__(**kwargs) - self.time_stamp_utc = time_stamp_utc - self.kind = None - - -class ChaosEventsSegment(Model): - """Contains the list of Chaos events and the continuation token to get the - next segment. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param history: List of Chaos events that meet the user-supplied criteria. - :type history: list[~azure.servicefabric.models.ChaosEventWrapper] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'history': {'key': 'History', 'type': '[ChaosEventWrapper]'}, - } - - def __init__(self, *, continuation_token: str=None, history=None, **kwargs) -> None: - super(ChaosEventsSegment, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.history = history - - -class ChaosEventWrapper(Model): - """Wrapper object for Chaos event. - - :param chaos_event: Represents an event generated during a Chaos run. - :type chaos_event: ~azure.servicefabric.models.ChaosEvent - """ - - _attribute_map = { - 'chaos_event': {'key': 'ChaosEvent', 'type': 'ChaosEvent'}, - } - - def __init__(self, *, chaos_event=None, **kwargs) -> None: - super(ChaosEventWrapper, self).__init__(**kwargs) - self.chaos_event = chaos_event - - -class NodeEvent(FabricEvent): - """Represents the base for all Node Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NodeAbortedEvent, NodeAddedToClusterEvent, - NodeClosedEvent, NodeDeactivateCompletedEvent, NodeDeactivateStartedEvent, - NodeDownEvent, NodeNewHealthReportEvent, NodeHealthReportExpiredEvent, - NodeOpenSucceededEvent, NodeOpenFailedEvent, NodeRemovedFromClusterEvent, - NodeUpEvent, ChaosNodeRestartScheduledEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'NodeAborted': 'NodeAbortedEvent', 'NodeAddedToCluster': 'NodeAddedToClusterEvent', 'NodeClosed': 'NodeClosedEvent', 'NodeDeactivateCompleted': 'NodeDeactivateCompletedEvent', 'NodeDeactivateStarted': 'NodeDeactivateStartedEvent', 'NodeDown': 'NodeDownEvent', 'NodeNewHealthReport': 'NodeNewHealthReportEvent', 'NodeHealthReportExpired': 'NodeHealthReportExpiredEvent', 'NodeOpenSucceeded': 'NodeOpenSucceededEvent', 'NodeOpenFailed': 'NodeOpenFailedEvent', 'NodeRemovedFromCluster': 'NodeRemovedFromClusterEvent', 'NodeUp': 'NodeUpEvent', 'ChaosNodeRestartScheduled': 'ChaosNodeRestartScheduledEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.node_name = node_name - self.kind = 'NodeEvent' - - -class ChaosNodeRestartScheduledEvent(NodeEvent): - """Chaos Restart Node Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: Required. Id of Node instance. - :type node_instance_id: long - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance_id: int, fault_group_id: str, fault_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosNodeRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance_id = node_instance_id - self.fault_group_id = fault_group_id - self.fault_id = fault_id - self.kind = 'ChaosNodeRestartScheduled' - - -class ChaosParameters(Model): - """Defines all the parameters to configure a Chaos run. - - :param time_to_run_in_seconds: Total time (in seconds) for which Chaos - will run before automatically stopping. The maximum allowed value is - 4,294,967,295 (System.UInt32.MaxValue). Default value: "4294967295" . - :type time_to_run_in_seconds: str - :param max_cluster_stabilization_timeout_in_seconds: The maximum amount of - time to wait for all cluster entities to become stable and healthy. Chaos - executes in iterations and at the start of each iteration it validates the - health of cluster entities. - During validation if a cluster entity is not stable and healthy within - MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation - failed event. Default value: 60 . - :type max_cluster_stabilization_timeout_in_seconds: long - :param max_concurrent_faults: MaxConcurrentFaults is the maximum number of - concurrent faults induced per iteration. - Chaos executes in iterations and two consecutive iterations are separated - by a validation phase. - The higher the concurrency, the more aggressive the injection of faults, - leading to inducing more complex series of states to uncover bugs. - The recommendation is to start with a value of 2 or 3 and to exercise - caution while moving up. Default value: 1 . - :type max_concurrent_faults: long - :param enable_move_replica_faults: Enables or disables the move primary - and move secondary faults. Default value: True . - :type enable_move_replica_faults: bool - :param wait_time_between_faults_in_seconds: Wait time (in seconds) between - consecutive faults within a single iteration. - The larger the value, the lower the overlapping between faults and the - simpler the sequence of state transitions that the cluster goes through. - The recommendation is to start with a value between 1 and 5 and exercise - caution while moving up. Default value: 20 . - :type wait_time_between_faults_in_seconds: long - :param wait_time_between_iterations_in_seconds: Time-separation (in - seconds) between two consecutive iterations of Chaos. - The larger the value, the lower the fault injection rate. Default value: - 30 . - :type wait_time_between_iterations_in_seconds: long - :param cluster_health_policy: Passed-in cluster health policy is used to - validate health of the cluster in between Chaos iterations. If the cluster - health is in error or if an unexpected exception happens during fault - execution--to provide the cluster with some time to recuperate--Chaos will - wait for 30 minutes before the next health-check. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param context: Describes a map, which is a collection of (string, string) - type key-value pairs. The map can be used to record information about - the Chaos run. There cannot be more than 100 such pairs and each string - (key or value) can be at most 4095 characters long. - This map is set by the starter of the Chaos run to optionally store the - context about the specific run. - :type context: ~azure.servicefabric.models.ChaosContext - :param chaos_target_filter: List of cluster entities to target for Chaos - faults. - This filter can be used to target Chaos faults only to certain node types - or only to certain application instances. If ChaosTargetFilter is not - used, Chaos faults all cluster entities. - If ChaosTargetFilter is used, Chaos faults only the entities that meet the - ChaosTargetFilter specification. - :type chaos_target_filter: ~azure.servicefabric.models.ChaosTargetFilter - """ - - _validation = { - 'max_cluster_stabilization_timeout_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'max_concurrent_faults': {'maximum': 4294967295, 'minimum': 0}, - 'wait_time_between_faults_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'wait_time_between_iterations_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'str'}, - 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'long'}, - 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, - 'enable_move_replica_faults': {'key': 'EnableMoveReplicaFaults', 'type': 'bool'}, - 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'long'}, - 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'long'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'context': {'key': 'Context', 'type': 'ChaosContext'}, - 'chaos_target_filter': {'key': 'ChaosTargetFilter', 'type': 'ChaosTargetFilter'}, - } - - def __init__(self, *, time_to_run_in_seconds: str="4294967295", max_cluster_stabilization_timeout_in_seconds: int=60, max_concurrent_faults: int=1, enable_move_replica_faults: bool=True, wait_time_between_faults_in_seconds: int=20, wait_time_between_iterations_in_seconds: int=30, cluster_health_policy=None, context=None, chaos_target_filter=None, **kwargs) -> None: - super(ChaosParameters, self).__init__(**kwargs) - self.time_to_run_in_seconds = time_to_run_in_seconds - self.max_cluster_stabilization_timeout_in_seconds = max_cluster_stabilization_timeout_in_seconds - self.max_concurrent_faults = max_concurrent_faults - self.enable_move_replica_faults = enable_move_replica_faults - self.wait_time_between_faults_in_seconds = wait_time_between_faults_in_seconds - self.wait_time_between_iterations_in_seconds = wait_time_between_iterations_in_seconds - self.cluster_health_policy = cluster_health_policy - self.context = context - self.chaos_target_filter = chaos_target_filter - - -class ChaosParametersDictionaryItem(Model): - """Defines an item in ChaosParametersDictionary of the Chaos Schedule. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key identifying the Chaos Parameter in the - dictionary. This key is referenced by Chaos Schedule Jobs. - :type key: str - :param value: Required. Defines all the parameters to configure a Chaos - run. - :type value: ~azure.servicefabric.models.ChaosParameters - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ChaosParameters'}, - } - - def __init__(self, *, key: str, value, **kwargs) -> None: - super(ChaosParametersDictionaryItem, self).__init__(**kwargs) - self.key = key - self.value = value - - -class PartitionEvent(FabricEvent): - """Represents the base for all Partition Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionAnalysisEvent, PartitionNewHealthReportEvent, - PartitionHealthReportExpiredEvent, PartitionReconfiguredEvent, - ChaosPartitionSecondaryMoveScheduledEvent, - ChaosPartitionPrimaryMoveScheduledEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'PartitionAnalysisEvent': 'PartitionAnalysisEvent', 'PartitionNewHealthReport': 'PartitionNewHealthReportEvent', 'PartitionHealthReportExpired': 'PartitionHealthReportExpiredEvent', 'PartitionReconfigured': 'PartitionReconfiguredEvent', 'ChaosPartitionSecondaryMoveScheduled': 'ChaosPartitionSecondaryMoveScheduledEvent', 'ChaosPartitionPrimaryMoveScheduled': 'ChaosPartitionPrimaryMoveScheduledEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.partition_id = partition_id - self.kind = 'PartitionEvent' - - -class ChaosPartitionPrimaryMoveScheduledEvent(PartitionEvent): - """Chaos Move Primary Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param service_name: Required. Service name. - :type service_name: str - :param node_to: Required. The name of a Service Fabric node. - :type node_to: str - :param forced_move: Required. Indicates a forced move. - :type forced_move: bool - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_name': {'required': True}, - 'node_to': {'required': True}, - 'forced_move': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'node_to': {'key': 'NodeTo', 'type': 'str'}, - 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, fault_group_id: str, fault_id: str, service_name: str, node_to: str, forced_move: bool, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosPartitionPrimaryMoveScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.fault_group_id = fault_group_id - self.fault_id = fault_id - self.service_name = service_name - self.node_to = node_to - self.forced_move = forced_move - self.kind = 'ChaosPartitionPrimaryMoveScheduled' - - -class ChaosPartitionSecondaryMoveScheduledEvent(PartitionEvent): - """Chaos Move Secondary Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param service_name: Required. Service name. - :type service_name: str - :param source_node: Required. The name of a Service Fabric node. - :type source_node: str - :param destination_node: Required. The name of a Service Fabric node. - :type destination_node: str - :param forced_move: Required. Indicates a forced move. - :type forced_move: bool - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_name': {'required': True}, - 'source_node': {'required': True}, - 'destination_node': {'required': True}, - 'forced_move': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'source_node': {'key': 'SourceNode', 'type': 'str'}, - 'destination_node': {'key': 'DestinationNode', 'type': 'str'}, - 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, fault_group_id: str, fault_id: str, service_name: str, source_node: str, destination_node: str, forced_move: bool, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosPartitionSecondaryMoveScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.fault_group_id = fault_group_id - self.fault_id = fault_id - self.service_name = service_name - self.source_node = source_node - self.destination_node = destination_node - self.forced_move = forced_move - self.kind = 'ChaosPartitionSecondaryMoveScheduled' - - -class ReplicaEvent(FabricEvent): - """Represents the base for all Replica Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulReplicaNewHealthReportEvent, - StatefulReplicaHealthReportExpiredEvent, - StatelessReplicaNewHealthReportEvent, - StatelessReplicaHealthReportExpiredEvent, - ChaosReplicaRemovalScheduledEvent, ChaosReplicaRestartScheduledEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - } - - _subtype_map = { - 'kind': {'StatefulReplicaNewHealthReport': 'StatefulReplicaNewHealthReportEvent', 'StatefulReplicaHealthReportExpired': 'StatefulReplicaHealthReportExpiredEvent', 'StatelessReplicaNewHealthReport': 'StatelessReplicaNewHealthReportEvent', 'StatelessReplicaHealthReportExpired': 'StatelessReplicaHealthReportExpiredEvent', 'ChaosReplicaRemovalScheduled': 'ChaosReplicaRemovalScheduledEvent', 'ChaosReplicaRestartScheduled': 'ChaosReplicaRestartScheduledEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ReplicaEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.partition_id = partition_id - self.replica_id = replica_id - self.kind = 'ReplicaEvent' - - -class ChaosReplicaRemovalScheduledEvent(ReplicaEvent): - """Chaos Remove Replica Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param service_uri: Required. Service name. - :type service_uri: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_uri': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, fault_group_id: str, fault_id: str, service_uri: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosReplicaRemovalScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.fault_group_id = fault_group_id - self.fault_id = fault_id - self.service_uri = service_uri - self.kind = 'ChaosReplicaRemovalScheduled' - - -class ChaosReplicaRestartScheduledEvent(ReplicaEvent): - """Chaos Restart Replica Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param service_uri: Required. Service name. - :type service_uri: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_uri': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, fault_group_id: str, fault_id: str, service_uri: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosReplicaRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.fault_group_id = fault_group_id - self.fault_id = fault_id - self.service_uri = service_uri - self.kind = 'ChaosReplicaRestartScheduled' - - -class ChaosSchedule(Model): - """Defines the schedule used by Chaos. - - :param start_date: The date and time Chaos will start using this schedule. - Default value: "1601-01-01T00:00:00Z" . - :type start_date: datetime - :param expiry_date: The date and time Chaos will continue to use this - schedule until. Default value: "9999-12-31T23:59:59.999Z" . - :type expiry_date: datetime - :param chaos_parameters_dictionary: A mapping of string names to Chaos - Parameters to be referenced by Chaos Schedule Jobs. - :type chaos_parameters_dictionary: - list[~azure.servicefabric.models.ChaosParametersDictionaryItem] - :param jobs: A list of all Chaos Schedule Jobs that will be automated by - the schedule. - :type jobs: list[~azure.servicefabric.models.ChaosScheduleJob] - """ - - _attribute_map = { - 'start_date': {'key': 'StartDate', 'type': 'iso-8601'}, - 'expiry_date': {'key': 'ExpiryDate', 'type': 'iso-8601'}, - 'chaos_parameters_dictionary': {'key': 'ChaosParametersDictionary', 'type': '[ChaosParametersDictionaryItem]'}, - 'jobs': {'key': 'Jobs', 'type': '[ChaosScheduleJob]'}, - } - - def __init__(self, *, start_date="1601-01-01T00:00:00Z", expiry_date="9999-12-31T23:59:59.999Z", chaos_parameters_dictionary=None, jobs=None, **kwargs) -> None: - super(ChaosSchedule, self).__init__(**kwargs) - self.start_date = start_date - self.expiry_date = expiry_date - self.chaos_parameters_dictionary = chaos_parameters_dictionary - self.jobs = jobs - - -class ChaosScheduleDescription(Model): - """Defines the Chaos Schedule used by Chaos and the version of the Chaos - Schedule. The version value wraps back to 0 after surpassing 2,147,483,647. - - :param version: The version number of the Schedule. - :type version: int - :param schedule: Defines the schedule used by Chaos. - :type schedule: ~azure.servicefabric.models.ChaosSchedule - """ - - _validation = { - 'version': {'minimum': 0}, - } - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'int'}, - 'schedule': {'key': 'Schedule', 'type': 'ChaosSchedule'}, - } - - def __init__(self, *, version: int=None, schedule=None, **kwargs) -> None: - super(ChaosScheduleDescription, self).__init__(**kwargs) - self.version = version - self.schedule = schedule - - -class ChaosScheduleJob(Model): - """Defines a repetition rule and parameters of Chaos to be used with the Chaos - Schedule. - - :param chaos_parameters: A reference to which Chaos Parameters of the - Chaos Schedule to use. - :type chaos_parameters: str - :param days: Defines the days of the week that a Chaos Schedule Job will - run for. - :type days: ~azure.servicefabric.models.ChaosScheduleJobActiveDaysOfWeek - :param times: A list of Time Ranges that specify when during active days - that this job will run. The times are interpreted as UTC. - :type times: list[~azure.servicefabric.models.TimeRange] - """ - - _attribute_map = { - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'str'}, - 'days': {'key': 'Days', 'type': 'ChaosScheduleJobActiveDaysOfWeek'}, - 'times': {'key': 'Times', 'type': '[TimeRange]'}, - } - - def __init__(self, *, chaos_parameters: str=None, days=None, times=None, **kwargs) -> None: - super(ChaosScheduleJob, self).__init__(**kwargs) - self.chaos_parameters = chaos_parameters - self.days = days - self.times = times - - -class ChaosScheduleJobActiveDaysOfWeek(Model): - """Defines the days of the week that a Chaos Schedule Job will run for. - - :param sunday: Indicates if the Chaos Schedule Job will run on Sunday. - Default value: False . - :type sunday: bool - :param monday: Indicates if the Chaos Schedule Job will run on Monday. - Default value: False . - :type monday: bool - :param tuesday: Indicates if the Chaos Schedule Job will run on Tuesday. - Default value: False . - :type tuesday: bool - :param wednesday: Indicates if the Chaos Schedule Job will run on - Wednesday. Default value: False . - :type wednesday: bool - :param thursday: Indicates if the Chaos Schedule Job will run on Thursday. - Default value: False . - :type thursday: bool - :param friday: Indicates if the Chaos Schedule Job will run on Friday. - Default value: False . - :type friday: bool - :param saturday: Indicates if the Chaos Schedule Job will run on Saturday. - Default value: False . - :type saturday: bool - """ - - _attribute_map = { - 'sunday': {'key': 'Sunday', 'type': 'bool'}, - 'monday': {'key': 'Monday', 'type': 'bool'}, - 'tuesday': {'key': 'Tuesday', 'type': 'bool'}, - 'wednesday': {'key': 'Wednesday', 'type': 'bool'}, - 'thursday': {'key': 'Thursday', 'type': 'bool'}, - 'friday': {'key': 'Friday', 'type': 'bool'}, - 'saturday': {'key': 'Saturday', 'type': 'bool'}, - } - - def __init__(self, *, sunday: bool=False, monday: bool=False, tuesday: bool=False, wednesday: bool=False, thursday: bool=False, friday: bool=False, saturday: bool=False, **kwargs) -> None: - super(ChaosScheduleJobActiveDaysOfWeek, self).__init__(**kwargs) - self.sunday = sunday - self.monday = monday - self.tuesday = tuesday - self.wednesday = wednesday - self.thursday = thursday - self.friday = friday - self.saturday = saturday - - -class ClusterEvent(FabricEvent): - """Represents the base for all Cluster Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ClusterNewHealthReportEvent, - ClusterHealthReportExpiredEvent, ClusterUpgradeCompletedEvent, - ClusterUpgradeDomainCompletedEvent, ClusterUpgradeRollbackCompletedEvent, - ClusterUpgradeRollbackStartedEvent, ClusterUpgradeStartedEvent, - ChaosStoppedEvent, ChaosStartedEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ClusterNewHealthReport': 'ClusterNewHealthReportEvent', 'ClusterHealthReportExpired': 'ClusterHealthReportExpiredEvent', 'ClusterUpgradeCompleted': 'ClusterUpgradeCompletedEvent', 'ClusterUpgradeDomainCompleted': 'ClusterUpgradeDomainCompletedEvent', 'ClusterUpgradeRollbackCompleted': 'ClusterUpgradeRollbackCompletedEvent', 'ClusterUpgradeRollbackStarted': 'ClusterUpgradeRollbackStartedEvent', 'ClusterUpgradeStarted': 'ClusterUpgradeStartedEvent', 'ChaosStopped': 'ChaosStoppedEvent', 'ChaosStarted': 'ChaosStartedEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ClusterEvent' - - -class ChaosStartedEvent(ClusterEvent): - """Chaos Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param max_concurrent_faults: Required. Maximum number of concurrent - faults. - :type max_concurrent_faults: long - :param time_to_run_in_seconds: Required. Time to run in seconds. - :type time_to_run_in_seconds: float - :param max_cluster_stabilization_timeout_in_seconds: Required. Maximum - timeout for cluster stabilization in seconds. - :type max_cluster_stabilization_timeout_in_seconds: float - :param wait_time_between_iterations_in_seconds: Required. Wait time - between iterations in seconds. - :type wait_time_between_iterations_in_seconds: float - :param wait_time_between_faults_in_seconds: Required. Wait time between - faults in seconds. - :type wait_time_between_faults_in_seconds: float - :param move_replica_fault_enabled: Required. Indicates MoveReplica fault - is enabled. - :type move_replica_fault_enabled: bool - :param included_node_type_list: Required. List of included Node types. - :type included_node_type_list: str - :param included_application_list: Required. List of included Applications. - :type included_application_list: str - :param cluster_health_policy: Required. Health policy. - :type cluster_health_policy: str - :param chaos_context: Required. Chaos Context. - :type chaos_context: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'max_concurrent_faults': {'required': True}, - 'time_to_run_in_seconds': {'required': True}, - 'max_cluster_stabilization_timeout_in_seconds': {'required': True}, - 'wait_time_between_iterations_in_seconds': {'required': True}, - 'wait_time_between_faults_in_seconds': {'required': True}, - 'move_replica_fault_enabled': {'required': True}, - 'included_node_type_list': {'required': True}, - 'included_application_list': {'required': True}, - 'cluster_health_policy': {'required': True}, - 'chaos_context': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, - 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'float'}, - 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'float'}, - 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'float'}, - 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'float'}, - 'move_replica_fault_enabled': {'key': 'MoveReplicaFaultEnabled', 'type': 'bool'}, - 'included_node_type_list': {'key': 'IncludedNodeTypeList', 'type': 'str'}, - 'included_application_list': {'key': 'IncludedApplicationList', 'type': 'str'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'str'}, - 'chaos_context': {'key': 'ChaosContext', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, max_concurrent_faults: int, time_to_run_in_seconds: float, max_cluster_stabilization_timeout_in_seconds: float, wait_time_between_iterations_in_seconds: float, wait_time_between_faults_in_seconds: float, move_replica_fault_enabled: bool, included_node_type_list: str, included_application_list: str, cluster_health_policy: str, chaos_context: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.max_concurrent_faults = max_concurrent_faults - self.time_to_run_in_seconds = time_to_run_in_seconds - self.max_cluster_stabilization_timeout_in_seconds = max_cluster_stabilization_timeout_in_seconds - self.wait_time_between_iterations_in_seconds = wait_time_between_iterations_in_seconds - self.wait_time_between_faults_in_seconds = wait_time_between_faults_in_seconds - self.move_replica_fault_enabled = move_replica_fault_enabled - self.included_node_type_list = included_node_type_list - self.included_application_list = included_application_list - self.cluster_health_policy = cluster_health_policy - self.chaos_context = chaos_context - self.kind = 'ChaosStarted' - - -class ChaosStoppedEvent(ClusterEvent): - """Chaos Stopped event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Required. Describes reason. - :type reason: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'reason': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, reason: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosStoppedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.reason = reason - self.kind = 'ChaosStopped' - - -class ChaosTargetFilter(Model): - """Defines all filters for targeted Chaos faults, for example, faulting only - certain node types or faulting only certain applications. - If ChaosTargetFilter is not used, Chaos faults all cluster entities. If - ChaosTargetFilter is used, Chaos faults only the entities that meet the - ChaosTargetFilter - specification. NodeTypeInclusionList and ApplicationInclusionList allow a - union semantics only. It is not possible to specify an intersection - of NodeTypeInclusionList and ApplicationInclusionList. For example, it is - not possible to specify "fault this application only when it is on that - node type." - Once an entity is included in either NodeTypeInclusionList or - ApplicationInclusionList, that entity cannot be excluded using - ChaosTargetFilter. Even if - applicationX does not appear in ApplicationInclusionList, in some Chaos - iteration applicationX can be faulted because it happens to be on a node of - nodeTypeY that is included - in NodeTypeInclusionList. If both NodeTypeInclusionList and - ApplicationInclusionList are null or empty, an ArgumentException is thrown. - - :param node_type_inclusion_list: A list of node types to include in Chaos - faults. - All types of faults (restart node, restart code package, remove replica, - restart replica, move primary, and move secondary) are enabled for the - nodes of these node types. - If a node type (say NodeTypeX) does not appear in the - NodeTypeInclusionList, then node level faults (like NodeRestart) will - never be enabled for the nodes of - NodeTypeX, but code package and replica faults can still be enabled for - NodeTypeX if an application in the ApplicationInclusionList. - happens to reside on a node of NodeTypeX. - At most 100 node type names can be included in this list, to increase this - number, a config upgrade is required for - MaxNumberOfNodeTypesInChaosEntityFilter configuration. - :type node_type_inclusion_list: list[str] - :param application_inclusion_list: A list of application URIs to include - in Chaos faults. - All replicas belonging to services of these applications are amenable to - replica faults (restart replica, remove replica, move primary, and move - secondary) by Chaos. - Chaos may restart a code package only if the code package hosts replicas - of these applications only. - If an application does not appear in this list, it can still be faulted in - some Chaos iteration if the application ends up on a node of a node type - that is included in NodeTypeInclusionList. - However, if applicationX is tied to nodeTypeY through placement - constraints and applicationX is absent from ApplicationInclusionList and - nodeTypeY is absent from NodeTypeInclusionList, then applicationX will - never be faulted. - At most 1000 application names can be included in this list, to increase - this number, a config upgrade is required for - MaxNumberOfApplicationsInChaosEntityFilter configuration. - :type application_inclusion_list: list[str] - """ - - _attribute_map = { - 'node_type_inclusion_list': {'key': 'NodeTypeInclusionList', 'type': '[str]'}, - 'application_inclusion_list': {'key': 'ApplicationInclusionList', 'type': '[str]'}, - } - - def __init__(self, *, node_type_inclusion_list=None, application_inclusion_list=None, **kwargs) -> None: - super(ChaosTargetFilter, self).__init__(**kwargs) - self.node_type_inclusion_list = node_type_inclusion_list - self.application_inclusion_list = application_inclusion_list - - -class PropertyBatchOperation(Model): - """Represents the base type for property operations that can be put into a - batch and submitted. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CheckExistsPropertyBatchOperation, - CheckSequencePropertyBatchOperation, CheckValuePropertyBatchOperation, - DeletePropertyBatchOperation, GetPropertyBatchOperation, - PutPropertyBatchOperation - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'CheckExists': 'CheckExistsPropertyBatchOperation', 'CheckSequence': 'CheckSequencePropertyBatchOperation', 'CheckValue': 'CheckValuePropertyBatchOperation', 'Delete': 'DeletePropertyBatchOperation', 'Get': 'GetPropertyBatchOperation', 'Put': 'PutPropertyBatchOperation'} - } - - def __init__(self, *, property_name: str, **kwargs) -> None: - super(PropertyBatchOperation, self).__init__(**kwargs) - self.property_name = property_name - self.kind = None - - -class CheckExistsPropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that compares the Boolean existence of - a property with the Exists argument. - The PropertyBatchOperation operation fails if the property's existence is - not equal to the Exists argument. - The CheckExistsPropertyBatchOperation is generally used as a precondition - for the write operations in the batch. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param exists: Required. Whether or not the property should exist for the - operation to pass. - :type exists: bool - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'exists': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'exists': {'key': 'Exists', 'type': 'bool'}, - } - - def __init__(self, *, property_name: str, exists: bool, **kwargs) -> None: - super(CheckExistsPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.exists = exists - self.kind = 'CheckExists' - - -class CheckSequencePropertyBatchOperation(PropertyBatchOperation): - """Compares the Sequence Number of a property with the SequenceNumber - argument. - A property's sequence number can be thought of as that property's version. - Every time the property is modified, its sequence number is increased. - The sequence number can be found in a property's metadata. - The comparison fails if the sequence numbers are not equal. - CheckSequencePropertyBatchOperation is generally used as a precondition for - the write operations in the batch. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param sequence_number: Required. The expected sequence number. - :type sequence_number: str - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'sequence_number': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - } - - def __init__(self, *, property_name: str, sequence_number: str, **kwargs) -> None: - super(CheckSequencePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.sequence_number = sequence_number - self.kind = 'CheckSequence' - - -class CheckValuePropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that compares the value of the property - with the expected value. - The CheckValuePropertyBatchOperation is generally used as a precondition - for the write operations in the batch. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param value: Required. The expected property value. - :type value: ~azure.servicefabric.models.PropertyValue - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - } - - def __init__(self, *, property_name: str, value, **kwargs) -> None: - super(CheckValuePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.value = value - self.kind = 'CheckValue' - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class ClusterConfiguration(Model): - """Information about the standalone cluster configuration. - - :param cluster_configuration: The contents of the cluster configuration - file. - :type cluster_configuration: str - """ - - _attribute_map = { - 'cluster_configuration': {'key': 'ClusterConfiguration', 'type': 'str'}, - } - - def __init__(self, *, cluster_configuration: str=None, **kwargs) -> None: - super(ClusterConfiguration, self).__init__(**kwargs) - self.cluster_configuration = cluster_configuration - - -class ClusterConfigurationUpgradeDescription(Model): - """Describes the parameters for a standalone cluster configuration upgrade. - - All required parameters must be populated in order to send to Azure. - - :param cluster_config: Required. The cluster configuration as a JSON - string. For example, [this - file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) - contains JSON describing the [nodes and other properties of the - cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). - :type cluster_config: str - :param health_check_retry_timeout: The length of time between attempts to - perform health checks if the application or cluster is not healthy. - Default value: "PT0H0M0S" . - :type health_check_retry_timeout: timedelta - :param health_check_wait_duration_in_seconds: The length of time to wait - after completing an upgrade domain before starting the health checks - process. Default value: "PT0H0M0S" . - :type health_check_wait_duration_in_seconds: timedelta - :param health_check_stable_duration_in_seconds: The length of time that - the application or cluster must remain healthy before the upgrade proceeds - to the next upgrade domain. Default value: "PT0H0M0S" . - :type health_check_stable_duration_in_seconds: timedelta - :param upgrade_domain_timeout_in_seconds: The timeout for the upgrade - domain. Default value: "PT0H0M0S" . - :type upgrade_domain_timeout_in_seconds: timedelta - :param upgrade_timeout_in_seconds: The upgrade timeout. Default value: - "PT0H0M0S" . - :type upgrade_timeout_in_seconds: timedelta - :param max_percent_unhealthy_applications: The maximum allowed percentage - of unhealthy applications during the upgrade. Allowed values are integer - values from zero to 100. Default value: 0 . - :type max_percent_unhealthy_applications: int - :param max_percent_unhealthy_nodes: The maximum allowed percentage of - unhealthy nodes during the upgrade. Allowed values are integer values from - zero to 100. Default value: 0 . - :type max_percent_unhealthy_nodes: int - :param max_percent_delta_unhealthy_nodes: The maximum allowed percentage - of delta health degradation during the upgrade. Allowed values are integer - values from zero to 100. Default value: 0 . - :type max_percent_delta_unhealthy_nodes: int - :param max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum - allowed percentage of upgrade domain delta health degradation during the - upgrade. Allowed values are integer values from zero to 100. Default - value: 0 . - :type max_percent_upgrade_domain_delta_unhealthy_nodes: int - :param application_health_policies: Defines the application health policy - map used to evaluate the health of an application or one of its children - entities. - :type application_health_policies: - ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _validation = { - 'cluster_config': {'required': True}, - } - - _attribute_map = { - 'cluster_config': {'key': 'ClusterConfig', 'type': 'str'}, - 'health_check_retry_timeout': {'key': 'HealthCheckRetryTimeout', 'type': 'duration'}, - 'health_check_wait_duration_in_seconds': {'key': 'HealthCheckWaitDurationInSeconds', 'type': 'duration'}, - 'health_check_stable_duration_in_seconds': {'key': 'HealthCheckStableDurationInSeconds', 'type': 'duration'}, - 'upgrade_domain_timeout_in_seconds': {'key': 'UpgradeDomainTimeoutInSeconds', 'type': 'duration'}, - 'upgrade_timeout_in_seconds': {'key': 'UpgradeTimeoutInSeconds', 'type': 'duration'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, - 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__(self, *, cluster_config: str, health_check_retry_timeout="PT0H0M0S", health_check_wait_duration_in_seconds="PT0H0M0S", health_check_stable_duration_in_seconds="PT0H0M0S", upgrade_domain_timeout_in_seconds="PT0H0M0S", upgrade_timeout_in_seconds="PT0H0M0S", max_percent_unhealthy_applications: int=0, max_percent_unhealthy_nodes: int=0, max_percent_delta_unhealthy_nodes: int=0, max_percent_upgrade_domain_delta_unhealthy_nodes: int=0, application_health_policies=None, **kwargs) -> None: - super(ClusterConfigurationUpgradeDescription, self).__init__(**kwargs) - self.cluster_config = cluster_config - self.health_check_retry_timeout = health_check_retry_timeout - self.health_check_wait_duration_in_seconds = health_check_wait_duration_in_seconds - self.health_check_stable_duration_in_seconds = health_check_stable_duration_in_seconds - self.upgrade_domain_timeout_in_seconds = upgrade_domain_timeout_in_seconds - self.upgrade_timeout_in_seconds = upgrade_timeout_in_seconds - self.max_percent_unhealthy_applications = max_percent_unhealthy_applications - self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes - self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes - self.max_percent_upgrade_domain_delta_unhealthy_nodes = max_percent_upgrade_domain_delta_unhealthy_nodes - self.application_health_policies = application_health_policies - - -class ClusterConfigurationUpgradeStatusInfo(Model): - """Information about a standalone cluster configuration upgrade status. - - :param upgrade_state: The state of the upgrade domain. Possible values - include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', - 'RollingForwardPending', 'RollingForwardInProgress', - 'RollingForwardCompleted', 'Failed' - :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :param progress_status: The cluster manifest version. - :type progress_status: int - :param config_version: The cluster configuration version. - :type config_version: str - :param details: The cluster upgrade status details. - :type details: str - """ - - _attribute_map = { - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'progress_status': {'key': 'ProgressStatus', 'type': 'int'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'details': {'key': 'Details', 'type': 'str'}, - } - - def __init__(self, *, upgrade_state=None, progress_status: int=None, config_version: str=None, details: str=None, **kwargs) -> None: - super(ClusterConfigurationUpgradeStatusInfo, self).__init__(**kwargs) - self.upgrade_state = upgrade_state - self.progress_status = progress_status - self.config_version = config_version - self.details = details - - -class ClusterHealth(EntityHealth): - """Represents the health of the cluster. - Contains the cluster aggregated health state, the cluster application and - node health states as well as the health events and the unhealthy - evaluations. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param node_health_states: Cluster node health states as found in the - health store. - :type node_health_states: - list[~azure.servicefabric.models.NodeHealthState] - :param application_health_states: Cluster application health states as - found in the health store. - :type application_health_states: - list[~azure.servicefabric.models.ApplicationHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'node_health_states': {'key': 'NodeHealthStates', 'type': '[NodeHealthState]'}, - 'application_health_states': {'key': 'ApplicationHealthStates', 'type': '[ApplicationHealthState]'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, node_health_states=None, application_health_states=None, **kwargs) -> None: - super(ClusterHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.node_health_states = node_health_states - self.application_health_states = application_health_states - - -class ClusterHealthChunk(Model): - """Represents the health chunk of the cluster. - Contains the cluster aggregated health state, and the cluster entities that - respect the input filter. - - :param health_state: The HealthState representing the aggregated health - state of the cluster computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired cluster health policy and - the application health policies. Possible values include: 'Invalid', 'Ok', - 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_health_state_chunks: The list of node health state chunks in - the cluster that respect the filters in the cluster health chunk query - description. - :type node_health_state_chunks: - ~azure.servicefabric.models.NodeHealthStateChunkList - :param application_health_state_chunks: The list of application health - state chunks in the cluster that respect the filters in the cluster health - chunk query description. - :type application_health_state_chunks: - ~azure.servicefabric.models.ApplicationHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_health_state_chunks': {'key': 'NodeHealthStateChunks', 'type': 'NodeHealthStateChunkList'}, - 'application_health_state_chunks': {'key': 'ApplicationHealthStateChunks', 'type': 'ApplicationHealthStateChunkList'}, - } - - def __init__(self, *, health_state=None, node_health_state_chunks=None, application_health_state_chunks=None, **kwargs) -> None: - super(ClusterHealthChunk, self).__init__(**kwargs) - self.health_state = health_state - self.node_health_state_chunks = node_health_state_chunks - self.application_health_state_chunks = application_health_state_chunks - - -class ClusterHealthChunkQueryDescription(Model): - """The cluster health chunk query description, which can specify the health - policies to evaluate cluster health and very expressive filters to select - which cluster entities to include in response. - - :param node_filters: Defines a list of filters that specify which nodes to - be included in the returned cluster health chunk. - If no filters are specified, no nodes are returned. All the nodes are used - to evaluate the cluster's aggregated health state, regardless of the input - filters. - The cluster health chunk query may specify multiple node filters. - For example, it can specify a filter to return all nodes with health state - Error and another filter to always include a node identified by its - NodeName. - :type node_filters: - list[~azure.servicefabric.models.NodeHealthStateFilter] - :param application_filters: Defines a list of filters that specify which - applications to be included in the returned cluster health chunk. - If no filters are specified, no applications are returned. All the - applications are used to evaluate the cluster's aggregated health state, - regardless of the input filters. - The cluster health chunk query may specify multiple application filters. - For example, it can specify a filter to return all applications with - health state Error and another filter to always include applications of a - specified application type. - :type application_filters: - list[~azure.servicefabric.models.ApplicationHealthStateFilter] - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param application_health_policies: Defines the application health policy - map used to evaluate the health of an application or one of its children - entities. - :type application_health_policies: - ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _attribute_map = { - 'node_filters': {'key': 'NodeFilters', 'type': '[NodeHealthStateFilter]'}, - 'application_filters': {'key': 'ApplicationFilters', 'type': '[ApplicationHealthStateFilter]'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__(self, *, node_filters=None, application_filters=None, cluster_health_policy=None, application_health_policies=None, **kwargs) -> None: - super(ClusterHealthChunkQueryDescription, self).__init__(**kwargs) - self.node_filters = node_filters - self.application_filters = application_filters - self.cluster_health_policy = cluster_health_policy - self.application_health_policies = application_health_policies - - -class ClusterHealthPolicies(Model): - """Health policies to evaluate cluster health. - - :param application_health_policy_map: Defines a map that contains specific - application health policies for different applications. - Each entry specifies as key the application name and as value an - ApplicationHealthPolicy used to evaluate the application health. - If an application is not specified in the map, the application health - evaluation uses the ApplicationHealthPolicy found in its application - manifest or the default application health policy (if no health policy is - defined in the manifest). - The map is empty by default. - :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - } - - def __init__(self, *, application_health_policy_map=None, cluster_health_policy=None, **kwargs) -> None: - super(ClusterHealthPolicies, self).__init__(**kwargs) - self.application_health_policy_map = application_health_policy_map - self.cluster_health_policy = cluster_health_policy - - -class ClusterHealthPolicy(Model): - """Defines a health policy used to evaluate the health of the cluster or of a - cluster node. - - :param consider_warning_as_error: Indicates whether warnings are treated - with the same severity as errors. Default value: False . - :type consider_warning_as_error: bool - :param max_percent_unhealthy_nodes: The maximum allowed percentage of - unhealthy nodes before reporting an error. For example, to allow 10% of - nodes to be unhealthy, this value would be 10. - The percentage represents the maximum tolerated percentage of nodes that - can be unhealthy before the cluster is considered in error. - If the percentage is respected but there is at least one unhealthy node, - the health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy nodes - over the total number of nodes in the cluster. - The computation rounds up to tolerate one failure on small numbers of - nodes. Default percentage is zero. - In large clusters, some nodes will always be down or out for repairs, so - this percentage should be configured to tolerate that. Default value: 0 . - :type max_percent_unhealthy_nodes: int - :param max_percent_unhealthy_applications: The maximum allowed percentage - of unhealthy applications before reporting an error. For example, to allow - 10% of applications to be unhealthy, this value would be 10. - The percentage represents the maximum tolerated percentage of applications - that can be unhealthy before the cluster is considered in error. - If the percentage is respected but there is at least one unhealthy - application, the health is evaluated as Warning. - This is calculated by dividing the number of unhealthy applications over - the total number of application instances in the cluster, excluding - applications of application types that are included in the - ApplicationTypeHealthPolicyMap. - The computation rounds up to tolerate one failure on small numbers of - applications. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_applications: int - :param application_type_health_policy_map: Defines a map with max - percentage unhealthy applications for specific application types. - Each entry specifies as key the application type name and as value an - integer that represents the MaxPercentUnhealthyApplications percentage - used to evaluate the applications of the specified application type. - The application type health policy map can be used during cluster health - evaluation to describe special application types. - The application types included in the map are evaluated against the - percentage specified in the map, and not with the global - MaxPercentUnhealthyApplications defined in the cluster health policy. - The applications of application types specified in the map are not counted - against the global pool of applications. - For example, if some applications of a type are critical, the cluster - administrator can add an entry to the map for that application type - and assign it a value of 0% (that is, do not tolerate any failures). - All other applications can be evaluated with - MaxPercentUnhealthyApplications set to 20% to tolerate some failures out - of the thousands of application instances. - The application type health policy map is used only if the cluster - manifest enables application type health evaluation using the - configuration entry for - HealthManager/EnableApplicationTypeHealthEvaluation. - :type application_type_health_policy_map: - list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] - :param node_type_health_policy_map: Defines a map with max percentage - unhealthy nodes for specific node types. - Each entry specifies as key the node type name and as value an integer - that represents the MaxPercentUnhealthyNodes percentage used to evaluate - the nodes of the specified node type. - The node type health policy map can be used during cluster health - evaluation to describe special node types. - They are evaluated against the percentages associated with their node type - name in the map. - Setting this has no impact on the global pool of nodes used for - MaxPercentUnhealthyNodes. - The node type health policy map is used only if the cluster manifest - enables node type health evaluation using the configuration entry for - HealthManager/EnableNodeTypeHealthEvaluation. - For example, given a cluster with many nodes of different types, with - important work hosted on node type "SpecialNodeType" that should not - tolerate any nodes down. - You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some - failures for all nodes, but for the node type "SpecialNodeType", set the - MaxPercentUnhealthyNodes to 0 by - setting the value in the key value pair in NodeTypeHealthPolicyMapItem. - The key is the node type name. - This way, as long as no nodes of type "SpecialNodeType" are in Error - state, - even if some of the many nodes in the global pool are in Error state, but - below the global unhealthy percentage, the cluster would be evaluated to - Warning. - A Warning health state does not impact cluster upgrade or other monitoring - triggered by Error health state. - But even one node of type SpecialNodeType in Error would make cluster - unhealthy (in Error rather than Warning/Ok), which triggers rollback or - pauses the cluster upgrade, depending on the upgrade configuration. - Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting - SpecialNodeType's max percent unhealthy nodes to 100, - with one node of type SpecialNodeType in Error state would still put the - cluster in an Error state, since the global restriction is more strict in - this case. - :type node_type_health_policy_map: - list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] - """ - - _attribute_map = { - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'application_type_health_policy_map': {'key': 'ApplicationTypeHealthPolicyMap', 'type': '[ApplicationTypeHealthPolicyMapItem]'}, - 'node_type_health_policy_map': {'key': 'NodeTypeHealthPolicyMap', 'type': '[NodeTypeHealthPolicyMapItem]'}, - } - - def __init__(self, *, consider_warning_as_error: bool=False, max_percent_unhealthy_nodes: int=0, max_percent_unhealthy_applications: int=0, application_type_health_policy_map=None, node_type_health_policy_map=None, **kwargs) -> None: - super(ClusterHealthPolicy, self).__init__(**kwargs) - self.consider_warning_as_error = consider_warning_as_error - self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes - self.max_percent_unhealthy_applications = max_percent_unhealthy_applications - self.application_type_health_policy_map = application_type_health_policy_map - self.node_type_health_policy_map = node_type_health_policy_map - - -class ClusterHealthReportExpiredEvent(ClusterEvent): - """Cluster Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ClusterHealthReportExpired' - - -class ClusterLoadInfo(Model): - """Information about load in a Service Fabric cluster. It holds a summary of - all metrics and their load in a cluster. - - :param last_balancing_start_time_utc: The starting time of last resource - balancing run. - :type last_balancing_start_time_utc: datetime - :param last_balancing_end_time_utc: The end time of last resource - balancing run. - :type last_balancing_end_time_utc: datetime - :param load_metric_information: List that contains metrics and their load - information in this cluster. - :type load_metric_information: - list[~azure.servicefabric.models.LoadMetricInformation] - """ - - _attribute_map = { - 'last_balancing_start_time_utc': {'key': 'LastBalancingStartTimeUtc', 'type': 'iso-8601'}, - 'last_balancing_end_time_utc': {'key': 'LastBalancingEndTimeUtc', 'type': 'iso-8601'}, - 'load_metric_information': {'key': 'LoadMetricInformation', 'type': '[LoadMetricInformation]'}, - } - - def __init__(self, *, last_balancing_start_time_utc=None, last_balancing_end_time_utc=None, load_metric_information=None, **kwargs) -> None: - super(ClusterLoadInfo, self).__init__(**kwargs) - self.last_balancing_start_time_utc = last_balancing_start_time_utc - self.last_balancing_end_time_utc = last_balancing_end_time_utc - self.load_metric_information = load_metric_information - - -class ClusterManifest(Model): - """Information about the cluster manifest. - - :param manifest: The contents of the cluster manifest file. - :type manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__(self, *, manifest: str=None, **kwargs) -> None: - super(ClusterManifest, self).__init__(**kwargs) - self.manifest = manifest - - -class ClusterNewHealthReportEvent(ClusterEvent): - """Cluster Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ClusterNewHealthReport' - - -class ClusterUpgradeCompletedEvent(ClusterEvent): - """Cluster Upgrade Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of - upgrade in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterUpgradeCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.target_cluster_version = target_cluster_version - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ClusterUpgradeCompleted' - - -class ClusterUpgradeDescriptionObject(Model): - """Represents a ServiceFabric cluster upgrade. - - :param config_version: The cluster configuration version (specified in the - cluster manifest). - :type config_version: str - :param code_version: The ServiceFabric code version of the cluster. - :type code_version: str - :param upgrade_kind: The kind of upgrade out of the following possible - values. Possible values include: 'Invalid', 'Rolling'. Default value: - "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param sort_order: Defines the order in which an upgrade proceeds through - the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', - 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default - value: "Default" . - :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :param enable_delta_health_evaluation: When true, enables delta health - evaluation rather than absolute health evaluation after completion of each - upgrade domain. - :type enable_delta_health_evaluation: bool - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param cluster_upgrade_health_policy: Defines a health policy used to - evaluate the health of the cluster during a cluster upgrade. - :type cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :param application_health_policy_map: Represents the map of application - health policies for a ServiceFabric cluster upgrade - :type application_health_policy_map: - ~azure.servicefabric.models.ApplicationHealthPolicyMapObject - """ - - _attribute_map = { - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicyMapObject'}, - } - - def __init__(self, *, config_version: str=None, code_version: str=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", enable_delta_health_evaluation: bool=None, monitoring_policy=None, cluster_health_policy=None, cluster_upgrade_health_policy=None, application_health_policy_map=None, **kwargs) -> None: - super(ClusterUpgradeDescriptionObject, self).__init__(**kwargs) - self.config_version = config_version - self.code_version = code_version - self.upgrade_kind = upgrade_kind - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.force_restart = force_restart - self.sort_order = sort_order - self.enable_delta_health_evaluation = enable_delta_health_evaluation - self.monitoring_policy = monitoring_policy - self.cluster_health_policy = cluster_health_policy - self.cluster_upgrade_health_policy = cluster_upgrade_health_policy - self.application_health_policy_map = application_health_policy_map - - -class ClusterUpgradeDomainCompletedEvent(ClusterEvent): - """Cluster Upgrade Domain Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param upgrade_state: Required. State of upgrade. - :type upgrade_state: str - :param upgrade_domains: Required. Upgrade domains. - :type upgrade_domains: str - :param upgrade_domain_elapsed_time_in_ms: Required. Duration of domain - upgrade in milli-seconds. - :type upgrade_domain_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'upgrade_state': {'required': True}, - 'upgrade_domains': {'required': True}, - 'upgrade_domain_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, - 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, upgrade_state: str, upgrade_domains: str, upgrade_domain_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterUpgradeDomainCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.target_cluster_version = target_cluster_version - self.upgrade_state = upgrade_state - self.upgrade_domains = upgrade_domains - self.upgrade_domain_elapsed_time_in_ms = upgrade_domain_elapsed_time_in_ms - self.kind = 'ClusterUpgradeDomainCompleted' - - -class ClusterUpgradeHealthPolicyObject(Model): - """Defines a health policy used to evaluate the health of the cluster during a - cluster upgrade. - - :param max_percent_delta_unhealthy_nodes: The maximum allowed percentage - of nodes health degradation allowed during cluster upgrades. The delta is - measured between the state of the nodes at the beginning of upgrade and - the state of the nodes at the time of the health evaluation. The check is - performed after every upgrade domain upgrade completion to make sure the - global state of the cluster is within tolerated limits. The default value - is 10%. - :type max_percent_delta_unhealthy_nodes: int - :param max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum - allowed percentage of upgrade domain nodes health degradation allowed - during cluster upgrades. The delta is measured between the state of the - upgrade domain nodes at the beginning of upgrade and the state of the - upgrade domain nodes at the time of the health evaluation. The check is - performed after every upgrade domain upgrade completion for all completed - upgrade domains to make sure the state of the upgrade domains is within - tolerated limits. The default value is 15%. - :type max_percent_upgrade_domain_delta_unhealthy_nodes: int - """ - - _validation = { - 'max_percent_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, - } - - def __init__(self, *, max_percent_delta_unhealthy_nodes: int=None, max_percent_upgrade_domain_delta_unhealthy_nodes: int=None, **kwargs) -> None: - super(ClusterUpgradeHealthPolicyObject, self).__init__(**kwargs) - self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes - self.max_percent_upgrade_domain_delta_unhealthy_nodes = max_percent_upgrade_domain_delta_unhealthy_nodes - - -class ClusterUpgradeProgressObject(Model): - """Information about a cluster upgrade. - - :param code_version: The ServiceFabric code version of the cluster. - :type code_version: str - :param config_version: The cluster configuration version (specified in the - cluster manifest). - :type config_version: str - :param upgrade_domains: List of upgrade domains and their statuses. - :type upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] - :param upgrade_state: The state of the upgrade domain. Possible values - include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', - 'RollingForwardPending', 'RollingForwardInProgress', - 'RollingForwardCompleted', 'Failed' - :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :param next_upgrade_domain: The name of the next upgrade domain to be - processed. - :type next_upgrade_domain: str - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_description: Represents a ServiceFabric cluster upgrade - :type upgrade_description: - ~azure.servicefabric.models.ClusterUpgradeDescriptionObject - :param upgrade_duration_in_milliseconds: The estimated elapsed time spent - processing the current overall upgrade. - :type upgrade_duration_in_milliseconds: str - :param upgrade_domain_duration_in_milliseconds: The estimated elapsed time - spent processing the current upgrade domain. - :type upgrade_domain_duration_in_milliseconds: str - :param unhealthy_evaluations: List of health evaluations that resulted in - the current aggregated health state. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param current_upgrade_domain_progress: Information about the current - in-progress upgrade domain. - :type current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :param start_timestamp_utc: The start time of the upgrade in UTC. - :type start_timestamp_utc: str - :param failure_timestamp_utc: The failure time of the upgrade in UTC. - :type failure_timestamp_utc: str - :param failure_reason: The cause of an upgrade failure that resulted in - FailureAction being executed. Possible values include: 'None', - 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', - 'OverallUpgradeTimeout' - :type failure_reason: str or ~azure.servicefabric.models.FailureReason - :param upgrade_domain_progress_at_failure: The detailed upgrade progress - for nodes in the current upgrade domain at the point of failure. - :type upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailedUpgradeDomainProgressObject - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ClusterUpgradeDescriptionObject'}, - 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, - 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailedUpgradeDomainProgressObject'}, - } - - def __init__(self, *, code_version: str=None, config_version: str=None, upgrade_domains=None, upgrade_state=None, next_upgrade_domain: str=None, rolling_upgrade_mode="UnmonitoredAuto", upgrade_description=None, upgrade_duration_in_milliseconds: str=None, upgrade_domain_duration_in_milliseconds: str=None, unhealthy_evaluations=None, current_upgrade_domain_progress=None, start_timestamp_utc: str=None, failure_timestamp_utc: str=None, failure_reason=None, upgrade_domain_progress_at_failure=None, **kwargs) -> None: - super(ClusterUpgradeProgressObject, self).__init__(**kwargs) - self.code_version = code_version - self.config_version = config_version - self.upgrade_domains = upgrade_domains - self.upgrade_state = upgrade_state - self.next_upgrade_domain = next_upgrade_domain - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_description = upgrade_description - self.upgrade_duration_in_milliseconds = upgrade_duration_in_milliseconds - self.upgrade_domain_duration_in_milliseconds = upgrade_domain_duration_in_milliseconds - self.unhealthy_evaluations = unhealthy_evaluations - self.current_upgrade_domain_progress = current_upgrade_domain_progress - self.start_timestamp_utc = start_timestamp_utc - self.failure_timestamp_utc = failure_timestamp_utc - self.failure_reason = failure_reason - self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure - - -class ClusterUpgradeRollbackCompletedEvent(ClusterEvent): - """Cluster Upgrade Rollback Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param failure_reason: Required. Describes failure. - :type failure_reason: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of - upgrade in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterUpgradeRollbackCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.target_cluster_version = target_cluster_version - self.failure_reason = failure_reason - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ClusterUpgradeRollbackCompleted' - - -class ClusterUpgradeRollbackStartedEvent(ClusterEvent): - """Cluster Upgrade Rollback Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param failure_reason: Required. Describes failure. - :type failure_reason: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of - upgrade in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterUpgradeRollbackStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.target_cluster_version = target_cluster_version - self.failure_reason = failure_reason - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ClusterUpgradeRollbackStarted' - - -class ClusterUpgradeStartedEvent(ClusterEvent): - """Cluster Upgrade Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param current_cluster_version: Required. Current Cluster version. - :type current_cluster_version: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param upgrade_type: Required. Type of upgrade. - :type upgrade_type: str - :param rolling_upgrade_mode: Required. Mode of upgrade. - :type rolling_upgrade_mode: str - :param failure_action: Required. Action if failed. - :type failure_action: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'current_cluster_version': {'required': True}, - 'target_cluster_version': {'required': True}, - 'upgrade_type': {'required': True}, - 'rolling_upgrade_mode': {'required': True}, - 'failure_action': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'current_cluster_version': {'key': 'CurrentClusterVersion', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, current_cluster_version: str, target_cluster_version: str, upgrade_type: str, rolling_upgrade_mode: str, failure_action: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterUpgradeStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.current_cluster_version = current_cluster_version - self.target_cluster_version = target_cluster_version - self.upgrade_type = upgrade_type - self.rolling_upgrade_mode = rolling_upgrade_mode - self.failure_action = failure_action - self.kind = 'ClusterUpgradeStarted' - - -class ClusterVersion(Model): - """The cluster version. - - :param version: The Service Fabric cluster runtime version. - :type version: str - """ - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, *, version: str=None, **kwargs) -> None: - super(ClusterVersion, self).__init__(**kwargs) - self.version = version - - -class CodePackageEntryPoint(Model): - """Information about setup or main entry point of a code package deployed on a - Service Fabric node. - - :param entry_point_location: The location of entry point executable on the - node. - :type entry_point_location: str - :param process_id: The process ID of the entry point. - :type process_id: str - :param run_as_user_name: The user name under which entry point executable - is run on the node. - :type run_as_user_name: str - :param code_package_entry_point_statistics: Statistics about setup or main - entry point of a code package deployed on a Service Fabric node. - :type code_package_entry_point_statistics: - ~azure.servicefabric.models.CodePackageEntryPointStatistics - :param status: Specifies the status of the code package entry point - deployed on a Service Fabric node. Possible values include: 'Invalid', - 'Pending', 'Starting', 'Started', 'Stopping', 'Stopped' - :type status: str or ~azure.servicefabric.models.EntryPointStatus - :param next_activation_time: The time (in UTC) when the entry point - executable will be run next. - :type next_activation_time: datetime - :param instance_id: The instance ID for current running entry point. For a - code package setup entry point (if specified) runs first and after it - finishes main entry point is started. Each time entry point executable is - run, its instance id will change. - :type instance_id: str - """ - - _attribute_map = { - 'entry_point_location': {'key': 'EntryPointLocation', 'type': 'str'}, - 'process_id': {'key': 'ProcessId', 'type': 'str'}, - 'run_as_user_name': {'key': 'RunAsUserName', 'type': 'str'}, - 'code_package_entry_point_statistics': {'key': 'CodePackageEntryPointStatistics', 'type': 'CodePackageEntryPointStatistics'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'next_activation_time': {'key': 'NextActivationTime', 'type': 'iso-8601'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, *, entry_point_location: str=None, process_id: str=None, run_as_user_name: str=None, code_package_entry_point_statistics=None, status=None, next_activation_time=None, instance_id: str=None, **kwargs) -> None: - super(CodePackageEntryPoint, self).__init__(**kwargs) - self.entry_point_location = entry_point_location - self.process_id = process_id - self.run_as_user_name = run_as_user_name - self.code_package_entry_point_statistics = code_package_entry_point_statistics - self.status = status - self.next_activation_time = next_activation_time - self.instance_id = instance_id - - -class CodePackageEntryPointStatistics(Model): - """Statistics about setup or main entry point of a code package deployed on a - Service Fabric node. - - :param last_exit_code: The last exit code of the entry point. - :type last_exit_code: str - :param last_activation_time: The last time (in UTC) when Service Fabric - attempted to run the entry point. - :type last_activation_time: datetime - :param last_exit_time: The last time (in UTC) when the entry point - finished running. - :type last_exit_time: datetime - :param last_successful_activation_time: The last time (in UTC) when the - entry point ran successfully. - :type last_successful_activation_time: datetime - :param last_successful_exit_time: The last time (in UTC) when the entry - point finished running gracefully. - :type last_successful_exit_time: datetime - :param activation_count: Number of times the entry point has run. - :type activation_count: str - :param activation_failure_count: Number of times the entry point failed to - run. - :type activation_failure_count: str - :param continuous_activation_failure_count: Number of times the entry - point continuously failed to run. - :type continuous_activation_failure_count: str - :param exit_count: Number of times the entry point finished running. - :type exit_count: str - :param exit_failure_count: Number of times the entry point failed to exit - gracefully. - :type exit_failure_count: str - :param continuous_exit_failure_count: Number of times the entry point - continuously failed to exit gracefully. - :type continuous_exit_failure_count: str - """ - - _attribute_map = { - 'last_exit_code': {'key': 'LastExitCode', 'type': 'str'}, - 'last_activation_time': {'key': 'LastActivationTime', 'type': 'iso-8601'}, - 'last_exit_time': {'key': 'LastExitTime', 'type': 'iso-8601'}, - 'last_successful_activation_time': {'key': 'LastSuccessfulActivationTime', 'type': 'iso-8601'}, - 'last_successful_exit_time': {'key': 'LastSuccessfulExitTime', 'type': 'iso-8601'}, - 'activation_count': {'key': 'ActivationCount', 'type': 'str'}, - 'activation_failure_count': {'key': 'ActivationFailureCount', 'type': 'str'}, - 'continuous_activation_failure_count': {'key': 'ContinuousActivationFailureCount', 'type': 'str'}, - 'exit_count': {'key': 'ExitCount', 'type': 'str'}, - 'exit_failure_count': {'key': 'ExitFailureCount', 'type': 'str'}, - 'continuous_exit_failure_count': {'key': 'ContinuousExitFailureCount', 'type': 'str'}, - } - - def __init__(self, *, last_exit_code: str=None, last_activation_time=None, last_exit_time=None, last_successful_activation_time=None, last_successful_exit_time=None, activation_count: str=None, activation_failure_count: str=None, continuous_activation_failure_count: str=None, exit_count: str=None, exit_failure_count: str=None, continuous_exit_failure_count: str=None, **kwargs) -> None: - super(CodePackageEntryPointStatistics, self).__init__(**kwargs) - self.last_exit_code = last_exit_code - self.last_activation_time = last_activation_time - self.last_exit_time = last_exit_time - self.last_successful_activation_time = last_successful_activation_time - self.last_successful_exit_time = last_successful_exit_time - self.activation_count = activation_count - self.activation_failure_count = activation_failure_count - self.continuous_activation_failure_count = continuous_activation_failure_count - self.exit_count = exit_count - self.exit_failure_count = exit_failure_count - self.continuous_exit_failure_count = continuous_exit_failure_count - - -class ComposeDeploymentStatusInfo(Model): - """Information about a Service Fabric compose deployment. - - :param name: The name of the deployment. - :type name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param status: The status of the compose deployment. Possible values - include: 'Invalid', 'Provisioning', 'Creating', 'Ready', 'Unprovisioning', - 'Deleting', 'Failed', 'Upgrading' - :type status: str or ~azure.servicefabric.models.ComposeDeploymentStatus - :param status_details: The status details of compose deployment including - failure message. - :type status_details: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, application_name: str=None, status=None, status_details: str=None, **kwargs) -> None: - super(ComposeDeploymentStatusInfo, self).__init__(**kwargs) - self.name = name - self.application_name = application_name - self.status = status - self.status_details = status_details - - -class ComposeDeploymentUpgradeDescription(Model): - """Describes the parameters for a compose deployment upgrade. - - All required parameters must be populated in order to send to Azure. - - :param deployment_name: Required. The name of the deployment. - :type deployment_name: str - :param compose_file_content: Required. The content of the compose file - that describes the deployment to create. - :type compose_file_content: str - :param registry_credential: Credential information to connect to container - registry. - :type registry_credential: ~azure.servicefabric.models.RegistryCredential - :param upgrade_kind: Required. The kind of upgrade out of the following - possible values. Possible values include: 'Invalid', 'Rolling'. Default - value: "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - """ - - _validation = { - 'deployment_name': {'required': True}, - 'compose_file_content': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, - 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - } - - def __init__(self, *, deployment_name: str, compose_file_content: str, registry_credential=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, monitoring_policy=None, application_health_policy=None, **kwargs) -> None: - super(ComposeDeploymentUpgradeDescription, self).__init__(**kwargs) - self.deployment_name = deployment_name - self.compose_file_content = compose_file_content - self.registry_credential = registry_credential - self.upgrade_kind = upgrade_kind - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.force_restart = force_restart - self.monitoring_policy = monitoring_policy - self.application_health_policy = application_health_policy - - -class ComposeDeploymentUpgradeProgressInfo(Model): - """Describes the parameters for a compose deployment upgrade. - - :param deployment_name: The name of the target deployment. - :type deployment_name: str - :param application_name: The name of the target application, including the - 'fabric:' URI scheme. - :type application_name: str - :param upgrade_state: The state of the compose deployment upgrade. - Possible values include: 'Invalid', 'ProvisioningTarget', - 'RollingForwardInProgress', 'RollingForwardPending', - 'UnprovisioningCurrent', 'RollingForwardCompleted', - 'RollingBackInProgress', 'UnprovisioningTarget', 'RollingBackCompleted', - 'Failed' - :type upgrade_state: str or - ~azure.servicefabric.models.ComposeDeploymentUpgradeState - :param upgrade_status_details: Additional detailed information about the - status of the pending upgrade. - :type upgrade_status_details: str - :param upgrade_kind: The kind of upgrade out of the following possible - values. Possible values include: 'Invalid', 'Rolling'. Default value: - "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param target_application_type_version: The target application type - version (found in the application manifest) for the application upgrade. - :type target_application_type_version: str - :param upgrade_duration: The estimated amount of time that the overall - upgrade elapsed. It is first interpreted as a string representing an ISO - 8601 duration. If that fails, then it is interpreted as a number - representing the total number of milliseconds. - :type upgrade_duration: str - :param current_upgrade_domain_duration: The estimated amount of time spent - processing current Upgrade Domain. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type current_upgrade_domain_duration: str - :param application_unhealthy_evaluations: List of health evaluations that - resulted in the current aggregated health state. - :type application_unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param current_upgrade_domain_progress: Information about the current - in-progress upgrade domain. - :type current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :param start_timestamp_utc: The estimated UTC datetime when the upgrade - started. - :type start_timestamp_utc: str - :param failure_timestamp_utc: The estimated UTC datetime when the upgrade - failed and FailureAction was executed. - :type failure_timestamp_utc: str - :param failure_reason: The cause of an upgrade failure that resulted in - FailureAction being executed. Possible values include: 'None', - 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', - 'OverallUpgradeTimeout' - :type failure_reason: str or ~azure.servicefabric.models.FailureReason - :param upgrade_domain_progress_at_failure: Information about the upgrade - domain progress at the time of upgrade failure. - :type upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo - :param application_upgrade_status_details: Additional details of - application upgrade including failure message. - :type application_upgrade_status_details: str - """ - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - 'current_upgrade_domain_duration': {'key': 'CurrentUpgradeDomainDuration', 'type': 'str'}, - 'application_unhealthy_evaluations': {'key': 'ApplicationUnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, - 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, - } - - def __init__(self, *, deployment_name: str=None, application_name: str=None, upgrade_state=None, upgrade_status_details: str=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", force_restart: bool=None, upgrade_replica_set_check_timeout_in_seconds: int=None, monitoring_policy=None, application_health_policy=None, target_application_type_version: str=None, upgrade_duration: str=None, current_upgrade_domain_duration: str=None, application_unhealthy_evaluations=None, current_upgrade_domain_progress=None, start_timestamp_utc: str=None, failure_timestamp_utc: str=None, failure_reason=None, upgrade_domain_progress_at_failure=None, application_upgrade_status_details: str=None, **kwargs) -> None: - super(ComposeDeploymentUpgradeProgressInfo, self).__init__(**kwargs) - self.deployment_name = deployment_name - self.application_name = application_name - self.upgrade_state = upgrade_state - self.upgrade_status_details = upgrade_status_details - self.upgrade_kind = upgrade_kind - self.rolling_upgrade_mode = rolling_upgrade_mode - self.force_restart = force_restart - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.monitoring_policy = monitoring_policy - self.application_health_policy = application_health_policy - self.target_application_type_version = target_application_type_version - self.upgrade_duration = upgrade_duration - self.current_upgrade_domain_duration = current_upgrade_domain_duration - self.application_unhealthy_evaluations = application_unhealthy_evaluations - self.current_upgrade_domain_progress = current_upgrade_domain_progress - self.start_timestamp_utc = start_timestamp_utc - self.failure_timestamp_utc = failure_timestamp_utc - self.failure_reason = failure_reason - self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure - self.application_upgrade_status_details = application_upgrade_status_details - - -class ConfigParameterOverride(Model): - """Information about a configuration parameter override. - - All required parameters must be populated in order to send to Azure. - - :param section_name: Required. Name of the section for the parameter - override. - :type section_name: str - :param parameter_name: Required. Name of the parameter that has been - overridden. - :type parameter_name: str - :param parameter_value: Required. Value of the overridden parameter. - :type parameter_value: str - :param timeout: The duration until config override is considered as valid. - :type timeout: timedelta - :param persist_across_upgrade: A value that indicates whether config - override will be removed on upgrade or will still be considered as valid. - :type persist_across_upgrade: bool - """ - - _validation = { - 'section_name': {'required': True}, - 'parameter_name': {'required': True}, - 'parameter_value': {'required': True}, - } - - _attribute_map = { - 'section_name': {'key': 'SectionName', 'type': 'str'}, - 'parameter_name': {'key': 'ParameterName', 'type': 'str'}, - 'parameter_value': {'key': 'ParameterValue', 'type': 'str'}, - 'timeout': {'key': 'Timeout', 'type': 'duration'}, - 'persist_across_upgrade': {'key': 'PersistAcrossUpgrade', 'type': 'bool'}, - } - - def __init__(self, *, section_name: str, parameter_name: str, parameter_value: str, timeout=None, persist_across_upgrade: bool=None, **kwargs) -> None: - super(ConfigParameterOverride, self).__init__(**kwargs) - self.section_name = section_name - self.parameter_name = parameter_name - self.parameter_value = parameter_value - self.timeout = timeout - self.persist_across_upgrade = persist_across_upgrade - - -class ContainerApiRequestBody(Model): - """parameters for making container API call. - - All required parameters must be populated in order to send to Azure. - - :param http_verb: HTTP verb of container REST API, defaults to "GET" - :type http_verb: str - :param uri_path: Required. URI path of container REST API - :type uri_path: str - :param content_type: Content type of container REST API request, defaults - to "application/json" - :type content_type: str - :param body: HTTP request body of container REST API - :type body: str - """ - - _validation = { - 'uri_path': {'required': True}, - } - - _attribute_map = { - 'http_verb': {'key': 'HttpVerb', 'type': 'str'}, - 'uri_path': {'key': 'UriPath', 'type': 'str'}, - 'content_type': {'key': 'Content-Type', 'type': 'str'}, - 'body': {'key': 'Body', 'type': 'str'}, - } - - def __init__(self, *, uri_path: str, http_verb: str=None, content_type: str=None, body: str=None, **kwargs) -> None: - super(ContainerApiRequestBody, self).__init__(**kwargs) - self.http_verb = http_verb - self.uri_path = uri_path - self.content_type = content_type - self.body = body - - -class ContainerApiResponse(Model): - """Response body that wraps container API result. - - All required parameters must be populated in order to send to Azure. - - :param container_api_result: Required. Container API result. - :type container_api_result: ~azure.servicefabric.models.ContainerApiResult - """ - - _validation = { - 'container_api_result': {'required': True}, - } - - _attribute_map = { - 'container_api_result': {'key': 'ContainerApiResult', 'type': 'ContainerApiResult'}, - } - - def __init__(self, *, container_api_result, **kwargs) -> None: - super(ContainerApiResponse, self).__init__(**kwargs) - self.container_api_result = container_api_result - - -class ContainerApiResult(Model): - """Container API result. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. HTTP status code returned by the target container - API - :type status: int - :param content_type: HTTP content type - :type content_type: str - :param content_encoding: HTTP content encoding - :type content_encoding: str - :param body: container API result body - :type body: str - """ - - _validation = { - 'status': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'Status', 'type': 'int'}, - 'content_type': {'key': 'Content-Type', 'type': 'str'}, - 'content_encoding': {'key': 'Content-Encoding', 'type': 'str'}, - 'body': {'key': 'Body', 'type': 'str'}, - } - - def __init__(self, *, status: int, content_type: str=None, content_encoding: str=None, body: str=None, **kwargs) -> None: - super(ContainerApiResult, self).__init__(**kwargs) - self.status = status - self.content_type = content_type - self.content_encoding = content_encoding - self.body = body - - -class ContainerCodePackageProperties(Model): - """Describes a container and its runtime properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the code package. - :type name: str - :param image: Required. The Container image to use. - :type image: str - :param image_registry_credential: Image registry credential. - :type image_registry_credential: - ~azure.servicefabric.models.ImageRegistryCredential - :param entry_point: Override for the default entry point in the container. - :type entry_point: str - :param commands: Command array to execute within the container in exec - form. - :type commands: list[str] - :param environment_variables: The environment variables to set in this - container - :type environment_variables: - list[~azure.servicefabric.models.EnvironmentVariable] - :param settings: The settings to set in this container. The setting file - path can be fetched from environment variable "Fabric_SettingPath". The - path for Windows container is "C:\\\\secrets". The path for Linux - container is "/var/secrets". - :type settings: list[~azure.servicefabric.models.Setting] - :param labels: The labels to set in this container. - :type labels: list[~azure.servicefabric.models.ContainerLabel] - :param endpoints: The endpoints exposed by this container. - :type endpoints: list[~azure.servicefabric.models.EndpointProperties] - :param resources: Required. The resources required by this container. - :type resources: ~azure.servicefabric.models.ResourceRequirements - :param volume_refs: Volumes to be attached to the container. The lifetime - of these volumes is independent of the application's lifetime. - :type volume_refs: list[~azure.servicefabric.models.VolumeReference] - :param volumes: Volumes to be attached to the container. The lifetime of - these volumes is scoped to the application's lifetime. - :type volumes: list[~azure.servicefabric.models.ApplicationScopedVolume] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :param reliable_collections_refs: A list of ReliableCollection resources - used by this particular code package. Please refer to - ReliableCollectionsRef for more details. - :type reliable_collections_refs: - list[~azure.servicefabric.models.ReliableCollectionsRef] - :ivar instance_view: Runtime information of a container instance. - :vartype instance_view: ~azure.servicefabric.models.ContainerInstanceView - :param liveness_probe: An array of liveness probes for a code package. It - determines when to restart a code package. - :type liveness_probe: list[~azure.servicefabric.models.Probe] - :param readiness_probe: An array of readiness probes for a code package. - It determines when to unpublish an endpoint. - :type readiness_probe: list[~azure.servicefabric.models.Probe] - """ - - _validation = { - 'name': {'required': True}, - 'image': {'required': True}, - 'resources': {'required': True}, - 'instance_view': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'image': {'key': 'image', 'type': 'str'}, - 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, - 'entry_point': {'key': 'entryPoint', 'type': 'str'}, - 'commands': {'key': 'commands', 'type': '[str]'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'}, - 'settings': {'key': 'settings', 'type': '[Setting]'}, - 'labels': {'key': 'labels', 'type': '[ContainerLabel]'}, - 'endpoints': {'key': 'endpoints', 'type': '[EndpointProperties]'}, - 'resources': {'key': 'resources', 'type': 'ResourceRequirements'}, - 'volume_refs': {'key': 'volumeRefs', 'type': '[VolumeReference]'}, - 'volumes': {'key': 'volumes', 'type': '[ApplicationScopedVolume]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - 'reliable_collections_refs': {'key': 'reliableCollectionsRefs', 'type': '[ReliableCollectionsRef]'}, - 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, - 'liveness_probe': {'key': 'livenessProbe', 'type': '[Probe]'}, - 'readiness_probe': {'key': 'readinessProbe', 'type': '[Probe]'}, - } - - def __init__(self, *, name: str, image: str, resources, image_registry_credential=None, entry_point: str=None, commands=None, environment_variables=None, settings=None, labels=None, endpoints=None, volume_refs=None, volumes=None, diagnostics=None, reliable_collections_refs=None, liveness_probe=None, readiness_probe=None, **kwargs) -> None: - super(ContainerCodePackageProperties, self).__init__(**kwargs) - self.name = name - self.image = image - self.image_registry_credential = image_registry_credential - self.entry_point = entry_point - self.commands = commands - self.environment_variables = environment_variables - self.settings = settings - self.labels = labels - self.endpoints = endpoints - self.resources = resources - self.volume_refs = volume_refs - self.volumes = volumes - self.diagnostics = diagnostics - self.reliable_collections_refs = reliable_collections_refs - self.instance_view = None - self.liveness_probe = liveness_probe - self.readiness_probe = readiness_probe - - -class ContainerEvent(Model): - """A container event. - - :param name: The name of the container event. - :type name: str - :param count: The count of the event. - :type count: int - :param first_timestamp: Date/time of the first event. - :type first_timestamp: str - :param last_timestamp: Date/time of the last event. - :type last_timestamp: str - :param message: The event message - :type message: str - :param type: The event type. - :type type: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, - 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, count: int=None, first_timestamp: str=None, last_timestamp: str=None, message: str=None, type: str=None, **kwargs) -> None: - super(ContainerEvent, self).__init__(**kwargs) - self.name = name - self.count = count - self.first_timestamp = first_timestamp - self.last_timestamp = last_timestamp - self.message = message - self.type = type - - -class ContainerInstanceEvent(FabricEvent): - """Represents the base for all Container Events. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ContainerInstanceEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ContainerInstanceEvent' - - -class ContainerInstanceView(Model): - """Runtime information of a container instance. - - :param restart_count: The number of times the container has been - restarted. - :type restart_count: int - :param current_state: Current container instance state. - :type current_state: ~azure.servicefabric.models.ContainerState - :param previous_state: Previous container instance state. - :type previous_state: ~azure.servicefabric.models.ContainerState - :param events: The events of this container instance. - :type events: list[~azure.servicefabric.models.ContainerEvent] - """ - - _attribute_map = { - 'restart_count': {'key': 'restartCount', 'type': 'int'}, - 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, - 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, - 'events': {'key': 'events', 'type': '[ContainerEvent]'}, - } - - def __init__(self, *, restart_count: int=None, current_state=None, previous_state=None, events=None, **kwargs) -> None: - super(ContainerInstanceView, self).__init__(**kwargs) - self.restart_count = restart_count - self.current_state = current_state - self.previous_state = previous_state - self.events = events - - -class ContainerLabel(Model): - """Describes a container label. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the container label. - :type name: str - :param value: Required. The value of the container label. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str, **kwargs) -> None: - super(ContainerLabel, self).__init__(**kwargs) - self.name = name - self.value = value - - -class ContainerLogs(Model): - """Container logs. - - :param content: Container logs. - :type content: str - """ - - _attribute_map = { - 'content': {'key': 'Content', 'type': 'str'}, - } - - def __init__(self, *, content: str=None, **kwargs) -> None: - super(ContainerLogs, self).__init__(**kwargs) - self.content = content - - -class ContainerState(Model): - """The container state. - - :param state: The state of this container - :type state: str - :param start_time: Date/time when the container state started. - :type start_time: datetime - :param exit_code: The container exit code. - :type exit_code: str - :param finish_time: Date/time when the container state finished. - :type finish_time: datetime - :param detail_status: Human-readable status of this state. - :type detail_status: str - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'exit_code': {'key': 'exitCode', 'type': 'str'}, - 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, - 'detail_status': {'key': 'detailStatus', 'type': 'str'}, - } - - def __init__(self, *, state: str=None, start_time=None, exit_code: str=None, finish_time=None, detail_status: str=None, **kwargs) -> None: - super(ContainerState, self).__init__(**kwargs) - self.state = state - self.start_time = start_time - self.exit_code = exit_code - self.finish_time = finish_time - self.detail_status = detail_status - - -class CreateComposeDeploymentDescription(Model): - """Defines description for creating a Service Fabric compose deployment. - - All required parameters must be populated in order to send to Azure. - - :param deployment_name: Required. The name of the deployment. - :type deployment_name: str - :param compose_file_content: Required. The content of the compose file - that describes the deployment to create. - :type compose_file_content: str - :param registry_credential: Credential information to connect to container - registry. - :type registry_credential: ~azure.servicefabric.models.RegistryCredential - """ - - _validation = { - 'deployment_name': {'required': True}, - 'compose_file_content': {'required': True}, - } - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, - 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, - } - - def __init__(self, *, deployment_name: str, compose_file_content: str, registry_credential=None, **kwargs) -> None: - super(CreateComposeDeploymentDescription, self).__init__(**kwargs) - self.deployment_name = deployment_name - self.compose_file_content = compose_file_content - self.registry_credential = registry_credential - - -class CurrentUpgradeDomainProgressInfo(Model): - """Information about the current in-progress upgrade domain. - - :param domain_name: The name of the upgrade domain - :type domain_name: str - :param node_upgrade_progress_list: List of upgrading nodes and their - statuses - :type node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: - super(CurrentUpgradeDomainProgressInfo, self).__init__(**kwargs) - self.domain_name = domain_name - self.node_upgrade_progress_list = node_upgrade_progress_list - - -class DeactivationIntentDescription(Model): - """Describes the intent or reason for deactivating the node. - - :param deactivation_intent: Describes the intent or reason for - deactivating the node. The possible values are following. Possible values - include: 'Pause', 'Restart', 'RemoveData' - :type deactivation_intent: str or - ~azure.servicefabric.models.DeactivationIntent - """ - - _attribute_map = { - 'deactivation_intent': {'key': 'DeactivationIntent', 'type': 'str'}, - } - - def __init__(self, *, deactivation_intent=None, **kwargs) -> None: - super(DeactivationIntentDescription, self).__init__(**kwargs) - self.deactivation_intent = deactivation_intent - - -class ExecutionPolicy(Model): - """The execution policy of the service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DefaultExecutionPolicy, RunToCompletionExecutionPolicy - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'Default': 'DefaultExecutionPolicy', 'RunToCompletion': 'RunToCompletionExecutionPolicy'} - } - - def __init__(self, **kwargs) -> None: - super(ExecutionPolicy, self).__init__(**kwargs) - self.type = None - - -class DefaultExecutionPolicy(ExecutionPolicy): - """The default execution policy. Always restart the service if an exit occurs. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DefaultExecutionPolicy, self).__init__(**kwargs) - self.type = 'Default' - - -class DeletePropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that deletes a specified property if it - exists. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - def __init__(self, *, property_name: str, **kwargs) -> None: - super(DeletePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.kind = 'Delete' - - -class DeltaNodesCheckHealthEvaluation(HealthEvaluation): - """Represents health evaluation for delta nodes, containing health evaluations - for each unhealthy node that impacted current aggregated health state. - Can be returned during cluster upgrade when the aggregated health state of - the cluster is Warning or Error. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param baseline_error_count: Number of nodes with aggregated heath state - Error in the health store at the beginning of the cluster upgrade. - :type baseline_error_count: long - :param baseline_total_count: Total number of nodes in the health store at - the beginning of the cluster upgrade. - :type baseline_total_count: long - :param max_percent_delta_unhealthy_nodes: Maximum allowed percentage of - delta unhealthy nodes from the ClusterUpgradeHealthPolicy. - :type max_percent_delta_unhealthy_nodes: int - :param total_count: Total number of nodes in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. - Includes all the unhealthy NodeHealthEvaluation that impacted the - aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, - 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, baseline_error_count: int=None, baseline_total_count: int=None, max_percent_delta_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(DeltaNodesCheckHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.baseline_error_count = baseline_error_count - self.baseline_total_count = baseline_total_count - self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'DeltaNodesCheck' - - -class DeployedApplicationHealth(EntityHealth): - """Information about the health of an application deployed on a Service Fabric - node. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param name: Name of the application deployed on the node whose health - information is described by this object. - :type name: str - :param node_name: Name of the node where this application is deployed. - :type node_name: str - :param deployed_service_package_health_states: Deployed service package - health states for the current deployed application as found in the health - store. - :type deployed_service_package_health_states: - list[~azure.servicefabric.models.DeployedServicePackageHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'deployed_service_package_health_states': {'key': 'DeployedServicePackageHealthStates', 'type': '[DeployedServicePackageHealthState]'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, node_name: str=None, deployed_service_package_health_states=None, **kwargs) -> None: - super(DeployedApplicationHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.name = name - self.node_name = node_name - self.deployed_service_package_health_states = deployed_service_package_health_states - - -class DeployedApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a deployed application, containing - information about the data and the algorithm used by the health store to - evaluate health. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Name of the node where the application is deployed to. - :type node_name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the deployed application. - The types of the unhealthy evaluations can be - DeployedServicePackagesHealthEvaluation or EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, node_name: str=None, application_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(DeployedApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.node_name = node_name - self.application_name = application_name - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'DeployedApplication' - - -class DeployedApplicationHealthReportExpiredEvent(ApplicationEvent): - """Deployed Application Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_instance_id: Required. Id of Application instance. - :type application_instance_id: long - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(DeployedApplicationHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_instance_id = application_instance_id - self.node_name = node_name - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'DeployedApplicationHealthReportExpired' - - -class DeployedApplicationHealthState(EntityHealthState): - """Represents the health state of a deployed application, which contains the - entity identifier and the aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param node_name: Name of the node on which the service package is - deployed. - :type node_name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, node_name: str=None, application_name: str=None, **kwargs) -> None: - super(DeployedApplicationHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.node_name = node_name - self.application_name = application_name - - -class DeployedApplicationHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a deployed application, which contains - the node where the application is deployed, the aggregated health state and - any deployed service packages that respect the chunk query description - filters. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of node where the application is deployed. - :type node_name: str - :param deployed_service_package_health_state_chunks: The list of deployed - service package health state chunks belonging to the deployed application - that respect the filters in the cluster health chunk query description. - :type deployed_service_package_health_state_chunks: - ~azure.servicefabric.models.DeployedServicePackageHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'deployed_service_package_health_state_chunks': {'key': 'DeployedServicePackageHealthStateChunks', 'type': 'DeployedServicePackageHealthStateChunkList'}, - } - - def __init__(self, *, health_state=None, node_name: str=None, deployed_service_package_health_state_chunks=None, **kwargs) -> None: - super(DeployedApplicationHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.node_name = node_name - self.deployed_service_package_health_state_chunks = deployed_service_package_health_state_chunks - - -class DeployedApplicationHealthStateChunkList(Model): - """The list of deployed application health state chunks that respect the input - filters in the chunk query. Returned by get cluster health state chunks - query. - - :param items: The list of deployed application health state chunks that - respect the input filters in the chunk query. - :type items: - list[~azure.servicefabric.models.DeployedApplicationHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[DeployedApplicationHealthStateChunk]'}, - } - - def __init__(self, *, items=None, **kwargs) -> None: - super(DeployedApplicationHealthStateChunkList, self).__init__(**kwargs) - self.items = items - - -class DeployedApplicationHealthStateFilter(Model): - """Defines matching criteria to determine whether a deployed application - should be included as a child of an application in the cluster health - chunk. - The deployed applications are only returned if the parent application - matches a filter specified in the cluster health chunk query description. - One filter can match zero, one or multiple deployed applications, depending - on its properties. - - :param node_name_filter: The name of the node where the application is - deployed in order to match the filter. - If specified, the filter is applied only to the application deployed on - the specified node. - If the application is not deployed on the node with the specified name, no - deployed application is returned in the cluster health chunk based on this - filter. - Otherwise, the deployed application is included in the cluster health - chunk if it respects the other filter properties. - If not specified, all deployed applications that match the parent filters - (if any) are taken into consideration and matched against the other filter - members, like health state filter. - :type node_name_filter: str - :param health_state_filter: The filter for the health state of the - deployed applications. It allows selecting deployed applications if they - match the desired health states. - The possible values are integer value of one of the following health - states. Only deployed applications that match the filter are returned. All - deployed applications are used to evaluate the cluster aggregated health - state. - If not specified, default value is None, unless the node name is - specified. If the filter has default value and node name is specified, the - matching deployed application is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches deployed applications - with HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - :param deployed_service_package_filters: Defines a list of filters that - specify which deployed service packages to be included in the returned - cluster health chunk as children of the parent deployed application. The - deployed service packages are returned only if the parent deployed - application matches a filter. - If the list is empty, no deployed service packages are returned. All the - deployed service packages are used to evaluate the parent deployed - application aggregated health state, regardless of the input filters. - The deployed application filter may specify multiple deployed service - package filters. - For example, it can specify a filter to return all deployed service - packages with health state Error and another filter to always include a - deployed service package on a node. - :type deployed_service_package_filters: - list[~azure.servicefabric.models.DeployedServicePackageHealthStateFilter] - """ - - _attribute_map = { - 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'deployed_service_package_filters': {'key': 'DeployedServicePackageFilters', 'type': '[DeployedServicePackageHealthStateFilter]'}, - } - - def __init__(self, *, node_name_filter: str=None, health_state_filter: int=0, deployed_service_package_filters=None, **kwargs) -> None: - super(DeployedApplicationHealthStateFilter, self).__init__(**kwargs) - self.node_name_filter = node_name_filter - self.health_state_filter = health_state_filter - self.deployed_service_package_filters = deployed_service_package_filters - - -class DeployedApplicationInfo(Model): - """Information about application deployed on the node. - - :param id: The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to - identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type id: str - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - :param type_name: The application type name as defined in the application - manifest. - :type type_name: str - :param status: The status of the application deployed on the node. - Following are the possible values. Possible values include: 'Invalid', - 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating' - :type status: str or ~azure.servicefabric.models.DeployedApplicationStatus - :param work_directory: The work directory of the application on the node. - The work directory can be used to store application data. - :type work_directory: str - :param log_directory: The log directory of the application on the node. - The log directory can be used to store application logs. - :type log_directory: str - :param temp_directory: The temp directory of the application on the node. - The code packages belonging to the application are forked with this - directory set as their temporary directory. - :type temp_directory: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'work_directory': {'key': 'WorkDirectory', 'type': 'str'}, - 'log_directory': {'key': 'LogDirectory', 'type': 'str'}, - 'temp_directory': {'key': 'TempDirectory', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, type_name: str=None, status=None, work_directory: str=None, log_directory: str=None, temp_directory: str=None, health_state=None, **kwargs) -> None: - super(DeployedApplicationInfo, self).__init__(**kwargs) - self.id = id - self.name = name - self.type_name = type_name - self.status = status - self.work_directory = work_directory - self.log_directory = log_directory - self.temp_directory = temp_directory - self.health_state = health_state - - -class DeployedApplicationNewHealthReportEvent(ApplicationEvent): - """Deployed Application Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_instance_id: Required. Id of Application instance. - :type application_instance_id: long - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(DeployedApplicationNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_instance_id = application_instance_id - self.node_name = node_name - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'DeployedApplicationNewHealthReport' - - -class DeployedApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for deployed applications, containing health - evaluations for each unhealthy deployed application that impacted current - aggregated health state. - Can be returned when evaluating application health and the aggregated - health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_deployed_applications: Maximum allowed - percentage of unhealthy deployed applications from the - ApplicationHealthPolicy. - :type max_percent_unhealthy_deployed_applications: int - :param total_count: Total number of deployed applications of the - application in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - DeployedApplicationHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_deployed_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(DeployedApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'DeployedApplications' - - -class DeployedCodePackageInfo(Model): - """Information about code package deployed on a Service Fabric node. - - :param name: The name of the code package. - :type name: str - :param version: The version of the code package specified in service - manifest. - :type version: str - :param service_manifest_name: The name of service manifest that specified - this code package. - :type service_manifest_name: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param host_type: Specifies the type of host for main entry point of a - code package as specified in service manifest. Possible values include: - 'Invalid', 'ExeHost', 'ContainerHost' - :type host_type: str or ~azure.servicefabric.models.HostType - :param host_isolation_mode: Specifies the isolation mode of main entry - point of a code package when it's host type is ContainerHost. This is - specified as part of container host policies in application manifest while - importing service manifest. Possible values include: 'None', 'Process', - 'HyperV' - :type host_isolation_mode: str or - ~azure.servicefabric.models.HostIsolationMode - :param status: Specifies the status of a deployed application or service - package on a Service Fabric node. Possible values include: 'Invalid', - 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating', - 'RanToCompletion', 'Failed' - :type status: str or ~azure.servicefabric.models.DeploymentStatus - :param run_frequency_interval: The interval at which code package is run. - This is used for periodic code package. - :type run_frequency_interval: str - :param setup_entry_point: Information about setup or main entry point of a - code package deployed on a Service Fabric node. - :type setup_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint - :param main_entry_point: Information about setup or main entry point of a - code package deployed on a Service Fabric node. - :type main_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_type': {'key': 'HostType', 'type': 'str'}, - 'host_isolation_mode': {'key': 'HostIsolationMode', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'run_frequency_interval': {'key': 'RunFrequencyInterval', 'type': 'str'}, - 'setup_entry_point': {'key': 'SetupEntryPoint', 'type': 'CodePackageEntryPoint'}, - 'main_entry_point': {'key': 'MainEntryPoint', 'type': 'CodePackageEntryPoint'}, - } - - def __init__(self, *, name: str=None, version: str=None, service_manifest_name: str=None, service_package_activation_id: str=None, host_type=None, host_isolation_mode=None, status=None, run_frequency_interval: str=None, setup_entry_point=None, main_entry_point=None, **kwargs) -> None: - super(DeployedCodePackageInfo, self).__init__(**kwargs) - self.name = name - self.version = version - self.service_manifest_name = service_manifest_name - self.service_package_activation_id = service_package_activation_id - self.host_type = host_type - self.host_isolation_mode = host_isolation_mode - self.status = status - self.run_frequency_interval = run_frequency_interval - self.setup_entry_point = setup_entry_point - self.main_entry_point = main_entry_point - - -class DeployedServicePackageHealth(EntityHealth): - """Information about the health of a service package for a specific - application deployed on a Service Fabric node. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_manifest_name: Name of the service manifest. - :type service_manifest_name: str - :param node_name: Name of the node where this service package is deployed. - :type node_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, application_name: str=None, service_manifest_name: str=None, node_name: str=None, **kwargs) -> None: - super(DeployedServicePackageHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.application_name = application_name - self.service_manifest_name = service_manifest_name - self.node_name = node_name - - -class DeployedServicePackageHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a deployed service package, containing - information about the data and the algorithm used by health store to - evaluate health. The evaluation is returned only when the aggregated health - state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_manifest_name: The name of the service manifest. - :type service_manifest_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state. The type of the unhealthy evaluations - can be EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, node_name: str=None, application_name: str=None, service_manifest_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(DeployedServicePackageHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.node_name = node_name - self.application_name = application_name - self.service_manifest_name = service_manifest_name - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'DeployedServicePackage' - - -class DeployedServicePackageHealthReportExpiredEvent(ApplicationEvent): - """Deployed Service Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param service_manifest: Required. Service manifest name. - :type service_manifest: str - :param service_package_instance_id: Required. Id of Service package - instance. - :type service_package_instance_id: long - :param service_package_activation_id: Required. Id of Service package - activation. - :type service_package_activation_id: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_manifest': {'required': True}, - 'service_package_instance_id': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_manifest': {'key': 'ServiceManifest', 'type': 'str'}, - 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_manifest: str, service_package_instance_id: int, service_package_activation_id: str, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(DeployedServicePackageHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.service_manifest = service_manifest - self.service_package_instance_id = service_package_instance_id - self.service_package_activation_id = service_package_activation_id - self.node_name = node_name - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'DeployedServicePackageHealthReportExpired' - - -class DeployedServicePackageHealthState(EntityHealthState): - """Represents the health state of a deployed service package, containing the - entity identifier and the aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param node_name: Name of the node on which the service package is - deployed. - :type node_name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_manifest_name: Name of the manifest describing the service - package. - :type service_manifest_name: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, node_name: str=None, application_name: str=None, service_manifest_name: str=None, service_package_activation_id: str=None, **kwargs) -> None: - super(DeployedServicePackageHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.node_name = node_name - self.application_name = application_name - self.service_manifest_name = service_manifest_name - self.service_package_activation_id = service_package_activation_id - - -class DeployedServicePackageHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a deployed service package, which - contains the service manifest name and the service package aggregated - health state. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_manifest_name: The name of the service manifest. - :type service_manifest_name: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, *, health_state=None, service_manifest_name: str=None, service_package_activation_id: str=None, **kwargs) -> None: - super(DeployedServicePackageHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.service_manifest_name = service_manifest_name - self.service_package_activation_id = service_package_activation_id - - -class DeployedServicePackageHealthStateChunkList(Model): - """The list of deployed service package health state chunks that respect the - input filters in the chunk query. Returned by get cluster health state - chunks query. - - :param items: The list of deployed service package health state chunks - that respect the input filters in the chunk query. - :type items: - list[~azure.servicefabric.models.DeployedServicePackageHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[DeployedServicePackageHealthStateChunk]'}, - } - - def __init__(self, *, items=None, **kwargs) -> None: - super(DeployedServicePackageHealthStateChunkList, self).__init__(**kwargs) - self.items = items - - -class DeployedServicePackageHealthStateFilter(Model): - """Defines matching criteria to determine whether a deployed service package - should be included as a child of a deployed application in the cluster - health chunk. - The deployed service packages are only returned if the parent entities - match a filter specified in the cluster health chunk query description. The - parent deployed application and its parent application must be included in - the cluster health chunk. - One filter can match zero, one or multiple deployed service packages, - depending on its properties. - - :param service_manifest_name_filter: The name of the service manifest - which identifies the deployed service packages that matches the filter. - If specified, the filter is applied only to the specified deployed service - packages, if any. - If no deployed service packages with specified manifest name exist, - nothing is returned in the cluster health chunk based on this filter. - If any deployed service package exists, they are included in the cluster - health chunk if it respects the other filter properties. - If not specified, all deployed service packages that match the parent - filters (if any) are taken into consideration and matched against the - other filter members, like health state filter. - :type service_manifest_name_filter: str - :param service_package_activation_id_filter: The activation ID of a - deployed service package that matches the filter. - If not specified, the filter applies to all deployed service packages that - match the other parameters. - If specified, the filter matches only the deployed service package with - the specified activation ID. - :type service_package_activation_id_filter: str - :param health_state_filter: The filter for the health state of the - deployed service packages. It allows selecting deployed service packages - if they match the desired health states. - The possible values are integer value of one of the following health - states. Only deployed service packages that match the filter are returned. - All deployed service packages are used to evaluate the parent deployed - application aggregated health state. - If not specified, default value is None, unless the deployed service - package ID is specified. If the filter has default value and deployed - service package ID is specified, the matching deployed service package is - returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches deployed service - packages with HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - """ - - _attribute_map = { - 'service_manifest_name_filter': {'key': 'ServiceManifestNameFilter', 'type': 'str'}, - 'service_package_activation_id_filter': {'key': 'ServicePackageActivationIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__(self, *, service_manifest_name_filter: str=None, service_package_activation_id_filter: str=None, health_state_filter: int=0, **kwargs) -> None: - super(DeployedServicePackageHealthStateFilter, self).__init__(**kwargs) - self.service_manifest_name_filter = service_manifest_name_filter - self.service_package_activation_id_filter = service_package_activation_id_filter - self.health_state_filter = health_state_filter - - -class DeployedServicePackageInfo(Model): - """Information about service package deployed on a Service Fabric node. - - :param name: The name of the service package as specified in the service - manifest. - :type name: str - :param version: The version of the service package specified in service - manifest. - :type version: str - :param status: Specifies the status of a deployed application or service - package on a Service Fabric node. Possible values include: 'Invalid', - 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating', - 'RanToCompletion', 'Failed' - :type status: str or ~azure.servicefabric.models.DeploymentStatus - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, version: str=None, status=None, service_package_activation_id: str=None, **kwargs) -> None: - super(DeployedServicePackageInfo, self).__init__(**kwargs) - self.name = name - self.version = version - self.status = status - self.service_package_activation_id = service_package_activation_id - - -class DeployedServicePackageNewHealthReportEvent(ApplicationEvent): - """Deployed Service Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param service_manifest_name: Required. Service manifest name. - :type service_manifest_name: str - :param service_package_instance_id: Required. Id of Service package - instance. - :type service_package_instance_id: long - :param service_package_activation_id: Required. Id of Service package - activation. - :type service_package_activation_id: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_manifest_name': {'required': True}, - 'service_package_instance_id': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_manifest_name: str, service_package_instance_id: int, service_package_activation_id: str, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(DeployedServicePackageNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.service_manifest_name = service_manifest_name - self.service_package_instance_id = service_package_instance_id - self.service_package_activation_id = service_package_activation_id - self.node_name = node_name - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'DeployedServicePackageNewHealthReport' - - -class DeployedServicePackagesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for deployed service packages, containing - health evaluations for each unhealthy deployed service package that - impacted current aggregated health state. Can be returned when evaluating - deployed application health and the aggregated health state is either Error - or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param total_count: Total number of deployed service packages of the - deployed application in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - DeployedServicePackageHealthEvaluation that impacted the aggregated - health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(DeployedServicePackagesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'DeployedServicePackages' - - -class DeployedServiceReplicaDetailInfo(Model): - """Information about a Service Fabric service replica deployed on a node. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeployedStatefulServiceReplicaDetailInfo, - DeployedStatelessServiceInstanceDetailInfo - - All required parameters must be populated in order to send to Azure. - - :param service_name: Full hierarchical name of the service in URI format - starting with `fabric:`. - :type service_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param current_service_operation: Specifies the current active life-cycle - operation on a stateful service replica or stateless service instance. - Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', - 'Abort' - :type current_service_operation: str or - ~azure.servicefabric.models.ServiceOperationName - :param current_service_operation_start_time_utc: The start time of the - current service operation in UTC format. - :type current_service_operation_start_time_utc: datetime - :param reported_load: List of load reported by replica. - :type reported_load: - list[~azure.servicefabric.models.LoadMetricReportInfo] - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaDetailInfo', 'Stateless': 'DeployedStatelessServiceInstanceDetailInfo'} - } - - def __init__(self, *, service_name: str=None, partition_id: str=None, current_service_operation=None, current_service_operation_start_time_utc=None, reported_load=None, **kwargs) -> None: - super(DeployedServiceReplicaDetailInfo, self).__init__(**kwargs) - self.service_name = service_name - self.partition_id = partition_id - self.current_service_operation = current_service_operation - self.current_service_operation_start_time_utc = current_service_operation_start_time_utc - self.reported_load = reported_load - self.service_kind = None - - -class DeployedServiceReplicaInfo(Model): - """Information about a Service Fabric service replica deployed on a node. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeployedStatefulServiceReplicaInfo, - DeployedStatelessServiceInstanceInfo - - All required parameters must be populated in order to send to Azure. - - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param code_package_name: The name of the code package that hosts this - replica. - :type code_package_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param address: The last address returned by the replica in Open or - ChangeRole. - :type address: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param host_process_id: Host process ID of the process that is hosting the - replica. This will be zero if the replica is down. In hyper-v containers - this host process ID will be from different kernel. - :type host_process_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaInfo', 'Stateless': 'DeployedStatelessServiceInstanceInfo'} - } - - def __init__(self, *, service_name: str=None, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, partition_id: str=None, replica_status=None, address: str=None, service_package_activation_id: str=None, host_process_id: str=None, **kwargs) -> None: - super(DeployedServiceReplicaInfo, self).__init__(**kwargs) - self.service_name = service_name - self.service_type_name = service_type_name - self.service_manifest_name = service_manifest_name - self.code_package_name = code_package_name - self.partition_id = partition_id - self.replica_status = replica_status - self.address = address - self.service_package_activation_id = service_package_activation_id - self.host_process_id = host_process_id - self.service_kind = None - - -class DeployedServiceTypeInfo(Model): - """Information about service type deployed on a node, information such as the - status of the service type registration on a node. - - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param code_package_name: The name of the code package that registered the - service type. - :type code_package_name: str - :param status: The status of the service type registration on the node. - Possible values include: 'Invalid', 'Disabled', 'Enabled', 'Registered' - :type status: str or - ~azure.servicefabric.models.ServiceTypeRegistrationStatus - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - """ - - _attribute_map = { - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, *, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, status=None, service_package_activation_id: str=None, **kwargs) -> None: - super(DeployedServiceTypeInfo, self).__init__(**kwargs) - self.service_type_name = service_type_name - self.service_manifest_name = service_manifest_name - self.code_package_name = code_package_name - self.status = status - self.service_package_activation_id = service_package_activation_id - - -class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo): - """Information about a stateful replica running in a code package. Note - DeployedServiceReplicaQueryResult will contain duplicate data like - ServiceKind, ServiceName, PartitionId and replicaId. - - All required parameters must be populated in order to send to Azure. - - :param service_name: Full hierarchical name of the service in URI format - starting with `fabric:`. - :type service_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param current_service_operation: Specifies the current active life-cycle - operation on a stateful service replica or stateless service instance. - Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', - 'Abort' - :type current_service_operation: str or - ~azure.servicefabric.models.ServiceOperationName - :param current_service_operation_start_time_utc: The start time of the - current service operation in UTC format. - :type current_service_operation_start_time_utc: datetime - :param reported_load: List of load reported by replica. - :type reported_load: - list[~azure.servicefabric.models.LoadMetricReportInfo] - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - :param current_replicator_operation: Specifies the operation currently - being executed by the Replicator. Possible values include: 'Invalid', - 'None', 'Open', 'ChangeRole', 'UpdateEpoch', 'Close', 'Abort', - 'OnDataLoss', 'WaitForCatchup', 'Build' - :type current_replicator_operation: str or - ~azure.servicefabric.models.ReplicatorOperationName - :param read_status: Specifies the access status of the partition. Possible - values include: 'Invalid', 'Granted', 'ReconfigurationPending', - 'NotPrimary', 'NoWriteQuorum' - :type read_status: str or - ~azure.servicefabric.models.PartitionAccessStatus - :param write_status: Specifies the access status of the partition. - Possible values include: 'Invalid', 'Granted', 'ReconfigurationPending', - 'NotPrimary', 'NoWriteQuorum' - :type write_status: str or - ~azure.servicefabric.models.PartitionAccessStatus - :param replicator_status: Represents a base class for primary or secondary - replicator status. - Contains information about the service fabric replicator like the - replication/copy queue utilization, last acknowledgement received - timestamp, etc. - :type replicator_status: ~azure.servicefabric.models.ReplicatorStatus - :param replica_status: Key value store related information for the - replica. - :type replica_status: - ~azure.servicefabric.models.KeyValueStoreReplicaStatus - :param deployed_service_replica_query_result: Information about a stateful - service replica deployed on a node. - :type deployed_service_replica_query_result: - ~azure.servicefabric.models.DeployedStatefulServiceReplicaInfo - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'current_replicator_operation': {'key': 'CurrentReplicatorOperation', 'type': 'str'}, - 'read_status': {'key': 'ReadStatus', 'type': 'str'}, - 'write_status': {'key': 'WriteStatus', 'type': 'str'}, - 'replicator_status': {'key': 'ReplicatorStatus', 'type': 'ReplicatorStatus'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'KeyValueStoreReplicaStatus'}, - 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatefulServiceReplicaInfo'}, - } - - def __init__(self, *, service_name: str=None, partition_id: str=None, current_service_operation=None, current_service_operation_start_time_utc=None, reported_load=None, replica_id: str=None, current_replicator_operation=None, read_status=None, write_status=None, replicator_status=None, replica_status=None, deployed_service_replica_query_result=None, **kwargs) -> None: - super(DeployedStatefulServiceReplicaDetailInfo, self).__init__(service_name=service_name, partition_id=partition_id, current_service_operation=current_service_operation, current_service_operation_start_time_utc=current_service_operation_start_time_utc, reported_load=reported_load, **kwargs) - self.replica_id = replica_id - self.current_replicator_operation = current_replicator_operation - self.read_status = read_status - self.write_status = write_status - self.replicator_status = replicator_status - self.replica_status = replica_status - self.deployed_service_replica_query_result = deployed_service_replica_query_result - self.service_kind = 'Stateful' - - -class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): - """Information about a stateful service replica deployed on a node. - - All required parameters must be populated in order to send to Azure. - - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param code_package_name: The name of the code package that hosts this - replica. - :type code_package_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param address: The last address returned by the replica in Open or - ChangeRole. - :type address: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param host_process_id: Host process ID of the process that is hosting the - replica. This will be zero if the replica is down. In hyper-v containers - this host process ID will be from different kernel. - :type host_process_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - :param replica_role: The role of a replica of a stateful service. Possible - values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', - 'ActiveSecondary' - :type replica_role: str or ~azure.servicefabric.models.ReplicaRole - :param reconfiguration_information: Information about current - reconfiguration like phase, type, previous configuration role of replica - and reconfiguration start date time. - :type reconfiguration_information: - ~azure.servicefabric.models.ReconfigurationInformation - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, - 'reconfiguration_information': {'key': 'ReconfigurationInformation', 'type': 'ReconfigurationInformation'}, - } - - def __init__(self, *, service_name: str=None, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, partition_id: str=None, replica_status=None, address: str=None, service_package_activation_id: str=None, host_process_id: str=None, replica_id: str=None, replica_role=None, reconfiguration_information=None, **kwargs) -> None: - super(DeployedStatefulServiceReplicaInfo, self).__init__(service_name=service_name, service_type_name=service_type_name, service_manifest_name=service_manifest_name, code_package_name=code_package_name, partition_id=partition_id, replica_status=replica_status, address=address, service_package_activation_id=service_package_activation_id, host_process_id=host_process_id, **kwargs) - self.replica_id = replica_id - self.replica_role = replica_role - self.reconfiguration_information = reconfiguration_information - self.service_kind = 'Stateful' - - -class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInfo): - """Information about a stateless instance running in a code package. Note that - DeployedServiceReplicaQueryResult will contain duplicate data like - ServiceKind, ServiceName, PartitionId and InstanceId. - - All required parameters must be populated in order to send to Azure. - - :param service_name: Full hierarchical name of the service in URI format - starting with `fabric:`. - :type service_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param current_service_operation: Specifies the current active life-cycle - operation on a stateful service replica or stateless service instance. - Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', - 'Abort' - :type current_service_operation: str or - ~azure.servicefabric.models.ServiceOperationName - :param current_service_operation_start_time_utc: The start time of the - current service operation in UTC format. - :type current_service_operation_start_time_utc: datetime - :param reported_load: List of load reported by replica. - :type reported_load: - list[~azure.servicefabric.models.LoadMetricReportInfo] - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_id: Id of a stateless service instance. InstanceId is used - by Service Fabric to uniquely identify an instance of a partition of a - stateless service. It is unique within a partition and does not change for - the lifetime of the instance. If the instance has failed over on the same - or different node, it will get a different value for the InstanceId. - :type instance_id: str - :param deployed_service_replica_query_result: Information about a - stateless service instance deployed on a node. - :type deployed_service_replica_query_result: - ~azure.servicefabric.models.DeployedStatelessServiceInstanceInfo - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatelessServiceInstanceInfo'}, - } - - def __init__(self, *, service_name: str=None, partition_id: str=None, current_service_operation=None, current_service_operation_start_time_utc=None, reported_load=None, instance_id: str=None, deployed_service_replica_query_result=None, **kwargs) -> None: - super(DeployedStatelessServiceInstanceDetailInfo, self).__init__(service_name=service_name, partition_id=partition_id, current_service_operation=current_service_operation, current_service_operation_start_time_utc=current_service_operation_start_time_utc, reported_load=reported_load, **kwargs) - self.instance_id = instance_id - self.deployed_service_replica_query_result = deployed_service_replica_query_result - self.service_kind = 'Stateless' - - -class DeployedStatelessServiceInstanceInfo(DeployedServiceReplicaInfo): - """Information about a stateless service instance deployed on a node. - - All required parameters must be populated in order to send to Azure. - - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param code_package_name: The name of the code package that hosts this - replica. - :type code_package_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param address: The last address returned by the replica in Open or - ChangeRole. - :type address: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param host_process_id: Host process ID of the process that is hosting the - replica. This will be zero if the replica is down. In hyper-v containers - this host process ID will be from different kernel. - :type host_process_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_id: Id of a stateless service instance. InstanceId is used - by Service Fabric to uniquely identify an instance of a partition of a - stateless service. It is unique within a partition and does not change for - the lifetime of the instance. If the instance has failed over on the same - or different node, it will get a different value for the InstanceId. - :type instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, *, service_name: str=None, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, partition_id: str=None, replica_status=None, address: str=None, service_package_activation_id: str=None, host_process_id: str=None, instance_id: str=None, **kwargs) -> None: - super(DeployedStatelessServiceInstanceInfo, self).__init__(service_name=service_name, service_type_name=service_type_name, service_manifest_name=service_manifest_name, code_package_name=code_package_name, partition_id=partition_id, replica_status=replica_status, address=address, service_package_activation_id=service_package_activation_id, host_process_id=host_process_id, **kwargs) - self.instance_id = instance_id - self.service_kind = 'Stateless' - - -class DeployServicePackageToNodeDescription(Model): - """Defines description for downloading packages associated with a service - manifest to image cache on a Service Fabric node. - - All required parameters must be populated in order to send to Azure. - - :param service_manifest_name: Required. The name of service manifest whose - packages need to be downloaded. - :type service_manifest_name: str - :param application_type_name: Required. The application type name as - defined in the application manifest. - :type application_type_name: str - :param application_type_version: Required. The version of the application - type as defined in the application manifest. - :type application_type_version: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param package_sharing_policy: List of package sharing policy information. - :type package_sharing_policy: - list[~azure.servicefabric.models.PackageSharingPolicyInfo] - """ - - _validation = { - 'service_manifest_name': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'node_name': {'required': True}, - } - - _attribute_map = { - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'package_sharing_policy': {'key': 'PackageSharingPolicy', 'type': '[PackageSharingPolicyInfo]'}, - } - - def __init__(self, *, service_manifest_name: str, application_type_name: str, application_type_version: str, node_name: str, package_sharing_policy=None, **kwargs) -> None: - super(DeployServicePackageToNodeDescription, self).__init__(**kwargs) - self.service_manifest_name = service_manifest_name - self.application_type_name = application_type_name - self.application_type_version = application_type_version - self.node_name = node_name - self.package_sharing_policy = package_sharing_policy - - -class DiagnosticsDescription(Model): - """Describes the diagnostics options available. - - :param sinks: List of supported sinks that can be referenced. - :type sinks: list[~azure.servicefabric.models.DiagnosticsSinkProperties] - :param enabled: Status of whether or not sinks are enabled. - :type enabled: bool - :param default_sink_refs: The sinks to be used if diagnostics is enabled. - Sink choices can be overridden at the service and code package level. - :type default_sink_refs: list[str] - """ - - _attribute_map = { - 'sinks': {'key': 'sinks', 'type': '[DiagnosticsSinkProperties]'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'default_sink_refs': {'key': 'defaultSinkRefs', 'type': '[str]'}, - } - - def __init__(self, *, sinks=None, enabled: bool=None, default_sink_refs=None, **kwargs) -> None: - super(DiagnosticsDescription, self).__init__(**kwargs) - self.sinks = sinks - self.enabled = enabled - self.default_sink_refs = default_sink_refs - - -class DiagnosticsRef(Model): - """Reference to sinks in DiagnosticsDescription. - - :param enabled: Status of whether or not sinks are enabled. - :type enabled: bool - :param sink_refs: List of sinks to be used if enabled. References the list - of sinks in DiagnosticsDescription. - :type sink_refs: list[str] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'sink_refs': {'key': 'sinkRefs', 'type': '[str]'}, - } - - def __init__(self, *, enabled: bool=None, sink_refs=None, **kwargs) -> None: - super(DiagnosticsRef, self).__init__(**kwargs) - self.enabled = enabled - self.sink_refs = sink_refs - - -class DisableBackupDescription(Model): - """It describes the body parameters while disabling backup of a backup - entity(Application/Service/Partition). - - All required parameters must be populated in order to send to Azure. - - :param clean_backup: Required. Boolean flag to delete backups. It can be - set to true for deleting all the backups which were created for the backup - entity that is getting disabled for backup. - :type clean_backup: bool - """ - - _validation = { - 'clean_backup': {'required': True}, - } - - _attribute_map = { - 'clean_backup': {'key': 'CleanBackup', 'type': 'bool'}, - } - - def __init__(self, *, clean_backup: bool, **kwargs) -> None: - super(DisableBackupDescription, self).__init__(**kwargs) - self.clean_backup = clean_backup - - -class DiskInfo(Model): - """Information about the disk. - - :param capacity: the disk size in bytes - :type capacity: str - :param available_space: the available disk space in bytes - :type available_space: str - """ - - _attribute_map = { - 'capacity': {'key': 'Capacity', 'type': 'str'}, - 'available_space': {'key': 'AvailableSpace', 'type': 'str'}, - } - - def __init__(self, *, capacity: str=None, available_space: str=None, **kwargs) -> None: - super(DiskInfo, self).__init__(**kwargs) - self.capacity = capacity - self.available_space = available_space - - -class DoublePropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Double. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. The data of the property value. - :type data: float - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'float'}, - } - - def __init__(self, *, data: float, **kwargs) -> None: - super(DoublePropertyValue, self).__init__(**kwargs) - self.data = data - self.kind = 'Double' - - -class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Dsms Azure blob store used for storing and - enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - :param storage_credentials_source_location: Required. The source location - of the storage credentials to connect to the Dsms Azure blob store. - :type storage_credentials_source_location: str - :param container_name: Required. The name of the container in the blob - store to store and enumerate backups from. - :type container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'storage_credentials_source_location': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'storage_credentials_source_location': {'key': 'StorageCredentialsSourceLocation', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__(self, *, storage_credentials_source_location: str, container_name: str, friendly_name: str=None, **kwargs) -> None: - super(DsmsAzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) - self.storage_credentials_source_location = storage_credentials_source_location - self.container_name = container_name - self.storage_kind = 'DsmsAzureBlobStore' - - -class EnableBackupDescription(Model): - """Specifies the parameters needed to enable periodic backup. - - All required parameters must be populated in order to send to Azure. - - :param backup_policy_name: Required. Name of the backup policy to be used - for enabling periodic backups. - :type backup_policy_name: str - """ - - _validation = { - 'backup_policy_name': {'required': True}, - } - - _attribute_map = { - 'backup_policy_name': {'key': 'BackupPolicyName', 'type': 'str'}, - } - - def __init__(self, *, backup_policy_name: str, **kwargs) -> None: - super(EnableBackupDescription, self).__init__(**kwargs) - self.backup_policy_name = backup_policy_name - - -class EndpointProperties(Model): - """Describes a container endpoint. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the endpoint. - :type name: str - :param port: Port used by the container. - :type port: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__(self, *, name: str, port: int=None, **kwargs) -> None: - super(EndpointProperties, self).__init__(**kwargs) - self.name = name - self.port = port - - -class EndpointRef(Model): - """Describes a reference to a service endpoint. - - :param name: Name of the endpoint. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(EndpointRef, self).__init__(**kwargs) - self.name = name - - -class SafetyCheck(Model): - """Represents a safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service - and the reliability of the state. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionSafetyCheck, SeedNodeSafetyCheck - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'PartitionSafetyCheck': 'PartitionSafetyCheck', 'EnsureSeedNodeQuorum': 'SeedNodeSafetyCheck'} - } - - def __init__(self, **kwargs) -> None: - super(SafetyCheck, self).__init__(**kwargs) - self.kind = None - - -class PartitionSafetyCheck(SafetyCheck): - """Represents a safety check for the service partition being performed by - service fabric before continuing with operations. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: EnsureAvailabilitySafetyCheck, - EnsurePartitionQuorumSafetyCheck, WaitForInbuildReplicaSafetyCheck, - WaitForPrimaryPlacementSafetyCheck, WaitForPrimarySwapSafetyCheck, - WaitForReconfigurationSafetyCheck - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'EnsureAvailability': 'EnsureAvailabilitySafetyCheck', 'EnsurePartitionQuorum': 'EnsurePartitionQuorumSafetyCheck', 'WaitForInbuildReplica': 'WaitForInbuildReplicaSafetyCheck', 'WaitForPrimaryPlacement': 'WaitForPrimaryPlacementSafetyCheck', 'WaitForPrimarySwap': 'WaitForPrimarySwapSafetyCheck', 'WaitForReconfiguration': 'WaitForReconfigurationSafetyCheck'} - } - - def __init__(self, *, partition_id: str=None, **kwargs) -> None: - super(PartitionSafetyCheck, self).__init__(**kwargs) - self.partition_id = partition_id - self.kind = 'PartitionSafetyCheck' - - -class EnsureAvailabilitySafetyCheck(PartitionSafetyCheck): - """Safety check that waits to ensure the availability of the partition. It - waits until there are replicas available such that bringing down this - replica will not cause availability loss for the partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, partition_id: str=None, **kwargs) -> None: - super(EnsureAvailabilitySafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'EnsureAvailability' - - -class EnsurePartitionQuorumSafetyCheck(PartitionSafetyCheck): - """Safety check that ensures that a quorum of replicas are not lost for a - partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, partition_id: str=None, **kwargs) -> None: - super(EnsurePartitionQuorumSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'EnsurePartitionQuorum' - - -class EntityKindHealthStateCount(Model): - """Represents health state count for entities of the specified entity kind. - - :param entity_kind: The entity kind for which health states are evaluated. - Possible values include: 'Invalid', 'Node', 'Partition', 'Service', - 'Application', 'Replica', 'DeployedApplication', 'DeployedServicePackage', - 'Cluster' - :type entity_kind: str or ~azure.servicefabric.models.EntityKind - :param health_state_count: The health state count for the entities of the - specified kind. - :type health_state_count: ~azure.servicefabric.models.HealthStateCount - """ - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'health_state_count': {'key': 'HealthStateCount', 'type': 'HealthStateCount'}, - } - - def __init__(self, *, entity_kind=None, health_state_count=None, **kwargs) -> None: - super(EntityKindHealthStateCount, self).__init__(**kwargs) - self.entity_kind = entity_kind - self.health_state_count = health_state_count - - -class EnvironmentVariable(Model): - """Describes an environment variable for the container. - - :param type: The type of the environment variable being given in value. - Possible values include: 'ClearText', 'KeyVaultReference', - 'SecretValueReference'. Default value: "ClearText" . - :type type: str or ~azure.servicefabric.models.EnvironmentVariableType - :param name: The name of the environment variable. - :type name: str - :param value: The value of the environment variable, will be processed - based on the type provided. - :type value: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, type="ClearText", name: str=None, value: str=None, **kwargs) -> None: - super(EnvironmentVariable, self).__init__(**kwargs) - self.type = type - self.name = name - self.value = value - - -class Epoch(Model): - """An Epoch is a configuration number for the partition as a whole. When the - configuration of the replica set changes, for example when the Primary - replica changes, the operations that are replicated from the new Primary - replica are said to be a new Epoch from the ones which were sent by the old - Primary replica. - - :param configuration_version: The current configuration number of this - Epoch. The configuration number is an increasing value that is updated - whenever the configuration of this replica set changes. - :type configuration_version: str - :param data_loss_version: The current data loss number of this Epoch. The - data loss number property is an increasing value which is updated whenever - data loss is suspected, as when loss of a quorum of replicas in the - replica set that includes the Primary replica. - :type data_loss_version: str - """ - - _attribute_map = { - 'configuration_version': {'key': 'ConfigurationVersion', 'type': 'str'}, - 'data_loss_version': {'key': 'DataLossVersion', 'type': 'str'}, - } - - def __init__(self, *, configuration_version: str=None, data_loss_version: str=None, **kwargs) -> None: - super(Epoch, self).__init__(**kwargs) - self.configuration_version = configuration_version - self.data_loss_version = data_loss_version - - -class EventHealthEvaluation(HealthEvaluation): - """Represents health evaluation of a HealthEvent that was reported on the - entity. - The health evaluation is returned when evaluating health of an entity - results in Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param consider_warning_as_error: Indicates whether warnings are treated - with the same severity as errors. The field is specified in the health - policy used to evaluate the entity. - :type consider_warning_as_error: bool - :param unhealthy_event: Represents health information reported on a health - entity, such as cluster, application or node, with additional metadata - added by the Health Manager. - :type unhealthy_event: ~azure.servicefabric.models.HealthEvent - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'unhealthy_event': {'key': 'UnhealthyEvent', 'type': 'HealthEvent'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, consider_warning_as_error: bool=None, unhealthy_event=None, **kwargs) -> None: - super(EventHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.consider_warning_as_error = consider_warning_as_error - self.unhealthy_event = unhealthy_event - self.kind = 'Event' - - -class ExecutingFaultsChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos has decided on the - faults for an iteration. This Chaos event contains the details of the - faults as a list of strings. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param faults: List of string description of the faults that Chaos decided - to execute in an iteration. - :type faults: list[str] - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'faults': {'key': 'Faults', 'type': '[str]'}, - } - - def __init__(self, *, time_stamp_utc, faults=None, **kwargs) -> None: - super(ExecutingFaultsChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.faults = faults - self.kind = 'ExecutingFaults' - - -class ProvisionApplicationTypeDescriptionBase(Model): - """Represents the type of registration or provision requested, and if the - operation needs to be asynchronous or not. Supported types of provision - operations are from either image store or external store. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ProvisionApplicationTypeDescription, - ExternalStoreProvisionApplicationTypeDescription - - All required parameters must be populated in order to send to Azure. - - :param async_property: Required. Indicates whether or not provisioning - should occur asynchronously. When set to true, the provision operation - returns when the request is accepted by the system, and the provision - operation continues without any timeout limit. The default value is false. - For large application packages, we recommend setting the value to true. - :type async_property: bool - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ImageStorePath': 'ProvisionApplicationTypeDescription', 'ExternalStore': 'ExternalStoreProvisionApplicationTypeDescription'} - } - - def __init__(self, *, async_property: bool, **kwargs) -> None: - super(ProvisionApplicationTypeDescriptionBase, self).__init__(**kwargs) - self.async_property = async_property - self.kind = None - - -class ExternalStoreProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): - """Describes the operation to register or provision an application type using - an application package from an external store instead of a package uploaded - to the Service Fabric image store. - - All required parameters must be populated in order to send to Azure. - - :param async_property: Required. Indicates whether or not provisioning - should occur asynchronously. When set to true, the provision operation - returns when the request is accepted by the system, and the provision - operation continues without any timeout limit. The default value is false. - For large application packages, we recommend setting the value to true. - :type async_property: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_package_download_uri: Required. The path to the - '.sfpkg' application package from where the application package can be - downloaded using HTTP or HTTPS protocols. The application package can be - stored in an external store that provides GET operation to download the - file. Supported protocols are HTTP and HTTPS, and the path must allow READ - access. - :type application_package_download_uri: str - :param application_type_name: Required. The application type name - represents the name of the application type found in the application - manifest. - :type application_type_name: str - :param application_type_version: Required. The application type version - represents the version of the application type found in the application - manifest. - :type application_type_version: str - """ - - _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, - 'application_package_download_uri': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_package_download_uri': {'key': 'ApplicationPackageDownloadUri', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - } - - def __init__(self, *, async_property: bool, application_package_download_uri: str, application_type_name: str, application_type_version: str, **kwargs) -> None: - super(ExternalStoreProvisionApplicationTypeDescription, self).__init__(async_property=async_property, **kwargs) - self.application_package_download_uri = application_package_download_uri - self.application_type_name = application_type_name - self.application_type_version = application_type_version - self.kind = 'ExternalStore' - - -class FabricCodeVersionInfo(Model): - """Information about a Service Fabric code version. - - :param code_version: The product version of Service Fabric. - :type code_version: str - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - } - - def __init__(self, *, code_version: str=None, **kwargs) -> None: - super(FabricCodeVersionInfo, self).__init__(**kwargs) - self.code_version = code_version - - -class FabricConfigVersionInfo(Model): - """Information about a Service Fabric config version. - - :param config_version: The config version of Service Fabric. - :type config_version: str - """ - - _attribute_map = { - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - } - - def __init__(self, *, config_version: str=None, **kwargs) -> None: - super(FabricConfigVersionInfo, self).__init__(**kwargs) - self.config_version = config_version - - -class FabricError(Model): - """The REST API operations for Service Fabric return standard HTTP status - codes. This type defines the additional information returned from the - Service Fabric API operations that are not successful. - - All required parameters must be populated in order to send to Azure. - - :param error: Required. Error object containing error code and error - message. - :type error: ~azure.servicefabric.models.FabricErrorError - """ - - _validation = { - 'error': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'Error', 'type': 'FabricErrorError'}, - } - - def __init__(self, *, error, **kwargs) -> None: - super(FabricError, self).__init__(**kwargs) - self.error = error - - -class FabricErrorException(HttpOperationError): - """Server responsed with exception of type: 'FabricError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(FabricErrorException, self).__init__(deserialize, response, 'FabricError', *args) - - -class FabricErrorError(Model): - """Error object containing error code and error message. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. Defines the fabric error codes that be returned as - part of the error object in response to Service Fabric API operations that - are not successful. Following are the error code values that can be - returned for a specific HTTP status code. - - Possible values of the error code for HTTP status code 400 (Bad Request) - - "FABRIC_E_INVALID_PARTITION_KEY" - - "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" - - "FABRIC_E_INVALID_ADDRESS" - - "FABRIC_E_APPLICATION_NOT_UPGRADING" - - "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" - - "FABRIC_E_FABRIC_NOT_UPGRADING" - - "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" - - "FABRIC_E_INVALID_CONFIGURATION" - - "FABRIC_E_INVALID_NAME_URI" - - "FABRIC_E_PATH_TOO_LONG" - - "FABRIC_E_KEY_TOO_LARGE" - - "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" - - "FABRIC_E_INVALID_ATOMIC_GROUP" - - "FABRIC_E_VALUE_EMPTY" - - "FABRIC_E_BACKUP_IS_ENABLED" - - "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" - - "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" - - "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" - - "E_INVALIDARG" - - Possible values of the error code for HTTP status code 404 (Not Found) - - "FABRIC_E_NODE_NOT_FOUND" - - "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" - - "FABRIC_E_APPLICATION_NOT_FOUND" - - "FABRIC_E_SERVICE_TYPE_NOT_FOUND" - - "FABRIC_E_SERVICE_DOES_NOT_EXIST" - - "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" - - "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" - - "FABRIC_E_PARTITION_NOT_FOUND" - - "FABRIC_E_REPLICA_DOES_NOT_EXIST" - - "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" - - "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" - - "FABRIC_E_DIRECTORY_NOT_FOUND" - - "FABRIC_E_FABRIC_VERSION_NOT_FOUND" - - "FABRIC_E_FILE_NOT_FOUND" - - "FABRIC_E_NAME_DOES_NOT_EXIST" - - "FABRIC_E_PROPERTY_DOES_NOT_EXIST" - - "FABRIC_E_ENUMERATION_COMPLETED" - - "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" - - "FABRIC_E_KEY_NOT_FOUND" - - "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" - - "FABRIC_E_BACKUP_NOT_ENABLED" - - "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" - - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" - - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" - - Possible values of the error code for HTTP status code 409 (Conflict) - - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" - - "FABRIC_E_APPLICATION_ALREADY_EXISTS" - - "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" - - "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" - - "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" - - "FABRIC_E_SERVICE_ALREADY_EXISTS" - - "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" - - "FABRIC_E_APPLICATION_TYPE_IN_USE" - - "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" - - "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" - - "FABRIC_E_FABRIC_VERSION_IN_USE" - - "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" - - "FABRIC_E_NAME_ALREADY_EXISTS" - - "FABRIC_E_NAME_NOT_EMPTY" - - "FABRIC_E_PROPERTY_CHECK_FAILED" - - "FABRIC_E_SERVICE_METADATA_MISMATCH" - - "FABRIC_E_SERVICE_TYPE_MISMATCH" - - "FABRIC_E_HEALTH_STALE_REPORT" - - "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" - - "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" - - "FABRIC_E_INSTANCE_ID_MISMATCH" - - "FABRIC_E_BACKUP_IN_PROGRESS" - - "FABRIC_E_RESTORE_IN_PROGRESS" - - "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" - - Possible values of the error code for HTTP status code 413 (Request - Entity Too Large) - - "FABRIC_E_VALUE_TOO_LARGE" - - Possible values of the error code for HTTP status code 500 (Internal - Server Error) - - "FABRIC_E_NODE_IS_UP" - - "E_FAIL" - - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" - - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" - - "FABRIC_E_VOLUME_ALREADY_EXISTS" - - "FABRIC_E_VOLUME_NOT_FOUND" - - "SerializationError" - - Possible values of the error code for HTTP status code 503 (Service - Unavailable) - - "FABRIC_E_NO_WRITE_QUORUM" - - "FABRIC_E_NOT_PRIMARY" - - "FABRIC_E_NOT_READY" - - "FABRIC_E_RECONFIGURATION_PENDING" - - "FABRIC_E_SERVICE_OFFLINE" - - "E_ABORT" - - "FABRIC_E_VALUE_TOO_LARGE" - - Possible values of the error code for HTTP status code 504 (Gateway - Timeout) - - "FABRIC_E_COMMUNICATION_ERROR" - - "FABRIC_E_OPERATION_NOT_COMPLETE" - - "FABRIC_E_TIMEOUT". Possible values include: - 'FABRIC_E_INVALID_PARTITION_KEY', - 'FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR', 'FABRIC_E_INVALID_ADDRESS', - 'FABRIC_E_APPLICATION_NOT_UPGRADING', - 'FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR', - 'FABRIC_E_FABRIC_NOT_UPGRADING', - 'FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR', - 'FABRIC_E_INVALID_CONFIGURATION', 'FABRIC_E_INVALID_NAME_URI', - 'FABRIC_E_PATH_TOO_LONG', 'FABRIC_E_KEY_TOO_LARGE', - 'FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED', - 'FABRIC_E_INVALID_ATOMIC_GROUP', 'FABRIC_E_VALUE_EMPTY', - 'FABRIC_E_NODE_NOT_FOUND', 'FABRIC_E_APPLICATION_TYPE_NOT_FOUND', - 'FABRIC_E_APPLICATION_NOT_FOUND', 'FABRIC_E_SERVICE_TYPE_NOT_FOUND', - 'FABRIC_E_SERVICE_DOES_NOT_EXIST', - 'FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND', - 'FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND', - 'FABRIC_E_PARTITION_NOT_FOUND', 'FABRIC_E_REPLICA_DOES_NOT_EXIST', - 'FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST', - 'FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND', - 'FABRIC_E_DIRECTORY_NOT_FOUND', 'FABRIC_E_FABRIC_VERSION_NOT_FOUND', - 'FABRIC_E_FILE_NOT_FOUND', 'FABRIC_E_NAME_DOES_NOT_EXIST', - 'FABRIC_E_PROPERTY_DOES_NOT_EXIST', 'FABRIC_E_ENUMERATION_COMPLETED', - 'FABRIC_E_SERVICE_MANIFEST_NOT_FOUND', 'FABRIC_E_KEY_NOT_FOUND', - 'FABRIC_E_HEALTH_ENTITY_NOT_FOUND', - 'FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS', - 'FABRIC_E_APPLICATION_ALREADY_EXISTS', - 'FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION', - 'FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS', - 'FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS', - 'FABRIC_E_SERVICE_ALREADY_EXISTS', - 'FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS', - 'FABRIC_E_APPLICATION_TYPE_IN_USE', - 'FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION', - 'FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS', - 'FABRIC_E_FABRIC_VERSION_IN_USE', 'FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS', - 'FABRIC_E_NAME_ALREADY_EXISTS', 'FABRIC_E_NAME_NOT_EMPTY', - 'FABRIC_E_PROPERTY_CHECK_FAILED', 'FABRIC_E_SERVICE_METADATA_MISMATCH', - 'FABRIC_E_SERVICE_TYPE_MISMATCH', 'FABRIC_E_HEALTH_STALE_REPORT', - 'FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED', - 'FABRIC_E_NODE_HAS_NOT_STOPPED_YET', 'FABRIC_E_INSTANCE_ID_MISMATCH', - 'FABRIC_E_VALUE_TOO_LARGE', 'FABRIC_E_NO_WRITE_QUORUM', - 'FABRIC_E_NOT_PRIMARY', 'FABRIC_E_NOT_READY', - 'FABRIC_E_RECONFIGURATION_PENDING', 'FABRIC_E_SERVICE_OFFLINE', 'E_ABORT', - 'FABRIC_E_COMMUNICATION_ERROR', 'FABRIC_E_OPERATION_NOT_COMPLETE', - 'FABRIC_E_TIMEOUT', 'FABRIC_E_NODE_IS_UP', 'E_FAIL', - 'FABRIC_E_BACKUP_IS_ENABLED', - 'FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH', - 'FABRIC_E_INVALID_FOR_STATELESS_SERVICES', 'FABRIC_E_BACKUP_NOT_ENABLED', - 'FABRIC_E_BACKUP_POLICY_NOT_EXISTING', - 'FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING', - 'FABRIC_E_BACKUP_IN_PROGRESS', 'FABRIC_E_RESTORE_IN_PROGRESS', - 'FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING', - 'FABRIC_E_INVALID_SERVICE_SCALING_POLICY', 'E_INVALIDARG', - 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS', - 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND', - 'FABRIC_E_VOLUME_ALREADY_EXISTS', 'FABRIC_E_VOLUME_NOT_FOUND', - 'SerializationError', 'FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR' - :type code: str or ~azure.servicefabric.models.FabricErrorCodes - :param message: Error message. - :type message: str - """ - - _validation = { - 'code': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'Code', 'type': 'str'}, - 'message': {'key': 'Message', 'type': 'str'}, - } - - def __init__(self, *, code, message: str=None, **kwargs) -> None: - super(FabricErrorError, self).__init__(**kwargs) - self.code = code - self.message = message - - -class PropertyBatchInfo(Model): - """Information about the results of a property batch. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SuccessfulPropertyBatchInfo, FailedPropertyBatchInfo - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Successful': 'SuccessfulPropertyBatchInfo', 'Failed': 'FailedPropertyBatchInfo'} - } - - def __init__(self, **kwargs) -> None: - super(PropertyBatchInfo, self).__init__(**kwargs) - self.kind = None - - -class FailedPropertyBatchInfo(PropertyBatchInfo): - """Derived from PropertyBatchInfo. Represents the property batch failing. - Contains information about the specific batch failure. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param error_message: The error message of the failed operation. Describes - the exception thrown due to the first unsuccessful operation in the - property batch. - :type error_message: str - :param operation_index: The index of the unsuccessful operation in the - property batch. - :type operation_index: int - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'error_message': {'key': 'ErrorMessage', 'type': 'str'}, - 'operation_index': {'key': 'OperationIndex', 'type': 'int'}, - } - - def __init__(self, *, error_message: str=None, operation_index: int=None, **kwargs) -> None: - super(FailedPropertyBatchInfo, self).__init__(**kwargs) - self.error_message = error_message - self.operation_index = operation_index - self.kind = 'Failed' - - -class FailedUpgradeDomainProgressObject(Model): - """The detailed upgrade progress for nodes in the current upgrade domain at - the point of failure. - - :param domain_name: The name of the upgrade domain - :type domain_name: str - :param node_upgrade_progress_list: List of upgrading nodes and their - statuses - :type node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: - super(FailedUpgradeDomainProgressObject, self).__init__(**kwargs) - self.domain_name = domain_name - self.node_upgrade_progress_list = node_upgrade_progress_list - - -class FailureUpgradeDomainProgressInfo(Model): - """Information about the upgrade domain progress at the time of upgrade - failure. - - :param domain_name: The name of the upgrade domain - :type domain_name: str - :param node_upgrade_progress_list: List of upgrading nodes and their - statuses - :type node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: - super(FailureUpgradeDomainProgressInfo, self).__init__(**kwargs) - self.domain_name = domain_name - self.node_upgrade_progress_list = node_upgrade_progress_list - - -class FileInfo(Model): - """Information about a image store file. - - :param file_size: The size of file in bytes. - :type file_size: str - :param file_version: Information about the version of image store file. - :type file_version: ~azure.servicefabric.models.FileVersion - :param modified_date: The date and time when the image store file was last - modified. - :type modified_date: datetime - :param store_relative_path: The file path relative to the image store root - path. - :type store_relative_path: str - """ - - _attribute_map = { - 'file_size': {'key': 'FileSize', 'type': 'str'}, - 'file_version': {'key': 'FileVersion', 'type': 'FileVersion'}, - 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - } - - def __init__(self, *, file_size: str=None, file_version=None, modified_date=None, store_relative_path: str=None, **kwargs) -> None: - super(FileInfo, self).__init__(**kwargs) - self.file_size = file_size - self.file_version = file_version - self.modified_date = modified_date - self.store_relative_path = store_relative_path - - -class FileShareBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for file share storage used for storing or - enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - :param path: Required. UNC path of the file share where to store or - enumerate backups from. - :type path: str - :param primary_user_name: Primary user name to access the file share. - :type primary_user_name: str - :param primary_password: Primary password to access the share location. - :type primary_password: str - :param secondary_user_name: Secondary user name to access the file share. - :type secondary_user_name: str - :param secondary_password: Secondary password to access the share location - :type secondary_password: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'path': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'path': {'key': 'Path', 'type': 'str'}, - 'primary_user_name': {'key': 'PrimaryUserName', 'type': 'str'}, - 'primary_password': {'key': 'PrimaryPassword', 'type': 'str'}, - 'secondary_user_name': {'key': 'SecondaryUserName', 'type': 'str'}, - 'secondary_password': {'key': 'SecondaryPassword', 'type': 'str'}, - } - - def __init__(self, *, path: str, friendly_name: str=None, primary_user_name: str=None, primary_password: str=None, secondary_user_name: str=None, secondary_password: str=None, **kwargs) -> None: - super(FileShareBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) - self.path = path - self.primary_user_name = primary_user_name - self.primary_password = primary_password - self.secondary_user_name = secondary_user_name - self.secondary_password = secondary_password - self.storage_kind = 'FileShare' - - -class FileVersion(Model): - """Information about the version of image store file. - - :param version_number: The current image store version number for the file - is used in image store for checking whether it need to be updated. - :type version_number: str - :param epoch_data_loss_number: The epoch data loss number of image store - replica when this file entry was updated or created. - :type epoch_data_loss_number: str - :param epoch_configuration_number: The epoch configuration version number - of the image store replica when this file entry was created or updated. - :type epoch_configuration_number: str - """ - - _attribute_map = { - 'version_number': {'key': 'VersionNumber', 'type': 'str'}, - 'epoch_data_loss_number': {'key': 'EpochDataLossNumber', 'type': 'str'}, - 'epoch_configuration_number': {'key': 'EpochConfigurationNumber', 'type': 'str'}, - } - - def __init__(self, *, version_number: str=None, epoch_data_loss_number: str=None, epoch_configuration_number: str=None, **kwargs) -> None: - super(FileVersion, self).__init__(**kwargs) - self.version_number = version_number - self.epoch_data_loss_number = epoch_data_loss_number - self.epoch_configuration_number = epoch_configuration_number - - -class FolderInfo(Model): - """Information about a image store folder. It includes how many files this - folder contains and its image store relative path. - - :param store_relative_path: The remote location within image store. This - path is relative to the image store root. - :type store_relative_path: str - :param file_count: The number of files from within the image store folder. - :type file_count: str - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'file_count': {'key': 'FileCount', 'type': 'str'}, - } - - def __init__(self, *, store_relative_path: str=None, file_count: str=None, **kwargs) -> None: - super(FolderInfo, self).__init__(**kwargs) - self.store_relative_path = store_relative_path - self.file_count = file_count - - -class FolderSizeInfo(Model): - """Information of a image store folder size. - - :param store_relative_path: The remote location within image store. This - path is relative to the image store root. - :type store_relative_path: str - :param folder_size: The size of folder in bytes. - :type folder_size: str - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'folder_size': {'key': 'FolderSize', 'type': 'str'}, - } - - def __init__(self, *, store_relative_path: str=None, folder_size: str=None, **kwargs) -> None: - super(FolderSizeInfo, self).__init__(**kwargs) - self.store_relative_path = store_relative_path - self.folder_size = folder_size - - -class FrequencyBasedBackupScheduleDescription(BackupScheduleDescription): - """Describes the frequency based backup schedule. - - All required parameters must be populated in order to send to Azure. - - :param schedule_kind: Required. Constant filled by server. - :type schedule_kind: str - :param interval: Required. Defines the interval with which backups are - periodically taken. It should be specified in ISO8601 format. Timespan in - seconds is not supported and will be ignored while creating the policy. - :type interval: timedelta - """ - - _validation = { - 'schedule_kind': {'required': True}, - 'interval': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - 'interval': {'key': 'Interval', 'type': 'duration'}, - } - - def __init__(self, *, interval, **kwargs) -> None: - super(FrequencyBasedBackupScheduleDescription, self).__init__(**kwargs) - self.interval = interval - self.schedule_kind = 'FrequencyBased' - - -class GatewayDestination(Model): - """Describes destination endpoint for routing traffic. - - All required parameters must be populated in order to send to Azure. - - :param application_name: Required. Name of the service fabric Mesh - application. - :type application_name: str - :param service_name: Required. service that contains the endpoint. - :type service_name: str - :param endpoint_name: Required. name of the endpoint in the service. - :type endpoint_name: str - """ - - _validation = { - 'application_name': {'required': True}, - 'service_name': {'required': True}, - 'endpoint_name': {'required': True}, - } - - _attribute_map = { - 'application_name': {'key': 'applicationName', 'type': 'str'}, - 'service_name': {'key': 'serviceName', 'type': 'str'}, - 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, - } - - def __init__(self, *, application_name: str, service_name: str, endpoint_name: str, **kwargs) -> None: - super(GatewayDestination, self).__init__(**kwargs) - self.application_name = application_name - self.service_name = service_name - self.endpoint_name = endpoint_name - - -class GatewayResourceDescription(Model): - """This type describes a gateway resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Gateway resource. - :type name: str - :param description: User readable description of the gateway. - :type description: str - :param source_network: Required. Network the gateway should listen on for - requests. - :type source_network: ~azure.servicefabric.models.NetworkRef - :param destination_network: Required. Network that the Application is - using. - :type destination_network: ~azure.servicefabric.models.NetworkRef - :param tcp: Configuration for tcp connectivity for this gateway. - :type tcp: list[~azure.servicefabric.models.TcpConfig] - :param http: Configuration for http connectivity for this gateway. - :type http: list[~azure.servicefabric.models.HttpConfig] - :ivar status: Status of the resource. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the gateway. - :vartype status_details: str - :ivar ip_address: IP address of the gateway. This is populated in the - response and is ignored for incoming requests. - :vartype ip_address: str - """ - - _validation = { - 'name': {'required': True}, - 'source_network': {'required': True}, - 'destination_network': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'ip_address': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'source_network': {'key': 'properties.sourceNetwork', 'type': 'NetworkRef'}, - 'destination_network': {'key': 'properties.destinationNetwork', 'type': 'NetworkRef'}, - 'tcp': {'key': 'properties.tcp', 'type': '[TcpConfig]'}, - 'http': {'key': 'properties.http', 'type': '[HttpConfig]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, - } - - def __init__(self, *, name: str, source_network, destination_network, description: str=None, tcp=None, http=None, **kwargs) -> None: - super(GatewayResourceDescription, self).__init__(**kwargs) - self.name = name - self.description = description - self.source_network = source_network - self.destination_network = destination_network - self.tcp = tcp - self.http = http - self.status = None - self.status_details = None - self.ip_address = None - - -class GetBackupByStorageQueryDescription(Model): - """Describes additional filters to be applied, while listing backups, and - backup storage details from where to fetch the backups. - - All required parameters must be populated in order to send to Azure. - - :param start_date_time_filter: Specifies the start date time in ISO8601 - from which to enumerate backups. If not specified, backups are enumerated - from the beginning. - :type start_date_time_filter: datetime - :param end_date_time_filter: Specifies the end date time in ISO8601 till - which to enumerate backups. If not specified, backups are enumerated till - the end. - :type end_date_time_filter: datetime - :param latest: If specified as true, gets the most recent backup (within - the specified time range) for every partition under the specified backup - entity. Default value: False . - :type latest: bool - :param storage: Required. Describes the parameters for the backup storage - from where to enumerate backups. This is optional and by default backups - are enumerated from the backup storage where this backup entity is - currently being backed up (as specified in backup policy). This parameter - is useful to be able to enumerate backups from another cluster where you - may intend to restore. - :type storage: ~azure.servicefabric.models.BackupStorageDescription - :param backup_entity: Required. Indicates the entity for which to - enumerate backups. - :type backup_entity: ~azure.servicefabric.models.BackupEntity - """ - - _validation = { - 'storage': {'required': True}, - 'backup_entity': {'required': True}, - } - - _attribute_map = { - 'start_date_time_filter': {'key': 'StartDateTimeFilter', 'type': 'iso-8601'}, - 'end_date_time_filter': {'key': 'EndDateTimeFilter', 'type': 'iso-8601'}, - 'latest': {'key': 'Latest', 'type': 'bool'}, - 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, - 'backup_entity': {'key': 'BackupEntity', 'type': 'BackupEntity'}, - } - - def __init__(self, *, storage, backup_entity, start_date_time_filter=None, end_date_time_filter=None, latest: bool=False, **kwargs) -> None: - super(GetBackupByStorageQueryDescription, self).__init__(**kwargs) - self.start_date_time_filter = start_date_time_filter - self.end_date_time_filter = end_date_time_filter - self.latest = latest - self.storage = storage - self.backup_entity = backup_entity - - -class GetPropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that gets the specified property if it - exists. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param include_value: Whether or not to return the property value with the - metadata. - True if values should be returned with the metadata; False to return only - property metadata. Default value: False . - :type include_value: bool - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'include_value': {'key': 'IncludeValue', 'type': 'bool'}, - } - - def __init__(self, *, property_name: str, include_value: bool=False, **kwargs) -> None: - super(GetPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.include_value = include_value - self.kind = 'Get' - - -class GuidPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Guid. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. The data of the property value. - :type data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__(self, *, data: str, **kwargs) -> None: - super(GuidPropertyValue, self).__init__(**kwargs) - self.data = data - self.kind = 'Guid' - - -class HealthEvaluationWrapper(Model): - """Wrapper object for health evaluation. - - :param health_evaluation: Represents a health evaluation which describes - the data and the algorithm used by health manager to evaluate the health - of an entity. - :type health_evaluation: ~azure.servicefabric.models.HealthEvaluation - """ - - _attribute_map = { - 'health_evaluation': {'key': 'HealthEvaluation', 'type': 'HealthEvaluation'}, - } - - def __init__(self, *, health_evaluation=None, **kwargs) -> None: - super(HealthEvaluationWrapper, self).__init__(**kwargs) - self.health_evaluation = health_evaluation - - -class HealthInformation(Model): - """Represents common health report information. It is included in all health - reports sent to health store and in all health events returned by health - queries. - - All required parameters must be populated in order to send to Azure. - - :param source_id: Required. The source name that identifies the - client/watchdog/system component that generated the health information. - :type source_id: str - :param property: Required. The property of the health information. An - entity can have health reports for different properties. - The property is a string and not a fixed enumeration to allow the reporter - flexibility to categorize the state condition that triggers the report. - For example, a reporter with SourceId "LocalWatchdog" can monitor the - state of the available disk on a node, - so it can report "AvailableDisk" property on that node. - The same reporter can monitor the node connectivity, so it can report a - property "Connectivity" on the same node. - In the health store, these reports are treated as separate health events - for the specified node. - Together with the SourceId, the property uniquely identifies the health - information. - :type property: str - :param health_state: Required. The health state of a Service Fabric entity - such as Cluster, Node, Application, Service, Partition, Replica etc. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param time_to_live_in_milli_seconds: The duration for which this health - report is valid. This field uses ISO8601 format for specifying the - duration. - When clients report periodically, they should send reports with higher - frequency than time to live. - If clients report on transition, they can set the time to live to - infinite. - When time to live expires, the health event that contains the health - information - is either removed from health store, if RemoveWhenExpired is true, or - evaluated at error, if RemoveWhenExpired false. - If not specified, time to live defaults to infinite value. - :type time_to_live_in_milli_seconds: timedelta - :param description: The description of the health information. It - represents free text used to add human readable information about the - report. - The maximum string length for the description is 4096 characters. - If the provided string is longer, it will be automatically truncated. - When truncated, the last characters of the description contain a marker - "[Truncated]", and total string size is 4096 characters. - The presence of the marker indicates to users that truncation occurred. - Note that when truncated, the description has less than 4096 characters - from the original string. - :type description: str - :param sequence_number: The sequence number for this health report as a - numeric string. - The report sequence number is used by the health store to detect stale - reports. - If not specified, a sequence number is auto-generated by the health client - when a report is added. - :type sequence_number: str - :param remove_when_expired: Value that indicates whether the report is - removed from health store when it expires. - If set to true, the report is removed from the health store after it - expires. - If set to false, the report is treated as an error when expired. The value - of this property is false by default. - When clients report periodically, they should set RemoveWhenExpired false - (default). - This way, if the reporter has issues (e.g. deadlock) and can't report, the - entity is evaluated at error when the health report expires. - This flags the entity as being in Error health state. - :type remove_when_expired: bool - :param health_report_id: A health report ID which identifies the health - report and can be used to find more detailed information about a specific - health event at - aka.ms/sfhealthid - :type health_report_id: str - """ - - _validation = { - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - } - - _attribute_map = { - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, - } - - def __init__(self, *, source_id: str, property: str, health_state, time_to_live_in_milli_seconds=None, description: str=None, sequence_number: str=None, remove_when_expired: bool=None, health_report_id: str=None, **kwargs) -> None: - super(HealthInformation, self).__init__(**kwargs) - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_in_milli_seconds = time_to_live_in_milli_seconds - self.description = description - self.sequence_number = sequence_number - self.remove_when_expired = remove_when_expired - self.health_report_id = health_report_id - - -class HealthEvent(HealthInformation): - """Represents health information reported on a health entity, such as cluster, - application or node, with additional metadata added by the Health Manager. - - All required parameters must be populated in order to send to Azure. - - :param source_id: Required. The source name that identifies the - client/watchdog/system component that generated the health information. - :type source_id: str - :param property: Required. The property of the health information. An - entity can have health reports for different properties. - The property is a string and not a fixed enumeration to allow the reporter - flexibility to categorize the state condition that triggers the report. - For example, a reporter with SourceId "LocalWatchdog" can monitor the - state of the available disk on a node, - so it can report "AvailableDisk" property on that node. - The same reporter can monitor the node connectivity, so it can report a - property "Connectivity" on the same node. - In the health store, these reports are treated as separate health events - for the specified node. - Together with the SourceId, the property uniquely identifies the health - information. - :type property: str - :param health_state: Required. The health state of a Service Fabric entity - such as Cluster, Node, Application, Service, Partition, Replica etc. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param time_to_live_in_milli_seconds: The duration for which this health - report is valid. This field uses ISO8601 format for specifying the - duration. - When clients report periodically, they should send reports with higher - frequency than time to live. - If clients report on transition, they can set the time to live to - infinite. - When time to live expires, the health event that contains the health - information - is either removed from health store, if RemoveWhenExpired is true, or - evaluated at error, if RemoveWhenExpired false. - If not specified, time to live defaults to infinite value. - :type time_to_live_in_milli_seconds: timedelta - :param description: The description of the health information. It - represents free text used to add human readable information about the - report. - The maximum string length for the description is 4096 characters. - If the provided string is longer, it will be automatically truncated. - When truncated, the last characters of the description contain a marker - "[Truncated]", and total string size is 4096 characters. - The presence of the marker indicates to users that truncation occurred. - Note that when truncated, the description has less than 4096 characters - from the original string. - :type description: str - :param sequence_number: The sequence number for this health report as a - numeric string. - The report sequence number is used by the health store to detect stale - reports. - If not specified, a sequence number is auto-generated by the health client - when a report is added. - :type sequence_number: str - :param remove_when_expired: Value that indicates whether the report is - removed from health store when it expires. - If set to true, the report is removed from the health store after it - expires. - If set to false, the report is treated as an error when expired. The value - of this property is false by default. - When clients report periodically, they should set RemoveWhenExpired false - (default). - This way, if the reporter has issues (e.g. deadlock) and can't report, the - entity is evaluated at error when the health report expires. - This flags the entity as being in Error health state. - :type remove_when_expired: bool - :param health_report_id: A health report ID which identifies the health - report and can be used to find more detailed information about a specific - health event at - aka.ms/sfhealthid - :type health_report_id: str - :param is_expired: Returns true if the health event is expired, otherwise - false. - :type is_expired: bool - :param source_utc_timestamp: The date and time when the health report was - sent by the source. - :type source_utc_timestamp: datetime - :param last_modified_utc_timestamp: The date and time when the health - report was last modified by the health store. - :type last_modified_utc_timestamp: datetime - :param last_ok_transition_at: If the current health state is 'Ok', this - property returns the time at which the health report was first reported - with 'Ok'. - For periodic reporting, many reports with the same state may have been - generated. - This property returns the date and time when the first 'Ok' health report - was received. - If the current health state is 'Error' or 'Warning', returns the date and - time at which the health state was last in 'Ok', before transitioning to a - different state. - If the health state was never 'Ok', the value will be zero date-time. - :type last_ok_transition_at: datetime - :param last_warning_transition_at: If the current health state is - 'Warning', this property returns the time at which the health report was - first reported with 'Warning'. For periodic reporting, many reports with - the same state may have been generated however, this property returns only - the date and time at the first 'Warning' health report was received. - If the current health state is 'Ok' or 'Error', returns the date and time - at which the health state was last in 'Warning', before transitioning to a - different state. - If the health state was never 'Warning', the value will be zero date-time. - :type last_warning_transition_at: datetime - :param last_error_transition_at: If the current health state is 'Error', - this property returns the time at which the health report was first - reported with 'Error'. For periodic reporting, many reports with the same - state may have been generated however, this property returns only the date - and time at the first 'Error' health report was received. - If the current health state is 'Ok' or 'Warning', returns the date and - time at which the health state was last in 'Error', before transitioning - to a different state. - If the health state was never 'Error', the value will be zero date-time. - :type last_error_transition_at: datetime - """ - - _validation = { - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - } - - _attribute_map = { - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, - 'is_expired': {'key': 'IsExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, - 'last_ok_transition_at': {'key': 'LastOkTransitionAt', 'type': 'iso-8601'}, - 'last_warning_transition_at': {'key': 'LastWarningTransitionAt', 'type': 'iso-8601'}, - 'last_error_transition_at': {'key': 'LastErrorTransitionAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, source_id: str, property: str, health_state, time_to_live_in_milli_seconds=None, description: str=None, sequence_number: str=None, remove_when_expired: bool=None, health_report_id: str=None, is_expired: bool=None, source_utc_timestamp=None, last_modified_utc_timestamp=None, last_ok_transition_at=None, last_warning_transition_at=None, last_error_transition_at=None, **kwargs) -> None: - super(HealthEvent, self).__init__(source_id=source_id, property=property, health_state=health_state, time_to_live_in_milli_seconds=time_to_live_in_milli_seconds, description=description, sequence_number=sequence_number, remove_when_expired=remove_when_expired, health_report_id=health_report_id, **kwargs) - self.is_expired = is_expired - self.source_utc_timestamp = source_utc_timestamp - self.last_modified_utc_timestamp = last_modified_utc_timestamp - self.last_ok_transition_at = last_ok_transition_at - self.last_warning_transition_at = last_warning_transition_at - self.last_error_transition_at = last_error_transition_at - - -class HealthStateCount(Model): - """Represents information about how many health entities are in Ok, Warning - and Error health state. - - :param ok_count: The number of health entities with aggregated health - state Ok. - :type ok_count: long - :param warning_count: The number of health entities with aggregated health - state Warning. - :type warning_count: long - :param error_count: The number of health entities with aggregated health - state Error. - :type error_count: long - """ - - _validation = { - 'ok_count': {'minimum': 0}, - 'warning_count': {'minimum': 0}, - 'error_count': {'minimum': 0}, - } - - _attribute_map = { - 'ok_count': {'key': 'OkCount', 'type': 'long'}, - 'warning_count': {'key': 'WarningCount', 'type': 'long'}, - 'error_count': {'key': 'ErrorCount', 'type': 'long'}, - } - - def __init__(self, *, ok_count: int=None, warning_count: int=None, error_count: int=None, **kwargs) -> None: - super(HealthStateCount, self).__init__(**kwargs) - self.ok_count = ok_count - self.warning_count = warning_count - self.error_count = error_count - - -class HealthStatistics(Model): - """The health statistics of an entity, returned as part of the health query - result when the query description is configured to include statistics. - The statistics include health state counts for all children types of the - current entity. - For example, for cluster, the health statistics include health state counts - for nodes, applications, services, partitions, replicas, deployed - applications and deployed service packages. - For partition, the health statistics include health counts for replicas. - - :param health_state_count_list: List of health state counts per entity - kind, which keeps track of how many children of the queried entity are in - Ok, Warning and Error state. - :type health_state_count_list: - list[~azure.servicefabric.models.EntityKindHealthStateCount] - """ - - _attribute_map = { - 'health_state_count_list': {'key': 'HealthStateCountList', 'type': '[EntityKindHealthStateCount]'}, - } - - def __init__(self, *, health_state_count_list=None, **kwargs) -> None: - super(HealthStatistics, self).__init__(**kwargs) - self.health_state_count_list = health_state_count_list - - -class HttpConfig(Model): - """Describes the http configuration for external connectivity for this - network. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. http gateway config name. - :type name: str - :param port: Required. Specifies the port at which the service endpoint - below needs to be exposed. - :type port: int - :param hosts: Required. description for routing. - :type hosts: list[~azure.servicefabric.models.HttpHostConfig] - """ - - _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'hosts': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'hosts': {'key': 'hosts', 'type': '[HttpHostConfig]'}, - } - - def __init__(self, *, name: str, port: int, hosts, **kwargs) -> None: - super(HttpConfig, self).__init__(**kwargs) - self.name = name - self.port = port - self.hosts = hosts - - -class HttpHostConfig(Model): - """Describes the hostname properties for http routing. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. http hostname config name. - :type name: str - :param routes: Required. Route information to use for routing. Routes are - processed in the order they are specified. Specify routes that are more - specific before routes that can handle general cases. - :type routes: list[~azure.servicefabric.models.HttpRouteConfig] - """ - - _validation = { - 'name': {'required': True}, - 'routes': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'routes': {'key': 'routes', 'type': '[HttpRouteConfig]'}, - } - - def __init__(self, *, name: str, routes, **kwargs) -> None: - super(HttpHostConfig, self).__init__(**kwargs) - self.name = name - self.routes = routes - - -class HttpRouteConfig(Model): - """Describes the hostname properties for http routing. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. http route name. - :type name: str - :param match: Required. Describes a rule for http route matching. - :type match: ~azure.servicefabric.models.HttpRouteMatchRule - :param destination: Required. Describes destination endpoint for routing - traffic. - :type destination: ~azure.servicefabric.models.GatewayDestination - """ - - _validation = { - 'name': {'required': True}, - 'match': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'match': {'key': 'match', 'type': 'HttpRouteMatchRule'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, - } - - def __init__(self, *, name: str, match, destination, **kwargs) -> None: - super(HttpRouteConfig, self).__init__(**kwargs) - self.name = name - self.match = match - self.destination = destination - - -class HttpRouteMatchHeader(Model): - """Describes header information for http route matching. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of header to match in request. - :type name: str - :param value: Value of header to match in request. - :type value: str - :param type: how to match header value. Possible values include: 'exact' - :type type: str or ~azure.servicefabric.models.HeaderMatchType - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str=None, type=None, **kwargs) -> None: - super(HttpRouteMatchHeader, self).__init__(**kwargs) - self.name = name - self.value = value - self.type = type - - -class HttpRouteMatchPath(Model): - """Path to match for routing. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. Uri path to match for request. - :type value: str - :param rewrite: replacement string for matched part of the Uri. - :type rewrite: str - :ivar type: Required. how to match value in the Uri. Default value: - "prefix" . - :vartype type: str - """ - - _validation = { - 'value': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'rewrite': {'key': 'rewrite', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "prefix" - - def __init__(self, *, value: str, rewrite: str=None, **kwargs) -> None: - super(HttpRouteMatchPath, self).__init__(**kwargs) - self.value = value - self.rewrite = rewrite - - -class HttpRouteMatchRule(Model): - """Describes a rule for http route matching. - - All required parameters must be populated in order to send to Azure. - - :param path: Required. Path to match for routing. - :type path: ~azure.servicefabric.models.HttpRouteMatchPath - :param headers: headers and their values to match in request. - :type headers: list[~azure.servicefabric.models.HttpRouteMatchHeader] - """ - - _validation = { - 'path': {'required': True}, - } - - _attribute_map = { - 'path': {'key': 'path', 'type': 'HttpRouteMatchPath'}, - 'headers': {'key': 'headers', 'type': '[HttpRouteMatchHeader]'}, - } - - def __init__(self, *, path, headers=None, **kwargs) -> None: - super(HttpRouteMatchRule, self).__init__(**kwargs) - self.path = path - self.headers = headers - - -class IdentityDescription(Model): - """Information describing the identities associated with this application. - - All required parameters must be populated in order to send to Azure. - - :param token_service_endpoint: the endpoint for the token service managing - this identity - :type token_service_endpoint: str - :param type: Required. the types of identities associated with this - resource; currently restricted to 'SystemAssigned and UserAssigned' - :type type: str - :param tenant_id: the identifier of the tenant containing the - application's identity. - :type tenant_id: str - :param principal_id: the object identifier of the Service Principal of the - identity associated with this resource. - :type principal_id: str - :param user_assigned_identities: represents user assigned identities map. - :type user_assigned_identities: dict[str, - ~azure.servicefabric.models.IdentityItemDescription] - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'token_service_endpoint': {'key': 'tokenServiceEndpoint', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{IdentityItemDescription}'}, - } - - def __init__(self, *, type: str, token_service_endpoint: str=None, tenant_id: str=None, principal_id: str=None, user_assigned_identities=None, **kwargs) -> None: - super(IdentityDescription, self).__init__(**kwargs) - self.token_service_endpoint = token_service_endpoint - self.type = type - self.tenant_id = tenant_id - self.principal_id = principal_id - self.user_assigned_identities = user_assigned_identities - - -class IdentityItemDescription(Model): - """Describes a single user-assigned identity associated with the application. - - :param principal_id: the object identifier of the Service Principal which - this identity represents. - :type principal_id: str - :param client_id: the client identifier of the Service Principal which - this identity represents. - :type client_id: str - """ - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, *, principal_id: str=None, client_id: str=None, **kwargs) -> None: - super(IdentityItemDescription, self).__init__(**kwargs) - self.principal_id = principal_id - self.client_id = client_id - - -class ImageRegistryCredential(Model): - """Image registry credential. - - All required parameters must be populated in order to send to Azure. - - :param server: Required. Docker image registry server, without protocol - such as `http` and `https`. - :type server: str - :param username: Required. The username for the private registry. - :type username: str - :param password_type: The type of the image registry password being given - in password. Possible values include: 'ClearText', 'KeyVaultReference', - 'SecretValueReference'. Default value: "ClearText" . - :type password_type: str or - ~azure.servicefabric.models.ImageRegistryPasswordType - :param password: The password for the private registry. The password is - required for create or update operations, however it is not returned in - the get or list operations. Will be processed based on the type provided. - :type password: str - """ - - _validation = { - 'server': {'required': True}, - 'username': {'required': True}, - } - - _attribute_map = { - 'server': {'key': 'server', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password_type': {'key': 'passwordType', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__(self, *, server: str, username: str, password_type="ClearText", password: str=None, **kwargs) -> None: - super(ImageRegistryCredential, self).__init__(**kwargs) - self.server = server - self.username = username - self.password_type = password_type - self.password = password - - -class ImageStoreContent(Model): - """Information about the image store content. - - :param store_files: The list of image store file info objects represents - files found under the given image store relative path. - :type store_files: list[~azure.servicefabric.models.FileInfo] - :param store_folders: The list of image store folder info objects - represents subfolders found under the given image store relative path. - :type store_folders: list[~azure.servicefabric.models.FolderInfo] - """ - - _attribute_map = { - 'store_files': {'key': 'StoreFiles', 'type': '[FileInfo]'}, - 'store_folders': {'key': 'StoreFolders', 'type': '[FolderInfo]'}, - } - - def __init__(self, *, store_files=None, store_folders=None, **kwargs) -> None: - super(ImageStoreContent, self).__init__(**kwargs) - self.store_files = store_files - self.store_folders = store_folders - - -class ImageStoreCopyDescription(Model): - """Information about how to copy image store content from one image store - relative path to another image store relative path. - - All required parameters must be populated in order to send to Azure. - - :param remote_source: Required. The relative path of source image store - content to be copied from. - :type remote_source: str - :param remote_destination: Required. The relative path of destination - image store content to be copied to. - :type remote_destination: str - :param skip_files: The list of the file names to be skipped for copying. - :type skip_files: list[str] - :param check_mark_file: Indicates whether to check mark file during - copying. The property is true if checking mark file is required, false - otherwise. The mark file is used to check whether the folder is well - constructed. If the property is true and mark file does not exist, the - copy is skipped. - :type check_mark_file: bool - """ - - _validation = { - 'remote_source': {'required': True}, - 'remote_destination': {'required': True}, - } - - _attribute_map = { - 'remote_source': {'key': 'RemoteSource', 'type': 'str'}, - 'remote_destination': {'key': 'RemoteDestination', 'type': 'str'}, - 'skip_files': {'key': 'SkipFiles', 'type': '[str]'}, - 'check_mark_file': {'key': 'CheckMarkFile', 'type': 'bool'}, - } - - def __init__(self, *, remote_source: str, remote_destination: str, skip_files=None, check_mark_file: bool=None, **kwargs) -> None: - super(ImageStoreCopyDescription, self).__init__(**kwargs) - self.remote_source = remote_source - self.remote_destination = remote_destination - self.skip_files = skip_files - self.check_mark_file = check_mark_file - - -class ImageStoreInfo(Model): - """Information about the ImageStore's resource usage. - - :param disk_info: disk capacity and available disk space on the node where - the ImageStore primary is placed. - :type disk_info: ~azure.servicefabric.models.DiskInfo - :param used_by_metadata: the ImageStore's file system usage for metadata. - :type used_by_metadata: ~azure.servicefabric.models.UsageInfo - :param used_by_staging: The ImageStore's file system usage for staging - files that are being uploaded. - :type used_by_staging: ~azure.servicefabric.models.UsageInfo - :param used_by_copy: the ImageStore's file system usage for copied - application and cluster packages. [Removing application and cluster - packages](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-deleteimagestorecontent) - will free up this space. - :type used_by_copy: ~azure.servicefabric.models.UsageInfo - :param used_by_register: the ImageStore's file system usage for registered - and cluster packages. [Unregistering - application](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) - and [cluster - packages](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) - will free up this space. - :type used_by_register: ~azure.servicefabric.models.UsageInfo - """ - - _attribute_map = { - 'disk_info': {'key': 'DiskInfo', 'type': 'DiskInfo'}, - 'used_by_metadata': {'key': 'UsedByMetadata', 'type': 'UsageInfo'}, - 'used_by_staging': {'key': 'UsedByStaging', 'type': 'UsageInfo'}, - 'used_by_copy': {'key': 'UsedByCopy', 'type': 'UsageInfo'}, - 'used_by_register': {'key': 'UsedByRegister', 'type': 'UsageInfo'}, - } - - def __init__(self, *, disk_info=None, used_by_metadata=None, used_by_staging=None, used_by_copy=None, used_by_register=None, **kwargs) -> None: - super(ImageStoreInfo, self).__init__(**kwargs) - self.disk_info = disk_info - self.used_by_metadata = used_by_metadata - self.used_by_staging = used_by_staging - self.used_by_copy = used_by_copy - self.used_by_register = used_by_register - - -class SecretResourcePropertiesBase(Model): - """This type describes the properties of a secret resource, including its - kind. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SecretResourceProperties - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'SecretResourceProperties': 'SecretResourceProperties'} - } - - def __init__(self, **kwargs) -> None: - super(SecretResourcePropertiesBase, self).__init__(**kwargs) - self.kind = None - - -class SecretResourceProperties(SecretResourcePropertiesBase): - """Describes the properties of a secret resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: InlinedValueSecretResourceProperties - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param description: User readable description of the secret. - :type description: str - :ivar status: Status of the resource. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the secret. - :vartype status_details: str - :param content_type: The type of the content stored in the secret value. - The value of this property is opaque to Service Fabric. Once set, the - value of this property cannot be changed. - :type content_type: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'inlinedValue': 'InlinedValueSecretResourceProperties'} - } - - def __init__(self, *, description: str=None, content_type: str=None, **kwargs) -> None: - super(SecretResourceProperties, self).__init__(**kwargs) - self.description = description - self.status = None - self.status_details = None - self.content_type = content_type - self.kind = 'SecretResourceProperties' - - -class InlinedValueSecretResourceProperties(SecretResourceProperties): - """Describes the properties of a secret resource whose value is provided - explicitly as plaintext. The secret resource may have multiple values, each - being uniquely versioned. The secret value of each version is stored - encrypted, and delivered as plaintext into the context of applications - referencing it. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param description: User readable description of the secret. - :type description: str - :ivar status: Status of the resource. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the secret. - :vartype status_details: str - :param content_type: The type of the content stored in the secret value. - The value of this property is opaque to Service Fabric. Once set, the - value of this property cannot be changed. - :type content_type: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, content_type: str=None, **kwargs) -> None: - super(InlinedValueSecretResourceProperties, self).__init__(description=description, content_type=content_type, **kwargs) - self.kind = 'inlinedValue' - - -class InstanceLifecycleDescription(Model): - """Describes how the instance will behave. - - :param restore_replica_location_after_upgrade: If set to true, move/swap - replica to original location after upgrade. - :type restore_replica_location_after_upgrade: bool - """ - - _attribute_map = { - 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, - } - - def __init__(self, *, restore_replica_location_after_upgrade: bool=None, **kwargs) -> None: - super(InstanceLifecycleDescription, self).__init__(**kwargs) - self.restore_replica_location_after_upgrade = restore_replica_location_after_upgrade - - -class Int64PropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Int64. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. The data of the property value. - :type data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__(self, *, data: str, **kwargs) -> None: - super(Int64PropertyValue, self).__init__(**kwargs) - self.data = data - self.kind = 'Int64' - - -class PartitionInformation(Model): - """Information about the partition identity, partitioning scheme and keys - supported by it. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Int64RangePartitionInformation, NamedPartitionInformation, - SingletonPartitionInformation - - All required parameters must be populated in order to send to Azure. - - :param id: An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. - The partition ID is unique and does not change for the lifetime of the - service. If the same service was deleted and recreated the IDs of its - partitions would be different. - :type id: str - :param service_partition_kind: Required. Constant filled by server. - :type service_partition_kind: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_partition_kind': {'Int64Range': 'Int64RangePartitionInformation', 'Named': 'NamedPartitionInformation', 'Singleton': 'SingletonPartitionInformation'} - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(PartitionInformation, self).__init__(**kwargs) - self.id = id - self.service_partition_kind = None - - -class Int64RangePartitionInformation(PartitionInformation): - """Describes the partition information for the integer range that is based on - partition schemes. - - All required parameters must be populated in order to send to Azure. - - :param id: An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. - The partition ID is unique and does not change for the lifetime of the - service. If the same service was deleted and recreated the IDs of its - partitions would be different. - :type id: str - :param service_partition_kind: Required. Constant filled by server. - :type service_partition_kind: str - :param low_key: Specifies the minimum key value handled by this partition. - :type low_key: str - :param high_key: Specifies the maximum key value handled by this - partition. - :type high_key: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, low_key: str=None, high_key: str=None, **kwargs) -> None: - super(Int64RangePartitionInformation, self).__init__(id=id, **kwargs) - self.low_key = low_key - self.high_key = high_key - self.service_partition_kind = 'Int64Range' - - -class InvokeDataLossResult(Model): - """Represents information about an operation in a terminal state (Completed or - Faulted). - - :param error_code: If OperationState is Completed, this is 0. If - OperationState is Faulted, this is an error code indicating the reason. - :type error_code: int - :param selected_partition: This class returns information about the - partition that the user-induced operation acted upon. - :type selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__(self, *, error_code: int=None, selected_partition=None, **kwargs) -> None: - super(InvokeDataLossResult, self).__init__(**kwargs) - self.error_code = error_code - self.selected_partition = selected_partition - - -class InvokeQuorumLossResult(Model): - """Represents information about an operation in a terminal state (Completed or - Faulted). - - :param error_code: If OperationState is Completed, this is 0. If - OperationState is Faulted, this is an error code indicating the reason. - :type error_code: int - :param selected_partition: This class returns information about the - partition that the user-induced operation acted upon. - :type selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__(self, *, error_code: int=None, selected_partition=None, **kwargs) -> None: - super(InvokeQuorumLossResult, self).__init__(**kwargs) - self.error_code = error_code - self.selected_partition = selected_partition - - -class ReplicaStatusBase(Model): - """Information about the replica. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: KeyValueStoreReplicaStatus - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'KeyValueStore': 'KeyValueStoreReplicaStatus'} - } - - def __init__(self, **kwargs) -> None: - super(ReplicaStatusBase, self).__init__(**kwargs) - self.kind = None - - -class KeyValueStoreReplicaStatus(ReplicaStatusBase): - """Key value store related information for the replica. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param database_row_count_estimate: Value indicating the estimated number - of rows in the underlying database. - :type database_row_count_estimate: str - :param database_logical_size_estimate: Value indicating the estimated size - of the underlying database. - :type database_logical_size_estimate: str - :param copy_notification_current_key_filter: Value indicating the latest - key-prefix filter applied to enumeration during the callback. Null if - there is no pending callback. - :type copy_notification_current_key_filter: str - :param copy_notification_current_progress: Value indicating the latest - number of keys enumerated during the callback. 0 if there is no pending - callback. - :type copy_notification_current_progress: str - :param status_details: Value indicating the current status details of the - replica. - :type status_details: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'database_row_count_estimate': {'key': 'DatabaseRowCountEstimate', 'type': 'str'}, - 'database_logical_size_estimate': {'key': 'DatabaseLogicalSizeEstimate', 'type': 'str'}, - 'copy_notification_current_key_filter': {'key': 'CopyNotificationCurrentKeyFilter', 'type': 'str'}, - 'copy_notification_current_progress': {'key': 'CopyNotificationCurrentProgress', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - } - - def __init__(self, *, database_row_count_estimate: str=None, database_logical_size_estimate: str=None, copy_notification_current_key_filter: str=None, copy_notification_current_progress: str=None, status_details: str=None, **kwargs) -> None: - super(KeyValueStoreReplicaStatus, self).__init__(**kwargs) - self.database_row_count_estimate = database_row_count_estimate - self.database_logical_size_estimate = database_logical_size_estimate - self.copy_notification_current_key_filter = copy_notification_current_key_filter - self.copy_notification_current_progress = copy_notification_current_progress - self.status_details = status_details - self.kind = 'KeyValueStore' - - -class LoadedPartitionInformationQueryDescription(Model): - """Represents data structure that contains query information. - - :param metric_name: Name of the metric for which this information is - provided. - :type metric_name: str - :param service_name: Name of the service this partition belongs to. - :type service_name: str - :param ordering: Ordering of partitions' load. Possible values include: - 'Desc', 'Asc'. Default value: "Desc" . - :type ordering: str or ~azure.servicefabric.models.Ordering - :param max_results: The maximum number of results to be returned as part - of the paged queries. This parameter defines the upper bound on the number - of results returned. The results returned can be less than the specified - maximum results if they do not fit in the message as per the max message - size restrictions defined in the configuration. If this parameter is zero - or not specified, the paged query includes as many results as possible - that fit in the return message. - :type max_results: long - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - """ - - _attribute_map = { - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'ordering': {'key': 'Ordering', 'type': 'str'}, - 'max_results': {'key': 'MaxResults', 'type': 'long'}, - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - } - - def __init__(self, *, metric_name: str=None, service_name: str=None, ordering="Desc", max_results: int=None, continuation_token: str=None, **kwargs) -> None: - super(LoadedPartitionInformationQueryDescription, self).__init__(**kwargs) - self.metric_name = metric_name - self.service_name = service_name - self.ordering = ordering - self.max_results = max_results - self.continuation_token = continuation_token - - -class LoadedPartitionInformationResult(Model): - """Represents partition information. - - All required parameters must be populated in order to send to Azure. - - :param service_name: Required. Name of the service this partition belongs - to. - :type service_name: str - :param partition_id: Required. Id of the partition. - :type partition_id: str - :param metric_name: Required. Name of the metric for which this - information is provided. - :type metric_name: str - :param load: Required. Load for metric. - :type load: long - """ - - _validation = { - 'service_name': {'required': True}, - 'partition_id': {'required': True}, - 'metric_name': {'required': True}, - 'load': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'load': {'key': 'Load', 'type': 'long'}, - } - - def __init__(self, *, service_name: str, partition_id: str, metric_name: str, load: int, **kwargs) -> None: - super(LoadedPartitionInformationResult, self).__init__(**kwargs) - self.service_name = service_name - self.partition_id = partition_id - self.metric_name = metric_name - self.load = load - - -class LoadedPartitionInformationResultList(Model): - """Represents data structure that contains top/least loaded partitions for a - certain metric. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of application information. - :type items: - list[~azure.servicefabric.models.LoadedPartitionInformationResult] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[LoadedPartitionInformationResult]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(LoadedPartitionInformationResultList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class LoadMetricInformation(Model): - """Represents data structure that contains load information for a certain - metric in a cluster. - - :param name: Name of the metric for which this load information is - provided. - :type name: str - :param is_balanced_before: Value that indicates whether the metrics is - balanced or not before resource balancer run - :type is_balanced_before: bool - :param is_balanced_after: Value that indicates whether the metrics is - balanced or not after resource balancer run. - :type is_balanced_after: bool - :param deviation_before: The standard average deviation of the metrics - before resource balancer run. - :type deviation_before: str - :param deviation_after: The standard average deviation of the metrics - after resource balancer run. - :type deviation_after: str - :param balancing_threshold: The balancing threshold for a certain metric. - :type balancing_threshold: str - :param action: The current action being taken with regard to this metric - :type action: str - :param activity_threshold: The Activity Threshold specified for this - metric in the system Cluster Manifest. - :type activity_threshold: str - :param cluster_capacity: The total cluster capacity for a given metric - :type cluster_capacity: str - :param cluster_load: The total cluster load. In future releases of Service - Fabric this parameter will be deprecated in favor of CurrentClusterLoad. - :type cluster_load: str - :param current_cluster_load: The total cluster load. - :type current_cluster_load: str - :param cluster_remaining_capacity: The remaining capacity for the metric - in the cluster. In future releases of Service Fabric this parameter will - be deprecated in favor of ClusterCapacityRemaining. - :type cluster_remaining_capacity: str - :param cluster_capacity_remaining: The remaining capacity for the metric - in the cluster. - :type cluster_capacity_remaining: str - :param is_cluster_capacity_violation: Indicates that the metric is - currently over capacity in the cluster. - :type is_cluster_capacity_violation: bool - :param node_buffer_percentage: The reserved percentage of total node - capacity for this metric. - :type node_buffer_percentage: str - :param cluster_buffered_capacity: Remaining capacity in the cluster - excluding the reserved space. In future releases of Service Fabric this - parameter will be deprecated in favor of BufferedClusterCapacityRemaining. - :type cluster_buffered_capacity: str - :param buffered_cluster_capacity_remaining: Remaining capacity in the - cluster excluding the reserved space. - :type buffered_cluster_capacity_remaining: str - :param cluster_remaining_buffered_capacity: The remaining percentage of - cluster total capacity for this metric. - :type cluster_remaining_buffered_capacity: str - :param min_node_load_value: The minimum load on any node for this metric. - In future releases of Service Fabric this parameter will be deprecated in - favor of MinimumNodeLoad. - :type min_node_load_value: str - :param minimum_node_load: The minimum load on any node for this metric. - :type minimum_node_load: str - :param min_node_load_node_id: The node id of the node with the minimum - load for this metric. - :type min_node_load_node_id: ~azure.servicefabric.models.NodeId - :param max_node_load_value: The maximum load on any node for this metric. - In future releases of Service Fabric this parameter will be deprecated in - favor of MaximumNodeLoad. - :type max_node_load_value: str - :param maximum_node_load: The maximum load on any node for this metric. - :type maximum_node_load: str - :param max_node_load_node_id: The node id of the node with the maximum - load for this metric. - :type max_node_load_node_id: ~azure.servicefabric.models.NodeId - :param planned_load_removal: This value represents the load of the - replicas that are planned to be removed in the future within the cluster. - This kind of load is reported for replicas that are currently being moving - to other nodes and for replicas that are currently being dropped but still - use the load on the source node. - :type planned_load_removal: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'is_balanced_before': {'key': 'IsBalancedBefore', 'type': 'bool'}, - 'is_balanced_after': {'key': 'IsBalancedAfter', 'type': 'bool'}, - 'deviation_before': {'key': 'DeviationBefore', 'type': 'str'}, - 'deviation_after': {'key': 'DeviationAfter', 'type': 'str'}, - 'balancing_threshold': {'key': 'BalancingThreshold', 'type': 'str'}, - 'action': {'key': 'Action', 'type': 'str'}, - 'activity_threshold': {'key': 'ActivityThreshold', 'type': 'str'}, - 'cluster_capacity': {'key': 'ClusterCapacity', 'type': 'str'}, - 'cluster_load': {'key': 'ClusterLoad', 'type': 'str'}, - 'current_cluster_load': {'key': 'CurrentClusterLoad', 'type': 'str'}, - 'cluster_remaining_capacity': {'key': 'ClusterRemainingCapacity', 'type': 'str'}, - 'cluster_capacity_remaining': {'key': 'ClusterCapacityRemaining', 'type': 'str'}, - 'is_cluster_capacity_violation': {'key': 'IsClusterCapacityViolation', 'type': 'bool'}, - 'node_buffer_percentage': {'key': 'NodeBufferPercentage', 'type': 'str'}, - 'cluster_buffered_capacity': {'key': 'ClusterBufferedCapacity', 'type': 'str'}, - 'buffered_cluster_capacity_remaining': {'key': 'BufferedClusterCapacityRemaining', 'type': 'str'}, - 'cluster_remaining_buffered_capacity': {'key': 'ClusterRemainingBufferedCapacity', 'type': 'str'}, - 'min_node_load_value': {'key': 'MinNodeLoadValue', 'type': 'str'}, - 'minimum_node_load': {'key': 'MinimumNodeLoad', 'type': 'str'}, - 'min_node_load_node_id': {'key': 'MinNodeLoadNodeId', 'type': 'NodeId'}, - 'max_node_load_value': {'key': 'MaxNodeLoadValue', 'type': 'str'}, - 'maximum_node_load': {'key': 'MaximumNodeLoad', 'type': 'str'}, - 'max_node_load_node_id': {'key': 'MaxNodeLoadNodeId', 'type': 'NodeId'}, - 'planned_load_removal': {'key': 'PlannedLoadRemoval', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, is_balanced_before: bool=None, is_balanced_after: bool=None, deviation_before: str=None, deviation_after: str=None, balancing_threshold: str=None, action: str=None, activity_threshold: str=None, cluster_capacity: str=None, cluster_load: str=None, current_cluster_load: str=None, cluster_remaining_capacity: str=None, cluster_capacity_remaining: str=None, is_cluster_capacity_violation: bool=None, node_buffer_percentage: str=None, cluster_buffered_capacity: str=None, buffered_cluster_capacity_remaining: str=None, cluster_remaining_buffered_capacity: str=None, min_node_load_value: str=None, minimum_node_load: str=None, min_node_load_node_id=None, max_node_load_value: str=None, maximum_node_load: str=None, max_node_load_node_id=None, planned_load_removal: str=None, **kwargs) -> None: - super(LoadMetricInformation, self).__init__(**kwargs) - self.name = name - self.is_balanced_before = is_balanced_before - self.is_balanced_after = is_balanced_after - self.deviation_before = deviation_before - self.deviation_after = deviation_after - self.balancing_threshold = balancing_threshold - self.action = action - self.activity_threshold = activity_threshold - self.cluster_capacity = cluster_capacity - self.cluster_load = cluster_load - self.current_cluster_load = current_cluster_load - self.cluster_remaining_capacity = cluster_remaining_capacity - self.cluster_capacity_remaining = cluster_capacity_remaining - self.is_cluster_capacity_violation = is_cluster_capacity_violation - self.node_buffer_percentage = node_buffer_percentage - self.cluster_buffered_capacity = cluster_buffered_capacity - self.buffered_cluster_capacity_remaining = buffered_cluster_capacity_remaining - self.cluster_remaining_buffered_capacity = cluster_remaining_buffered_capacity - self.min_node_load_value = min_node_load_value - self.minimum_node_load = minimum_node_load - self.min_node_load_node_id = min_node_load_node_id - self.max_node_load_value = max_node_load_value - self.maximum_node_load = maximum_node_load - self.max_node_load_node_id = max_node_load_node_id - self.planned_load_removal = planned_load_removal - - -class LoadMetricReport(Model): - """Represents the load metric report which contains the time metric was - reported, its name and value. - - :param last_reported_utc: Gets the UTC time when the load was reported. - :type last_reported_utc: datetime - :param name: The name of the load metric. - :type name: str - :param value: The value of the load metric. In future releases of Service - Fabric this parameter will be deprecated in favor of CurrentValue. - :type value: str - :param current_value: The value of the load metric. - :type current_value: str - """ - - _attribute_map = { - 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - 'current_value': {'key': 'CurrentValue', 'type': 'str'}, - } - - def __init__(self, *, last_reported_utc=None, name: str=None, value: str=None, current_value: str=None, **kwargs) -> None: - super(LoadMetricReport, self).__init__(**kwargs) - self.last_reported_utc = last_reported_utc - self.name = name - self.value = value - self.current_value = current_value - - -class LoadMetricReportInfo(Model): - """Information about load reported by replica. - - :param name: The name of the metric. - :type name: str - :param value: The value of the load for the metric. In future releases of - Service Fabric this parameter will be deprecated in favor of CurrentValue. - :type value: int - :param current_value: The double value of the load for the metric. - :type current_value: str - :param last_reported_utc: The UTC time when the load is reported. - :type last_reported_utc: datetime - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - 'current_value': {'key': 'CurrentValue', 'type': 'str'}, - 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, - } - - def __init__(self, *, name: str=None, value: int=None, current_value: str=None, last_reported_utc=None, **kwargs) -> None: - super(LoadMetricReportInfo, self).__init__(**kwargs) - self.name = name - self.value = value - self.current_value = current_value - self.last_reported_utc = last_reported_utc - - -class NetworkResourcePropertiesBase(Model): - """This type describes the properties of a network resource, including its - kind. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NetworkResourceProperties - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'NetworkResourceProperties': 'NetworkResourceProperties'} - } - - def __init__(self, **kwargs) -> None: - super(NetworkResourcePropertiesBase, self).__init__(**kwargs) - self.kind = None - - -class NetworkResourceProperties(NetworkResourcePropertiesBase): - """Describes properties of a network resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LocalNetworkResourceProperties - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param description: User readable description of the network. - :type description: str - :ivar status: Status of the network. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the network. - :vartype status_details: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Local': 'LocalNetworkResourceProperties'} - } - - def __init__(self, *, description: str=None, **kwargs) -> None: - super(NetworkResourceProperties, self).__init__(**kwargs) - self.description = description - self.status = None - self.status_details = None - self.kind = 'NetworkResourceProperties' - - -class LocalNetworkResourceProperties(NetworkResourceProperties): - """Information about a Service Fabric container network local to a single - Service Fabric cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param description: User readable description of the network. - :type description: str - :ivar status: Status of the network. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the network. - :vartype status_details: str - :param network_address_prefix: Address space for the local container - network. - :type network_address_prefix: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'network_address_prefix': {'key': 'networkAddressPrefix', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, network_address_prefix: str=None, **kwargs) -> None: - super(LocalNetworkResourceProperties, self).__init__(description=description, **kwargs) - self.network_address_prefix = network_address_prefix - self.kind = 'Local' - - -class ManagedApplicationIdentity(Model): - """Describes a managed application identity. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the identity. - :type name: str - :param principal_id: The identity's PrincipalId. - :type principal_id: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'principal_id': {'key': 'PrincipalId', 'type': 'str'}, - } - - def __init__(self, *, name: str, principal_id: str=None, **kwargs) -> None: - super(ManagedApplicationIdentity, self).__init__(**kwargs) - self.name = name - self.principal_id = principal_id - - -class ManagedApplicationIdentityDescription(Model): - """Managed application identity description. - - :param token_service_endpoint: Token service endpoint. - :type token_service_endpoint: str - :param managed_identities: A list of managed application identity objects. - :type managed_identities: - list[~azure.servicefabric.models.ManagedApplicationIdentity] - """ - - _attribute_map = { - 'token_service_endpoint': {'key': 'TokenServiceEndpoint', 'type': 'str'}, - 'managed_identities': {'key': 'ManagedIdentities', 'type': '[ManagedApplicationIdentity]'}, - } - - def __init__(self, *, token_service_endpoint: str=None, managed_identities=None, **kwargs) -> None: - super(ManagedApplicationIdentityDescription, self).__init__(**kwargs) - self.token_service_endpoint = token_service_endpoint - self.managed_identities = managed_identities - - -class ManagedIdentityAzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Azure blob store (connected using managed - identity) used for storing and enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - :param managed_identity_type: Required. The type of managed identity to be - used to connect to Azure Blob Store via Managed Identity. Possible values - include: 'Invalid', 'VMSS', 'Cluster' - :type managed_identity_type: str or - ~azure.servicefabric.models.ManagedIdentityType - :param blob_service_uri: Required. The Blob Service Uri to connect to the - Azure blob store.. - :type blob_service_uri: str - :param container_name: Required. The name of the container in the blob - store to store and enumerate backups from. - :type container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'managed_identity_type': {'required': True}, - 'blob_service_uri': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'managed_identity_type': {'key': 'ManagedIdentityType', 'type': 'str'}, - 'blob_service_uri': {'key': 'BlobServiceUri', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__(self, *, managed_identity_type, blob_service_uri: str, container_name: str, friendly_name: str=None, **kwargs) -> None: - super(ManagedIdentityAzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) - self.managed_identity_type = managed_identity_type - self.blob_service_uri = blob_service_uri - self.container_name = container_name - self.storage_kind = 'ManagedIdentityAzureBlobStore' - - -class MetricLoadDescription(Model): - """Specifies metric load information. - - :param metric_name: The name of the reported metric. - :type metric_name: str - :param current_load: The current value of the metric load. - :type current_load: long - :param predicted_load: The predicted value of the metric load. - :type predicted_load: long - """ - - _attribute_map = { - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'current_load': {'key': 'CurrentLoad', 'type': 'long'}, - 'predicted_load': {'key': 'PredictedLoad', 'type': 'long'}, - } - - def __init__(self, *, metric_name: str=None, current_load: int=None, predicted_load: int=None, **kwargs) -> None: - super(MetricLoadDescription, self).__init__(**kwargs) - self.metric_name = metric_name - self.current_load = current_load - self.predicted_load = predicted_load - - -class MonitoringPolicyDescription(Model): - """Describes the parameters for monitoring an upgrade in Monitored mode. - - :param failure_action: The compensating action to perform when a Monitored - upgrade encounters monitoring policy or health policy violations. - Invalid indicates the failure action is invalid. Rollback specifies that - the upgrade will start rolling back automatically. - Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - mode. Possible values include: 'Invalid', 'Rollback', 'Manual' - :type failure_action: str or ~azure.servicefabric.models.FailureAction - :param health_check_wait_duration_in_milliseconds: The amount of time to - wait after completing an upgrade domain before applying health policies. - It is first interpreted as a string representing an ISO 8601 duration. If - that fails, then it is interpreted as a number representing the total - number of milliseconds. - :type health_check_wait_duration_in_milliseconds: str - :param health_check_stable_duration_in_milliseconds: The amount of time - that the application or cluster must remain healthy before the upgrade - proceeds to the next upgrade domain. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type health_check_stable_duration_in_milliseconds: str - :param health_check_retry_timeout_in_milliseconds: The amount of time to - retry health evaluation when the application or cluster is unhealthy - before FailureAction is executed. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type health_check_retry_timeout_in_milliseconds: str - :param upgrade_timeout_in_milliseconds: The amount of time the overall - upgrade has to complete before FailureAction is executed. It is first - interpreted as a string representing an ISO 8601 duration. If that fails, - then it is interpreted as a number representing the total number of - milliseconds. - :type upgrade_timeout_in_milliseconds: str - :param upgrade_domain_timeout_in_milliseconds: The amount of time each - upgrade domain has to complete before FailureAction is executed. It is - first interpreted as a string representing an ISO 8601 duration. If that - fails, then it is interpreted as a number representing the total number of - milliseconds. - :type upgrade_domain_timeout_in_milliseconds: str - """ - - _attribute_map = { - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, - 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, - 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, - } - - def __init__(self, *, failure_action=None, health_check_wait_duration_in_milliseconds: str=None, health_check_stable_duration_in_milliseconds: str=None, health_check_retry_timeout_in_milliseconds: str=None, upgrade_timeout_in_milliseconds: str=None, upgrade_domain_timeout_in_milliseconds: str=None, **kwargs) -> None: - super(MonitoringPolicyDescription, self).__init__(**kwargs) - self.failure_action = failure_action - self.health_check_wait_duration_in_milliseconds = health_check_wait_duration_in_milliseconds - self.health_check_stable_duration_in_milliseconds = health_check_stable_duration_in_milliseconds - self.health_check_retry_timeout_in_milliseconds = health_check_retry_timeout_in_milliseconds - self.upgrade_timeout_in_milliseconds = upgrade_timeout_in_milliseconds - self.upgrade_domain_timeout_in_milliseconds = upgrade_domain_timeout_in_milliseconds - - -class NameDescription(Model): - """Describes a Service Fabric name. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The Service Fabric name, including the 'fabric:' - URI scheme. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, *, name: str, **kwargs) -> None: - super(NameDescription, self).__init__(**kwargs) - self.name = name - - -class NamedPartitionInformation(PartitionInformation): - """Describes the partition information for the name as a string that is based - on partition schemes. - - All required parameters must be populated in order to send to Azure. - - :param id: An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. - The partition ID is unique and does not change for the lifetime of the - service. If the same service was deleted and recreated the IDs of its - partitions would be different. - :type id: str - :param service_partition_kind: Required. Constant filled by server. - :type service_partition_kind: str - :param name: Name of the partition. - :type name: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: - super(NamedPartitionInformation, self).__init__(id=id, **kwargs) - self.name = name - self.service_partition_kind = 'Named' - - -class PartitionSchemeDescription(Model): - """Describes how the service is partitioned. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NamedPartitionSchemeDescription, - SingletonPartitionSchemeDescription, - UniformInt64RangePartitionSchemeDescription - - All required parameters must be populated in order to send to Azure. - - :param partition_scheme: Required. Constant filled by server. - :type partition_scheme: str - """ - - _validation = { - 'partition_scheme': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - } - - _subtype_map = { - 'partition_scheme': {'Named': 'NamedPartitionSchemeDescription', 'Singleton': 'SingletonPartitionSchemeDescription', 'UniformInt64Range': 'UniformInt64RangePartitionSchemeDescription'} - } - - def __init__(self, **kwargs) -> None: - super(PartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = None - - -class NamedPartitionSchemeDescription(PartitionSchemeDescription): - """Describes the named partition scheme of the service. - - All required parameters must be populated in order to send to Azure. - - :param partition_scheme: Required. Constant filled by server. - :type partition_scheme: str - :param count: Required. The number of partitions. - :type count: int - :param names: Required. Array of size specified by the ‘Count’ parameter, - for the names of the partitions. - :type names: list[str] - """ - - _validation = { - 'partition_scheme': {'required': True}, - 'count': {'required': True}, - 'names': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'names': {'key': 'Names', 'type': '[str]'}, - } - - def __init__(self, *, count: int, names, **kwargs) -> None: - super(NamedPartitionSchemeDescription, self).__init__(**kwargs) - self.count = count - self.names = names - self.partition_scheme = 'Named' - - -class NetworkRef(Model): - """Describes a network reference in a service. - - :param name: Name of the network - :type name: str - :param endpoint_refs: A list of endpoints that are exposed on this - network. - :type endpoint_refs: list[~azure.servicefabric.models.EndpointRef] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'endpoint_refs': {'key': 'endpointRefs', 'type': '[EndpointRef]'}, - } - - def __init__(self, *, name: str=None, endpoint_refs=None, **kwargs) -> None: - super(NetworkRef, self).__init__(**kwargs) - self.name = name - self.endpoint_refs = endpoint_refs - - -class NetworkResourceDescription(Model): - """This type describes a network resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Network resource. - :type name: str - :param properties: Required. Describes properties of a network resource. - :type properties: ~azure.servicefabric.models.NetworkResourceProperties - """ - - _validation = { - 'name': {'required': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'NetworkResourceProperties'}, - } - - def __init__(self, *, name: str, properties, **kwargs) -> None: - super(NetworkResourceDescription, self).__init__(**kwargs) - self.name = name - self.properties = properties - - -class NodeAbortedEvent(NodeEvent): - """Node Aborted event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_id: Required. Id of Node. - :type node_id: str - :param upgrade_domain: Required. Upgrade domain of Node. - :type upgrade_domain: str - :param fault_domain: Required. Fault domain of Node. - :type fault_domain: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param hostname: Required. Name of Host. - :type hostname: str - :param is_seed_node: Required. Indicates if it is seed node. - :type is_seed_node: bool - :param node_version: Required. Version of Node. - :type node_version: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, node_id: str, upgrade_domain: str, fault_domain: str, ip_address_or_fqdn: str, hostname: str, is_seed_node: bool, node_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeAbortedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance = node_instance - self.node_id = node_id - self.upgrade_domain = upgrade_domain - self.fault_domain = fault_domain - self.ip_address_or_fqdn = ip_address_or_fqdn - self.hostname = hostname - self.is_seed_node = is_seed_node - self.node_version = node_version - self.kind = 'NodeAborted' - - -class NodeAddedToClusterEvent(NodeEvent): - """Node Added event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_id: Required. Id of Node. - :type node_id: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_type: Required. Type of Node. - :type node_type: str - :param fabric_version: Required. Fabric version. - :type fabric_version: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param node_capacities: Required. Capacities. - :type node_capacities: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'node_type': {'required': True}, - 'fabric_version': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'node_capacities': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_type': {'key': 'NodeType', 'type': 'str'}, - 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_id: str, node_instance: int, node_type: str, fabric_version: str, ip_address_or_fqdn: str, node_capacities: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeAddedToClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_id = node_id - self.node_instance = node_instance - self.node_type = node_type - self.fabric_version = fabric_version - self.ip_address_or_fqdn = ip_address_or_fqdn - self.node_capacities = node_capacities - self.kind = 'NodeAddedToCluster' - - -class NodeClosedEvent(NodeEvent): - """Node Closed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_id: Required. Id of Node. - :type node_id: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param error: Required. Describes error. - :type error: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'error': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'error': {'key': 'Error', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_id: str, node_instance: int, error: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeClosedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_id = node_id - self.node_instance = node_instance - self.error = error - self.kind = 'NodeClosed' - - -class NodeDeactivateCompletedEvent(NodeEvent): - """Node Deactivate Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param effective_deactivate_intent: Required. Describes deactivate intent. - :type effective_deactivate_intent: str - :param batch_ids_with_deactivate_intent: Required. Batch Ids. - :type batch_ids_with_deactivate_intent: str - :param start_time: Required. Start time. - :type start_time: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'effective_deactivate_intent': {'required': True}, - 'batch_ids_with_deactivate_intent': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'effective_deactivate_intent': {'key': 'EffectiveDeactivateIntent', 'type': 'str'}, - 'batch_ids_with_deactivate_intent': {'key': 'BatchIdsWithDeactivateIntent', 'type': 'str'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, effective_deactivate_intent: str, batch_ids_with_deactivate_intent: str, start_time, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeDeactivateCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance = node_instance - self.effective_deactivate_intent = effective_deactivate_intent - self.batch_ids_with_deactivate_intent = batch_ids_with_deactivate_intent - self.start_time = start_time - self.kind = 'NodeDeactivateCompleted' - - -class NodeDeactivateStartedEvent(NodeEvent): - """Node Deactivate Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param batch_id: Required. Batch Id. - :type batch_id: str - :param deactivate_intent: Required. Describes deactivate intent. - :type deactivate_intent: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'batch_id': {'required': True}, - 'deactivate_intent': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'batch_id': {'key': 'BatchId', 'type': 'str'}, - 'deactivate_intent': {'key': 'DeactivateIntent', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, batch_id: str, deactivate_intent: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeDeactivateStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance = node_instance - self.batch_id = batch_id - self.deactivate_intent = deactivate_intent - self.kind = 'NodeDeactivateStarted' - - -class NodeDeactivationInfo(Model): - """Information about the node deactivation. This information is valid for a - node that is undergoing deactivation or has already been deactivated. - - :param node_deactivation_intent: The intent or the reason for deactivating - the node. Following are the possible values for it. Possible values - include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' - :type node_deactivation_intent: str or - ~azure.servicefabric.models.NodeDeactivationIntent - :param node_deactivation_status: The status of node deactivation - operation. Following are the possible values. Possible values include: - 'None', 'SafetyCheckInProgress', 'SafetyCheckComplete', 'Completed' - :type node_deactivation_status: str or - ~azure.servicefabric.models.NodeDeactivationStatus - :param node_deactivation_task: List of tasks representing the deactivation - operation on the node. - :type node_deactivation_task: - list[~azure.servicefabric.models.NodeDeactivationTask] - :param pending_safety_checks: List of pending safety checks - :type pending_safety_checks: - list[~azure.servicefabric.models.SafetyCheckWrapper] - """ - - _attribute_map = { - 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, - 'node_deactivation_status': {'key': 'NodeDeactivationStatus', 'type': 'str'}, - 'node_deactivation_task': {'key': 'NodeDeactivationTask', 'type': '[NodeDeactivationTask]'}, - 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, - } - - def __init__(self, *, node_deactivation_intent=None, node_deactivation_status=None, node_deactivation_task=None, pending_safety_checks=None, **kwargs) -> None: - super(NodeDeactivationInfo, self).__init__(**kwargs) - self.node_deactivation_intent = node_deactivation_intent - self.node_deactivation_status = node_deactivation_status - self.node_deactivation_task = node_deactivation_task - self.pending_safety_checks = pending_safety_checks - - -class NodeDeactivationTask(Model): - """The task representing the deactivation operation on the node. - - :param node_deactivation_task_id: Identity of the task related to - deactivation operation on the node. - :type node_deactivation_task_id: - ~azure.servicefabric.models.NodeDeactivationTaskId - :param node_deactivation_intent: The intent or the reason for deactivating - the node. Following are the possible values for it. Possible values - include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' - :type node_deactivation_intent: str or - ~azure.servicefabric.models.NodeDeactivationIntent - """ - - _attribute_map = { - 'node_deactivation_task_id': {'key': 'NodeDeactivationTaskId', 'type': 'NodeDeactivationTaskId'}, - 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, - } - - def __init__(self, *, node_deactivation_task_id=None, node_deactivation_intent=None, **kwargs) -> None: - super(NodeDeactivationTask, self).__init__(**kwargs) - self.node_deactivation_task_id = node_deactivation_task_id - self.node_deactivation_intent = node_deactivation_intent - - -class NodeDeactivationTaskId(Model): - """Identity of the task related to deactivation operation on the node. - - :param id: Value of the task id. - :type id: str - :param node_deactivation_task_type: The type of the task that performed - the node deactivation. Following are the possible values. Possible values - include: 'Invalid', 'Infrastructure', 'Repair', 'Client' - :type node_deactivation_task_type: str or - ~azure.servicefabric.models.NodeDeactivationTaskType - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'node_deactivation_task_type': {'key': 'NodeDeactivationTaskType', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, node_deactivation_task_type=None, **kwargs) -> None: - super(NodeDeactivationTaskId, self).__init__(**kwargs) - self.id = id - self.node_deactivation_task_type = node_deactivation_task_type - - -class NodeDownEvent(NodeEvent): - """Node Down event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param last_node_up_at: Required. Time when Node was last up. - :type last_node_up_at: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'last_node_up_at': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'last_node_up_at': {'key': 'LastNodeUpAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, last_node_up_at, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeDownEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance = node_instance - self.last_node_up_at = last_node_up_at - self.kind = 'NodeDown' - - -class NodeHealth(EntityHealth): - """Information about the health of a Service Fabric node. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param name: Name of the node whose health information is described by - this object. - :type name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, **kwargs) -> None: - super(NodeHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.name = name - - -class NodeHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a node, containing information about the - data and the algorithm used by health store to evaluate health. The - evaluation is returned only when the aggregated health state is either - Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the node. The types of the - unhealthy evaluations can be EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, node_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(NodeHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.node_name = node_name - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Node' - - -class NodeHealthReportExpiredEvent(NodeEvent): - """Node Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: Required. Id of Node instance. - :type node_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance_id = node_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'NodeHealthReportExpired' - - -class NodeHealthState(EntityHealthState): - """Represents the health state of a node, which contains the node identifier - and its aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param name: The name of a Service Fabric node. - :type name: str - :param id: An internal ID used by Service Fabric to uniquely identify a - node. Node Id is deterministically generated from node name. - :type id: ~azure.servicefabric.models.NodeId - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'NodeId'}, - } - - def __init__(self, *, aggregated_health_state=None, name: str=None, id=None, **kwargs) -> None: - super(NodeHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.name = name - self.id = id - - -class NodeHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a node, which contains the node name - and its aggregated health state. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of a Service Fabric node. - :type node_name: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - def __init__(self, *, health_state=None, node_name: str=None, **kwargs) -> None: - super(NodeHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.node_name = node_name - - -class NodeHealthStateChunkList(EntityHealthStateChunkList): - """The list of node health state chunks in the cluster that respect the input - filters in the chunk query. Returned by get cluster health state chunks - query. - - :param total_count: Total number of entity health state objects that match - the specified filters from the cluster health chunk query description. - :type total_count: long - :param items: The list of node health state chunks that respect the input - filters in the chunk query. - :type items: list[~azure.servicefabric.models.NodeHealthStateChunk] - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'items': {'key': 'Items', 'type': '[NodeHealthStateChunk]'}, - } - - def __init__(self, *, total_count: int=None, items=None, **kwargs) -> None: - super(NodeHealthStateChunkList, self).__init__(total_count=total_count, **kwargs) - self.items = items - - -class NodeHealthStateFilter(Model): - """Defines matching criteria to determine whether a node should be included in - the returned cluster health chunk. - One filter can match zero, one or multiple nodes, depending on its - properties. - Can be specified in the cluster health chunk query description. - - :param node_name_filter: Name of the node that matches the filter. The - filter is applied only to the specified node, if it exists. - If the node doesn't exist, no node is returned in the cluster health chunk - based on this filter. - If the node exists, it is included in the cluster health chunk if the - health state matches the other filter properties. - If not specified, all nodes that match the parent filters (if any) are - taken into consideration and matched against the other filter members, - like health state filter. - :type node_name_filter: str - :param health_state_filter: The filter for the health state of the nodes. - It allows selecting nodes if they match the desired health states. - The possible values are integer value of one of the following health - states. Only nodes that match the filter are returned. All nodes are used - to evaluate the cluster aggregated health state. - If not specified, default value is None, unless the node name is - specified. If the filter has default value and node name is specified, the - matching node is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches nodes with HealthState - value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - """ - - _attribute_map = { - 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__(self, *, node_name_filter: str=None, health_state_filter: int=0, **kwargs) -> None: - super(NodeHealthStateFilter, self).__init__(**kwargs) - self.node_name_filter = node_name_filter - self.health_state_filter = health_state_filter - - -class NodeId(Model): - """An internal ID used by Service Fabric to uniquely identify a node. Node Id - is deterministically generated from node name. - - :param id: Value of the node Id. This is a 128 bit integer. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(NodeId, self).__init__(**kwargs) - self.id = id - - -class NodeImpact(Model): - """Describes the expected impact of a repair to a particular node. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param node_name: Required. The name of the impacted node. - :type node_name: str - :param impact_level: The level of impact expected. Possible values - include: 'Invalid', 'None', 'Restart', 'RemoveData', 'RemoveNode' - :type impact_level: str or ~azure.servicefabric.models.ImpactLevel - """ - - _validation = { - 'node_name': {'required': True}, - } - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'impact_level': {'key': 'ImpactLevel', 'type': 'str'}, - } - - def __init__(self, *, node_name: str, impact_level=None, **kwargs) -> None: - super(NodeImpact, self).__init__(**kwargs) - self.node_name = node_name - self.impact_level = impact_level - - -class NodeInfo(Model): - """Information about a node in Service Fabric cluster. - - :param name: The name of a Service Fabric node. - :type name: str - :param ip_address_or_fqdn: The IP address or fully qualified domain name - of the node. - :type ip_address_or_fqdn: str - :param type: The type of the node. - :type type: str - :param code_version: The version of Service Fabric binaries that the node - is running. - :type code_version: str - :param config_version: The version of Service Fabric cluster manifest that - the node is using. - :type config_version: str - :param node_status: The status of the node. Possible values include: - 'Invalid', 'Up', 'Down', 'Enabling', 'Disabling', 'Disabled', 'Unknown', - 'Removed' - :type node_status: str or ~azure.servicefabric.models.NodeStatus - :param node_up_time_in_seconds: Time in seconds since the node has been in - NodeStatus Up. Value zero indicates that the node is not Up. - :type node_up_time_in_seconds: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param is_seed_node: Indicates if the node is a seed node or not. Returns - true if the node is a seed node, otherwise false. A quorum of seed nodes - are required for proper operation of Service Fabric cluster. - :type is_seed_node: bool - :param upgrade_domain: The upgrade domain of the node. - :type upgrade_domain: str - :param fault_domain: The fault domain of the node. - :type fault_domain: str - :param id: An internal ID used by Service Fabric to uniquely identify a - node. Node Id is deterministically generated from node name. - :type id: ~azure.servicefabric.models.NodeId - :param instance_id: The ID representing the node instance. While the ID of - the node is deterministically generated from the node name and remains - same across restarts, the InstanceId changes every time node restarts. - :type instance_id: str - :param node_deactivation_info: Information about the node deactivation. - This information is valid for a node that is undergoing deactivation or - has already been deactivated. - :type node_deactivation_info: - ~azure.servicefabric.models.NodeDeactivationInfo - :param is_stopped: Indicates if the node is stopped by calling stop node - API or not. Returns true if the node is stopped, otherwise false. - :type is_stopped: bool - :param node_down_time_in_seconds: Time in seconds since the node has been - in NodeStatus Down. Value zero indicates node is not NodeStatus Down. - :type node_down_time_in_seconds: str - :param node_up_at: Date time in UTC when the node came up. If the node has - never been up then this value will be zero date time. - :type node_up_at: datetime - :param node_down_at: Date time in UTC when the node went down. If node has - never been down then this value will be zero date time. - :type node_down_at: datetime - :param node_tags: List that contains tags, which will be applied to the - nodes. - :type node_tags: list[str] - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'node_status': {'key': 'NodeStatus', 'type': 'str'}, - 'node_up_time_in_seconds': {'key': 'NodeUpTimeInSeconds', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'NodeId'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'node_deactivation_info': {'key': 'NodeDeactivationInfo', 'type': 'NodeDeactivationInfo'}, - 'is_stopped': {'key': 'IsStopped', 'type': 'bool'}, - 'node_down_time_in_seconds': {'key': 'NodeDownTimeInSeconds', 'type': 'str'}, - 'node_up_at': {'key': 'NodeUpAt', 'type': 'iso-8601'}, - 'node_down_at': {'key': 'NodeDownAt', 'type': 'iso-8601'}, - 'node_tags': {'key': 'NodeTags', 'type': '[str]'}, - } - - def __init__(self, *, name: str=None, ip_address_or_fqdn: str=None, type: str=None, code_version: str=None, config_version: str=None, node_status=None, node_up_time_in_seconds: str=None, health_state=None, is_seed_node: bool=None, upgrade_domain: str=None, fault_domain: str=None, id=None, instance_id: str=None, node_deactivation_info=None, is_stopped: bool=None, node_down_time_in_seconds: str=None, node_up_at=None, node_down_at=None, node_tags=None, **kwargs) -> None: - super(NodeInfo, self).__init__(**kwargs) - self.name = name - self.ip_address_or_fqdn = ip_address_or_fqdn - self.type = type - self.code_version = code_version - self.config_version = config_version - self.node_status = node_status - self.node_up_time_in_seconds = node_up_time_in_seconds - self.health_state = health_state - self.is_seed_node = is_seed_node - self.upgrade_domain = upgrade_domain - self.fault_domain = fault_domain - self.id = id - self.instance_id = instance_id - self.node_deactivation_info = node_deactivation_info - self.is_stopped = is_stopped - self.node_down_time_in_seconds = node_down_time_in_seconds - self.node_up_at = node_up_at - self.node_down_at = node_down_at - self.node_tags = node_tags - - -class NodeLoadInfo(Model): - """Information about load on a Service Fabric node. It holds a summary of all - metrics and their load on a node. - - :param node_name: Name of the node for which the load information is - provided by this object. - :type node_name: str - :param node_load_metric_information: List that contains metrics and their - load information on this node. - :type node_load_metric_information: - list[~azure.servicefabric.models.NodeLoadMetricInformation] - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_load_metric_information': {'key': 'NodeLoadMetricInformation', 'type': '[NodeLoadMetricInformation]'}, - } - - def __init__(self, *, node_name: str=None, node_load_metric_information=None, **kwargs) -> None: - super(NodeLoadInfo, self).__init__(**kwargs) - self.node_name = node_name - self.node_load_metric_information = node_load_metric_information - - -class NodeLoadMetricInformation(Model): - """Represents data structure that contains load information for a certain - metric on a node. - - :param name: Name of the metric for which this load information is - provided. - :type name: str - :param node_capacity: Total capacity on the node for this metric. - :type node_capacity: str - :param node_load: Current load on the node for this metric. In future - releases of Service Fabric this parameter will be deprecated in favor of - CurrentNodeLoad. - :type node_load: str - :param node_remaining_capacity: The remaining capacity on the node for - this metric. In future releases of Service Fabric this parameter will be - deprecated in favor of NodeCapacityRemaining. - :type node_remaining_capacity: str - :param is_capacity_violation: Indicates if there is a capacity violation - for this metric on the node. - :type is_capacity_violation: bool - :param node_buffered_capacity: The value that indicates the reserved - capacity for this metric on the node. - :type node_buffered_capacity: str - :param node_remaining_buffered_capacity: The remaining reserved capacity - for this metric on the node. In future releases of Service Fabric this - parameter will be deprecated in favor of BufferedNodeCapacityRemaining. - :type node_remaining_buffered_capacity: str - :param current_node_load: Current load on the node for this metric. - :type current_node_load: str - :param node_capacity_remaining: The remaining capacity on the node for the - metric. - :type node_capacity_remaining: str - :param buffered_node_capacity_remaining: The remaining capacity which is - not reserved by NodeBufferPercentage for this metric on the node. - :type buffered_node_capacity_remaining: str - :param planned_node_load_removal: This value represents the load of the - replicas that are planned to be removed in the future. - This kind of load is reported for replicas that are currently being moving - to other nodes and for replicas that are currently being dropped but still - use the load on the source node. - :type planned_node_load_removal: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'node_capacity': {'key': 'NodeCapacity', 'type': 'str'}, - 'node_load': {'key': 'NodeLoad', 'type': 'str'}, - 'node_remaining_capacity': {'key': 'NodeRemainingCapacity', 'type': 'str'}, - 'is_capacity_violation': {'key': 'IsCapacityViolation', 'type': 'bool'}, - 'node_buffered_capacity': {'key': 'NodeBufferedCapacity', 'type': 'str'}, - 'node_remaining_buffered_capacity': {'key': 'NodeRemainingBufferedCapacity', 'type': 'str'}, - 'current_node_load': {'key': 'CurrentNodeLoad', 'type': 'str'}, - 'node_capacity_remaining': {'key': 'NodeCapacityRemaining', 'type': 'str'}, - 'buffered_node_capacity_remaining': {'key': 'BufferedNodeCapacityRemaining', 'type': 'str'}, - 'planned_node_load_removal': {'key': 'PlannedNodeLoadRemoval', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, node_capacity: str=None, node_load: str=None, node_remaining_capacity: str=None, is_capacity_violation: bool=None, node_buffered_capacity: str=None, node_remaining_buffered_capacity: str=None, current_node_load: str=None, node_capacity_remaining: str=None, buffered_node_capacity_remaining: str=None, planned_node_load_removal: str=None, **kwargs) -> None: - super(NodeLoadMetricInformation, self).__init__(**kwargs) - self.name = name - self.node_capacity = node_capacity - self.node_load = node_load - self.node_remaining_capacity = node_remaining_capacity - self.is_capacity_violation = is_capacity_violation - self.node_buffered_capacity = node_buffered_capacity - self.node_remaining_buffered_capacity = node_remaining_buffered_capacity - self.current_node_load = current_node_load - self.node_capacity_remaining = node_capacity_remaining - self.buffered_node_capacity_remaining = buffered_node_capacity_remaining - self.planned_node_load_removal = planned_node_load_removal - - -class NodeNewHealthReportEvent(NodeEvent): - """Node Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: Required. Id of Node instance. - :type node_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance_id = node_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'NodeNewHealthReport' - - -class NodeOpenFailedEvent(NodeEvent): - """Node Open Failed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_id: Required. Id of Node. - :type node_id: str - :param upgrade_domain: Required. Upgrade domain of Node. - :type upgrade_domain: str - :param fault_domain: Required. Fault domain of Node. - :type fault_domain: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param hostname: Required. Name of Host. - :type hostname: str - :param is_seed_node: Required. Indicates if it is seed node. - :type is_seed_node: bool - :param node_version: Required. Version of Node. - :type node_version: str - :param error: Required. Describes the error. - :type error: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - 'error': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - 'error': {'key': 'Error', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, node_id: str, upgrade_domain: str, fault_domain: str, ip_address_or_fqdn: str, hostname: str, is_seed_node: bool, node_version: str, error: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeOpenFailedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance = node_instance - self.node_id = node_id - self.upgrade_domain = upgrade_domain - self.fault_domain = fault_domain - self.ip_address_or_fqdn = ip_address_or_fqdn - self.hostname = hostname - self.is_seed_node = is_seed_node - self.node_version = node_version - self.error = error - self.kind = 'NodeOpenFailed' - - -class NodeOpenSucceededEvent(NodeEvent): - """Node Opened Succeeded event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_id: Required. Id of Node. - :type node_id: str - :param upgrade_domain: Required. Upgrade domain of Node. - :type upgrade_domain: str - :param fault_domain: Required. Fault domain of Node. - :type fault_domain: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param hostname: Required. Name of Host. - :type hostname: str - :param is_seed_node: Required. Indicates if it is seed node. - :type is_seed_node: bool - :param node_version: Required. Version of Node. - :type node_version: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, node_id: str, upgrade_domain: str, fault_domain: str, ip_address_or_fqdn: str, hostname: str, is_seed_node: bool, node_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeOpenSucceededEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance = node_instance - self.node_id = node_id - self.upgrade_domain = upgrade_domain - self.fault_domain = fault_domain - self.ip_address_or_fqdn = ip_address_or_fqdn - self.hostname = hostname - self.is_seed_node = is_seed_node - self.node_version = node_version - self.kind = 'NodeOpenSucceeded' - - -class NodeRemovedFromClusterEvent(NodeEvent): - """Node Removed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_id: Required. Id of Node. - :type node_id: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_type: Required. Type of Node. - :type node_type: str - :param fabric_version: Required. Fabric version. - :type fabric_version: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param node_capacities: Required. Capacities. - :type node_capacities: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'node_type': {'required': True}, - 'fabric_version': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'node_capacities': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_type': {'key': 'NodeType', 'type': 'str'}, - 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_id: str, node_instance: int, node_type: str, fabric_version: str, ip_address_or_fqdn: str, node_capacities: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeRemovedFromClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_id = node_id - self.node_instance = node_instance - self.node_type = node_type - self.fabric_version = fabric_version - self.ip_address_or_fqdn = ip_address_or_fqdn - self.node_capacities = node_capacities - self.kind = 'NodeRemovedFromCluster' - - -class RepairImpactDescriptionBase(Model): - """Describes the expected impact of executing a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NodeRepairImpactDescription - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Node': 'NodeRepairImpactDescription'} - } - - def __init__(self, **kwargs) -> None: - super(RepairImpactDescriptionBase, self).__init__(**kwargs) - self.kind = None - - -class NodeRepairImpactDescription(RepairImpactDescriptionBase): - """Describes the expected impact of a repair on a set of nodes. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param node_impact_list: The list of nodes impacted by a repair action and - their respective expected impact. - :type node_impact_list: list[~azure.servicefabric.models.NodeImpact] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_impact_list': {'key': 'NodeImpactList', 'type': '[NodeImpact]'}, - } - - def __init__(self, *, node_impact_list=None, **kwargs) -> None: - super(NodeRepairImpactDescription, self).__init__(**kwargs) - self.node_impact_list = node_impact_list - self.kind = 'Node' - - -class RepairTargetDescriptionBase(Model): - """Describes the entities targeted by a repair action. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NodeRepairTargetDescription - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Node': 'NodeRepairTargetDescription'} - } - - def __init__(self, **kwargs) -> None: - super(RepairTargetDescriptionBase, self).__init__(**kwargs) - self.kind = None - - -class NodeRepairTargetDescription(RepairTargetDescriptionBase): - """Describes the list of nodes targeted by a repair action. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param node_names: The list of nodes targeted by a repair action. - :type node_names: list[str] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_names': {'key': 'NodeNames', 'type': '[str]'}, - } - - def __init__(self, *, node_names=None, **kwargs) -> None: - super(NodeRepairTargetDescription, self).__init__(**kwargs) - self.node_names = node_names - self.kind = 'Node' - - -class NodeResult(Model): - """Contains information about a node that was targeted by a user-induced - operation. - - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: The node instance id. - :type node_instance_id: str - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - } - - def __init__(self, *, node_name: str=None, node_instance_id: str=None, **kwargs) -> None: - super(NodeResult, self).__init__(**kwargs) - self.node_name = node_name - self.node_instance_id = node_instance_id - - -class NodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for nodes, containing health evaluations for - each unhealthy node that impacted current aggregated health state. Can be - returned when evaluating cluster health and the aggregated health state is - either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_nodes: Maximum allowed percentage of - unhealthy nodes from the ClusterHealthPolicy. - :type max_percent_unhealthy_nodes: int - :param total_count: Total number of nodes found in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - NodeHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(NodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Nodes' - - -class NodeTagsDescription(Model): - """Describes the tags required for placement or running of the service. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. The number of tags. - :type count: int - :param tags: Required. Array of size specified by the ‘Count’ parameter, - for the placement tags of the service. - :type tags: list[str] - """ - - _validation = { - 'count': {'required': True}, - 'tags': {'required': True}, - } - - _attribute_map = { - 'count': {'key': 'Count', 'type': 'int'}, - 'tags': {'key': 'Tags', 'type': '[str]'}, - } - - def __init__(self, *, count: int, tags, **kwargs) -> None: - super(NodeTagsDescription, self).__init__(**kwargs) - self.count = count - self.tags = tags - - -class NodeTransitionProgress(Model): - """Information about an NodeTransition operation. This class contains an - OperationState and a NodeTransitionResult. The NodeTransitionResult is not - valid until OperationState - is Completed or Faulted. - - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param node_transition_result: Represents information about an operation - in a terminal state (Completed or Faulted). - :type node_transition_result: - ~azure.servicefabric.models.NodeTransitionResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'node_transition_result': {'key': 'NodeTransitionResult', 'type': 'NodeTransitionResult'}, - } - - def __init__(self, *, state=None, node_transition_result=None, **kwargs) -> None: - super(NodeTransitionProgress, self).__init__(**kwargs) - self.state = state - self.node_transition_result = node_transition_result - - -class NodeTransitionResult(Model): - """Represents information about an operation in a terminal state (Completed or - Faulted). - - :param error_code: If OperationState is Completed, this is 0. If - OperationState is Faulted, this is an error code indicating the reason. - :type error_code: int - :param node_result: Contains information about a node that was targeted by - a user-induced operation. - :type node_result: ~azure.servicefabric.models.NodeResult - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'node_result': {'key': 'NodeResult', 'type': 'NodeResult'}, - } - - def __init__(self, *, error_code: int=None, node_result=None, **kwargs) -> None: - super(NodeTransitionResult, self).__init__(**kwargs) - self.error_code = error_code - self.node_result = node_result - - -class NodeTypeHealthPolicyMapItem(Model): - """Defines an item in NodeTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key of the node type health policy map item. - This is the name of the node type. - :type key: str - :param value: Required. The value of the node type health policy map item. - If the percentage is respected but there is at least one unhealthy node in - the node type, the health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy nodes - over the total number of nodes in the node type. - The computation rounds up to tolerate one failure on small numbers of - nodes. - The max percent unhealthy nodes allowed for the node type. Must be between - zero and 100. - :type value: int - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - } - - def __init__(self, *, key: str, value: int, **kwargs) -> None: - super(NodeTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = key - self.value = value - - -class NodeTypeNodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for nodes of a particular node type. The node - type nodes evaluation can be returned when cluster health evaluation - returns unhealthy aggregated health state, either Error or Warning. It - contains health evaluations for each unhealthy node of the included node - type that impacted current aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param node_type_name: The node type name as defined in the cluster - manifest. - :type node_type_name: str - :param max_percent_unhealthy_nodes: Maximum allowed percentage of - unhealthy nodes for the node type, specified as an entry in - NodeTypeHealthPolicyMap. - :type max_percent_unhealthy_nodes: int - :param total_count: Total number of nodes of the node type found in the - health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - NodeHealthEvaluation of this node type that impacted the aggregated - health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_type_name': {'key': 'NodeTypeName', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, node_type_name: str=None, max_percent_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(NodeTypeNodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.node_type_name = node_type_name - self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'NodeTypeNodes' - - -class NodeUpEvent(NodeEvent): - """Node Up event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param last_node_down_at: Required. Time when Node was last down. - :type last_node_down_at: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'last_node_down_at': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'last_node_down_at': {'key': 'LastNodeDownAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, last_node_down_at, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeUpEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance = node_instance - self.last_node_down_at = last_node_down_at - self.kind = 'NodeUp' - - -class NodeUpgradeProgressInfo(Model): - """Information about the upgrading node and its status. - - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param upgrade_phase: The state of the upgrading node. Possible values - include: 'Invalid', 'PreUpgradeSafetyCheck', 'Upgrading', - 'PostUpgradeSafetyCheck' - :type upgrade_phase: str or ~azure.servicefabric.models.NodeUpgradePhase - :param pending_safety_checks: List of pending safety checks - :type pending_safety_checks: - list[~azure.servicefabric.models.SafetyCheckWrapper] - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'upgrade_phase': {'key': 'UpgradePhase', 'type': 'str'}, - 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, - } - - def __init__(self, *, node_name: str=None, upgrade_phase=None, pending_safety_checks=None, **kwargs) -> None: - super(NodeUpgradeProgressInfo, self).__init__(**kwargs) - self.node_name = node_name - self.upgrade_phase = upgrade_phase - self.pending_safety_checks = pending_safety_checks - - -class OperationStatus(Model): - """Contains the OperationId, OperationState, and OperationType for - user-induced operations. - - :param operation_id: A GUID that identifies a call to this API. This is - also passed into the corresponding GetProgress API. - :type operation_id: str - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param type: The type of the operation. Possible values include: - 'Invalid', 'PartitionDataLoss', 'PartitionQuorumLoss', 'PartitionRestart', - 'NodeTransition' - :type type: str or ~azure.servicefabric.models.OperationType - """ - - _attribute_map = { - 'operation_id': {'key': 'OperationId', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, - } - - def __init__(self, *, operation_id: str=None, state=None, type=None, **kwargs) -> None: - super(OperationStatus, self).__init__(**kwargs) - self.operation_id = operation_id - self.state = state - self.type = type - - -class PackageSharingPolicyInfo(Model): - """Represents a policy for the package sharing. - - :param shared_package_name: The name of code, configuration or data - package that should be shared. - :type shared_package_name: str - :param package_sharing_scope: Represents the scope for - PackageSharingPolicy. This is specified during DeployServicePackageToNode - operation. Possible values include: 'None', 'All', 'Code', 'Config', - 'Data' - :type package_sharing_scope: str or - ~azure.servicefabric.models.PackageSharingPolicyScope - """ - - _attribute_map = { - 'shared_package_name': {'key': 'SharedPackageName', 'type': 'str'}, - 'package_sharing_scope': {'key': 'PackageSharingScope', 'type': 'str'}, - } - - def __init__(self, *, shared_package_name: str=None, package_sharing_scope=None, **kwargs) -> None: - super(PackageSharingPolicyInfo, self).__init__(**kwargs) - self.shared_package_name = shared_package_name - self.package_sharing_scope = package_sharing_scope - - -class PagedApplicationInfoList(Model): - """The list of applications in the cluster. The list is paged when all of the - results cannot fit in a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of application information. - :type items: list[~azure.servicefabric.models.ApplicationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedApplicationInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedApplicationResourceDescriptionList(Model): - """The list of application resources. The list is paged when all of the - results cannot fit in a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: - list[~azure.servicefabric.models.ApplicationResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationResourceDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedApplicationResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedApplicationTypeInfoList(Model): - """The list of application types that are provisioned or being provisioned in - the cluster. The list is paged when all of the results cannot fit in a - single message. The next set of results can be obtained by executing the - same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of application type information. - :type items: list[~azure.servicefabric.models.ApplicationTypeInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationTypeInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedApplicationTypeInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedBackupConfigurationInfoList(Model): - """The list of backup configuration information. The list is paged when all of - the results cannot fit in a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of backup configuration information. - :type items: list[~azure.servicefabric.models.BackupConfigurationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupConfigurationInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedBackupConfigurationInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedBackupEntityList(Model): - """The list of backup entities that are being periodically backed. The list is - paged when all of the results cannot fit in a single message. The next set - of results can be obtained by executing the same query with the - continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of backup entity information. - :type items: list[~azure.servicefabric.models.BackupEntity] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupEntity]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedBackupEntityList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedBackupInfoList(Model): - """The list of backups. The list is paged when all of the results cannot fit - in a single message. The next set of results can be obtained by executing - the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of backup information. - :type items: list[~azure.servicefabric.models.BackupInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedBackupInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedBackupPolicyDescriptionList(Model): - """The list of backup policies configured in the cluster. The list is paged - when all of the results cannot fit in a single message. The next set of - results can be obtained by executing the same query with the continuation - token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: The list of backup policies information. - :type items: list[~azure.servicefabric.models.BackupPolicyDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupPolicyDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedBackupPolicyDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedComposeDeploymentStatusInfoList(Model): - """The list of compose deployments in the cluster. The list is paged when all - of the results cannot fit in a single message. The next set of results can - be obtained by executing the same query with the continuation token - provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of compose deployment status information. - :type items: list[~azure.servicefabric.models.ComposeDeploymentStatusInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ComposeDeploymentStatusInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedComposeDeploymentStatusInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedDeployedApplicationInfoList(Model): - """The list of deployed applications in activating, downloading, or active - states on a node. - The list is paged when all of the results cannot fit in a single message. - The next set of results can be obtained by executing the same query with - the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of deployed application information. - :type items: list[~azure.servicefabric.models.DeployedApplicationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[DeployedApplicationInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedDeployedApplicationInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedGatewayResourceDescriptionList(Model): - """The list of gateway resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.GatewayResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[GatewayResourceDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedGatewayResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedNetworkResourceDescriptionList(Model): - """The list of network resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.NetworkResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[NetworkResourceDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedNetworkResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedNodeInfoList(Model): - """The list of nodes in the cluster. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of node information. - :type items: list[~azure.servicefabric.models.NodeInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[NodeInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedNodeInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedPropertyInfoList(Model): - """The paged list of Service Fabric properties under a given name. The list is - paged when all of the results cannot fit in a single message. The next set - of results can be obtained by executing the same query with the - continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param is_consistent: Indicates whether any property under the given name - has been modified during the enumeration. If there was a modification, - this property value is false. - :type is_consistent: bool - :param properties: List of property information. - :type properties: list[~azure.servicefabric.models.PropertyInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, - 'properties': {'key': 'Properties', 'type': '[PropertyInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, is_consistent: bool=None, properties=None, **kwargs) -> None: - super(PagedPropertyInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.is_consistent = is_consistent - self.properties = properties - - -class PagedReplicaInfoList(Model): - """The list of replicas in the cluster for a given partition. The list is - paged when all of the results cannot fit in a single message. The next set - of results can be obtained by executing the same query with the - continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of replica information. - :type items: list[~azure.servicefabric.models.ReplicaInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ReplicaInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedReplicaInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedSecretResourceDescriptionList(Model): - """The list of secret resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.SecretResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[SecretResourceDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedSecretResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedSecretValueResourceDescriptionList(Model): - """The list of values of a secret resource, paged if the number of results - exceeds the limits of a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in the previous page. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: - list[~azure.servicefabric.models.SecretValueResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[SecretValueResourceDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedSecretValueResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedServiceInfoList(Model): - """The list of services in the cluster for an application. The list is paged - when all of the results cannot fit in a single message. The next set of - results can be obtained by executing the same query with the continuation - token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of service information. - :type items: list[~azure.servicefabric.models.ServiceInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedServiceInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedServicePartitionInfoList(Model): - """The list of partition in the cluster for a service. The list is paged when - all of the results cannot fit in a single message. The next set of results - can be obtained by executing the same query with the continuation token - provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of service partition information. - :type items: list[~azure.servicefabric.models.ServicePartitionInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServicePartitionInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedServicePartitionInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedServiceReplicaDescriptionList(Model): - """The list of service resource replicas in the cluster. The list is paged - when all of the results cannot fit in a single message. The next set of - results can be obtained by executing the same query with the continuation - token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of service resource replica description. - :type items: list[~azure.servicefabric.models.ServiceReplicaDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceReplicaDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedServiceReplicaDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedServiceResourceDescriptionList(Model): - """The list of service resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.ServiceResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceResourceDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedServiceResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedSubNameInfoList(Model): - """A paged list of Service Fabric names. The list is paged when all of the - results cannot fit in a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param is_consistent: Indicates whether any name under the given name has - been modified during the enumeration. If there was a modification, this - property value is false. - :type is_consistent: bool - :param sub_names: List of the child names. - :type sub_names: list[str] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, - 'sub_names': {'key': 'SubNames', 'type': '[str]'}, - } - - def __init__(self, *, continuation_token: str=None, is_consistent: bool=None, sub_names=None, **kwargs) -> None: - super(PagedSubNameInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.is_consistent = is_consistent - self.sub_names = sub_names - - -class PagedUpdatePartitionLoadResultList(Model): - """The list of results of the call UpdatePartitionLoad. The list is paged when - all of the results cannot fit in a single message. The next set of results - can be obtained by executing the same query with the continuation token - provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of partition load update information. - :type items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[UpdatePartitionLoadResult]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedUpdatePartitionLoadResultList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedVolumeResourceDescriptionList(Model): - """The list of volume resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.VolumeResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[VolumeResourceDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedVolumeResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PartitionAnalysisEvent(PartitionEvent): - """Represents the base for all Partition Analysis Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionPrimaryMoveAnalysisEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param metadata: Required. Metadata about an Analysis Event. - :type metadata: ~azure.servicefabric.models.AnalysisEventMetadata - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'metadata': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, - } - - _subtype_map = { - 'kind': {'PartitionPrimaryMoveAnalysis': 'PartitionPrimaryMoveAnalysisEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, metadata, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionAnalysisEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.metadata = metadata - self.kind = 'PartitionAnalysisEvent' - - -class PartitionBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information, for a specific partition, specifying what - backup policy is being applied and suspend description, if any. - - All required parameters must be populated in order to send to Azure. - - :param policy_name: The name of the backup policy which is applicable to - this Service Fabric application or service or partition. - :type policy_name: str - :param policy_inherited_from: Specifies the scope at which the backup - policy is applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type policy_inherited_from: str or - ~azure.servicefabric.models.BackupPolicyScope - :param suspension_info: Describes the backup suspension details. - :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :param kind: Required. Constant filled by server. - :type kind: str - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param partition_id: The partition ID identifying the partition. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, service_name: str=None, partition_id: str=None, **kwargs) -> None: - super(PartitionBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) - self.service_name = service_name - self.partition_id = partition_id - self.kind = 'Partition' - - -class PartitionBackupEntity(BackupEntity): - """Identifies the Service Fabric stateful partition which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :param entity_kind: Required. Constant filled by server. - :type entity_kind: str - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param partition_id: The partition ID identifying the partition. - :type partition_id: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, service_name: str=None, partition_id: str=None, **kwargs) -> None: - super(PartitionBackupEntity, self).__init__(**kwargs) - self.service_name = service_name - self.partition_id = partition_id - self.entity_kind = 'Partition' - - -class PartitionDataLossProgress(Model): - """Information about a partition data loss user-induced operation. - - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param invoke_data_loss_result: Represents information about an operation - in a terminal state (Completed or Faulted). - :type invoke_data_loss_result: - ~azure.servicefabric.models.InvokeDataLossResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'invoke_data_loss_result': {'key': 'InvokeDataLossResult', 'type': 'InvokeDataLossResult'}, - } - - def __init__(self, *, state=None, invoke_data_loss_result=None, **kwargs) -> None: - super(PartitionDataLossProgress, self).__init__(**kwargs) - self.state = state - self.invoke_data_loss_result = invoke_data_loss_result - - -class PartitionHealth(EntityHealth): - """Information about the health of a Service Fabric partition. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param partition_id: ID of the partition whose health information is - described by this object. - :type partition_id: str - :param replica_health_states: The list of replica health states associated - with the partition. - :type replica_health_states: - list[~azure.servicefabric.models.ReplicaHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_health_states': {'key': 'ReplicaHealthStates', 'type': '[ReplicaHealthState]'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, replica_health_states=None, **kwargs) -> None: - super(PartitionHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.partition_id = partition_id - self.replica_health_states = replica_health_states - - -class PartitionHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a partition, containing information about - the data and the algorithm used by health store to evaluate health. The - evaluation is returned only when the aggregated health state is either - Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition whose health evaluation is - described by this object. - :type partition_id: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the partition. The types of the - unhealthy evaluations can be ReplicasHealthEvaluation or - EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, partition_id: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(PartitionHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.partition_id = partition_id - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Partition' - - -class PartitionHealthReportExpiredEvent(PartitionEvent): - """Partition Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'PartitionHealthReportExpired' - - -class PartitionHealthState(EntityHealthState): - """Represents the health state of a partition, which contains the partition - identifier and its aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param partition_id: Id of the partition whose health state is described - by this object. - :type partition_id: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, partition_id: str=None, **kwargs) -> None: - super(PartitionHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.partition_id = partition_id - - -class PartitionHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a partition, which contains the - partition ID, its aggregated health state and any replicas that respect the - filters in the cluster health chunk query description. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param partition_id: The Id of the partition. - :type partition_id: str - :param replica_health_state_chunks: The list of replica health state - chunks belonging to the partition that respect the filters in the cluster - health chunk query description. - :type replica_health_state_chunks: - ~azure.servicefabric.models.ReplicaHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_health_state_chunks': {'key': 'ReplicaHealthStateChunks', 'type': 'ReplicaHealthStateChunkList'}, - } - - def __init__(self, *, health_state=None, partition_id: str=None, replica_health_state_chunks=None, **kwargs) -> None: - super(PartitionHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.partition_id = partition_id - self.replica_health_state_chunks = replica_health_state_chunks - - -class PartitionHealthStateChunkList(Model): - """The list of partition health state chunks that respect the input filters in - the chunk query description. - Returned by get cluster health state chunks query as part of the parent - application hierarchy. - - :param items: The list of partition health state chunks that respect the - input filters in the chunk query. - :type items: list[~azure.servicefabric.models.PartitionHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[PartitionHealthStateChunk]'}, - } - - def __init__(self, *, items=None, **kwargs) -> None: - super(PartitionHealthStateChunkList, self).__init__(**kwargs) - self.items = items - - -class PartitionHealthStateFilter(Model): - """Defines matching criteria to determine whether a partition should be - included as a child of a service in the cluster health chunk. - The partitions are only returned if the parent entities match a filter - specified in the cluster health chunk query description. The parent service - and application must be included in the cluster health chunk. - One filter can match zero, one or multiple partitions, depending on its - properties. - - :param partition_id_filter: ID of the partition that matches the filter. - The filter is applied only to the specified partition, if it exists. - If the partition doesn't exist, no partition is returned in the cluster - health chunk based on this filter. - If the partition exists, it is included in the cluster health chunk if it - respects the other filter properties. - If not specified, all partitions that match the parent filters (if any) - are taken into consideration and matched against the other filter members, - like health state filter. - :type partition_id_filter: str - :param health_state_filter: The filter for the health state of the - partitions. It allows selecting partitions if they match the desired - health states. - The possible values are integer value of one of the following health - states. Only partitions that match the filter are returned. All partitions - are used to evaluate the cluster aggregated health state. - If not specified, default value is None, unless the partition ID is - specified. If the filter has default value and partition ID is specified, - the matching partition is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches partitions with - HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - :param replica_filters: Defines a list of filters that specify which - replicas to be included in the returned cluster health chunk as children - of the parent partition. The replicas are returned only if the parent - partition matches a filter. - If the list is empty, no replicas are returned. All the replicas are used - to evaluate the parent partition aggregated health state, regardless of - the input filters. - The partition filter may specify multiple replica filters. - For example, it can specify a filter to return all replicas with health - state Error and another filter to always include a replica identified by - its replica id. - :type replica_filters: - list[~azure.servicefabric.models.ReplicaHealthStateFilter] - """ - - _attribute_map = { - 'partition_id_filter': {'key': 'PartitionIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'replica_filters': {'key': 'ReplicaFilters', 'type': '[ReplicaHealthStateFilter]'}, - } - - def __init__(self, *, partition_id_filter: str=None, health_state_filter: int=0, replica_filters=None, **kwargs) -> None: - super(PartitionHealthStateFilter, self).__init__(**kwargs) - self.partition_id_filter = partition_id_filter - self.health_state_filter = health_state_filter - self.replica_filters = replica_filters - - -class PartitionInstanceCountScaleMechanism(ScalingMechanismDescription): - """Represents a scaling mechanism for adding or removing instances of - stateless service partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param min_instance_count: Required. Minimum number of instances of the - partition. - :type min_instance_count: int - :param max_instance_count: Required. Maximum number of instances of the - partition. - :type max_instance_count: int - :param scale_increment: Required. The number of instances to add or remove - during a scaling operation. - :type scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_instance_count': {'required': True}, - 'max_instance_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'max_instance_count': {'key': 'MaxInstanceCount', 'type': 'int'}, - 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, - } - - def __init__(self, *, min_instance_count: int, max_instance_count: int, scale_increment: int, **kwargs) -> None: - super(PartitionInstanceCountScaleMechanism, self).__init__(**kwargs) - self.min_instance_count = min_instance_count - self.max_instance_count = max_instance_count - self.scale_increment = scale_increment - self.kind = 'PartitionInstanceCount' - - -class PartitionLoadInformation(Model): - """Represents load information for a partition, which contains the primary and - secondary reported load metrics. - In case there is no load reported, PartitionLoadInformation will contain - the default load for the service of the partition. - For default loads, LoadMetricReport's LastReportedUtc is set to 0. - - :param partition_id: Id of the partition. - :type partition_id: str - :param primary_load_metric_reports: Array of load reports from the primary - replica for this partition. - :type primary_load_metric_reports: - list[~azure.servicefabric.models.LoadMetricReport] - :param secondary_load_metric_reports: Array of aggregated load reports - from all secondary replicas for this partition. - Array only contains the latest reported load for each metric. - :type secondary_load_metric_reports: - list[~azure.servicefabric.models.LoadMetricReport] - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'primary_load_metric_reports': {'key': 'PrimaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - 'secondary_load_metric_reports': {'key': 'SecondaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - } - - def __init__(self, *, partition_id: str=None, primary_load_metric_reports=None, secondary_load_metric_reports=None, **kwargs) -> None: - super(PartitionLoadInformation, self).__init__(**kwargs) - self.partition_id = partition_id - self.primary_load_metric_reports = primary_load_metric_reports - self.secondary_load_metric_reports = secondary_load_metric_reports - - -class PartitionMetricLoadDescription(Model): - """Represents load information for a partition, which contains the metrics - load information about primary, all secondary replicas/instances or a - specific secondary replica/instance located on a specific node. - - :param partition_id: Id of the partition. - :type partition_id: str - :param primary_replica_load_entries: Partition's load information for - primary replica, in case partition is from a stateful service. - :type primary_replica_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :param secondary_replicas_or_instances_load_entries: Partition's load - information for all secondary replicas or instances. - :type secondary_replicas_or_instances_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :param secondary_replica_or_instance_load_entries_per_node: Partition's - load information for a specific secondary replica or instance located on a - specific node. - :type secondary_replica_or_instance_load_entries_per_node: - list[~azure.servicefabric.models.ReplicaMetricLoadDescription] - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'primary_replica_load_entries': {'key': 'PrimaryReplicaLoadEntries', 'type': '[MetricLoadDescription]'}, - 'secondary_replicas_or_instances_load_entries': {'key': 'SecondaryReplicasOrInstancesLoadEntries', 'type': '[MetricLoadDescription]'}, - 'secondary_replica_or_instance_load_entries_per_node': {'key': 'SecondaryReplicaOrInstanceLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, - } - - def __init__(self, *, partition_id: str=None, primary_replica_load_entries=None, secondary_replicas_or_instances_load_entries=None, secondary_replica_or_instance_load_entries_per_node=None, **kwargs) -> None: - super(PartitionMetricLoadDescription, self).__init__(**kwargs) - self.partition_id = partition_id - self.primary_replica_load_entries = primary_replica_load_entries - self.secondary_replicas_or_instances_load_entries = secondary_replicas_or_instances_load_entries - self.secondary_replica_or_instance_load_entries_per_node = secondary_replica_or_instance_load_entries_per_node - - -class PartitionNewHealthReportEvent(PartitionEvent): - """Partition Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'PartitionNewHealthReport' - - -class PartitionPrimaryMoveAnalysisEvent(PartitionAnalysisEvent): - """Partition Primary Move Analysis event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param metadata: Required. Metadata about an Analysis Event. - :type metadata: ~azure.servicefabric.models.AnalysisEventMetadata - :param when_move_completed: Required. Time when the move was completed. - :type when_move_completed: datetime - :param previous_node: Required. The name of a Service Fabric node. - :type previous_node: str - :param current_node: Required. The name of a Service Fabric node. - :type current_node: str - :param move_reason: Required. Move reason. - :type move_reason: str - :param relevant_traces: Required. Relevant traces. - :type relevant_traces: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'metadata': {'required': True}, - 'when_move_completed': {'required': True}, - 'previous_node': {'required': True}, - 'current_node': {'required': True}, - 'move_reason': {'required': True}, - 'relevant_traces': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, - 'when_move_completed': {'key': 'WhenMoveCompleted', 'type': 'iso-8601'}, - 'previous_node': {'key': 'PreviousNode', 'type': 'str'}, - 'current_node': {'key': 'CurrentNode', 'type': 'str'}, - 'move_reason': {'key': 'MoveReason', 'type': 'str'}, - 'relevant_traces': {'key': 'RelevantTraces', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, metadata, when_move_completed, previous_node: str, current_node: str, move_reason: str, relevant_traces: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionPrimaryMoveAnalysisEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, metadata=metadata, **kwargs) - self.when_move_completed = when_move_completed - self.previous_node = previous_node - self.current_node = current_node - self.move_reason = move_reason - self.relevant_traces = relevant_traces - self.kind = 'PartitionPrimaryMoveAnalysis' - - -class PartitionQuorumLossProgress(Model): - """Information about a partition quorum loss user-induced operation. - - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param invoke_quorum_loss_result: Represents information about an - operation in a terminal state (Completed or Faulted). - :type invoke_quorum_loss_result: - ~azure.servicefabric.models.InvokeQuorumLossResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'invoke_quorum_loss_result': {'key': 'InvokeQuorumLossResult', 'type': 'InvokeQuorumLossResult'}, - } - - def __init__(self, *, state=None, invoke_quorum_loss_result=None, **kwargs) -> None: - super(PartitionQuorumLossProgress, self).__init__(**kwargs) - self.state = state - self.invoke_quorum_loss_result = invoke_quorum_loss_result - - -class PartitionReconfiguredEvent(PartitionEvent): - """Partition Reconfiguration event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: Required. Id of Node instance. - :type node_instance_id: str - :param service_type: Required. Type of Service. - :type service_type: str - :param cc_epoch_data_loss_version: Required. CcEpochDataLoss version. - :type cc_epoch_data_loss_version: long - :param cc_epoch_config_version: Required. CcEpochConfig version. - :type cc_epoch_config_version: long - :param reconfig_type: Required. Type of reconfiguration. - :type reconfig_type: str - :param result: Required. Describes reconfiguration result. - :type result: str - :param phase0_duration_ms: Required. Duration of Phase0 in milli-seconds. - :type phase0_duration_ms: float - :param phase1_duration_ms: Required. Duration of Phase1 in milli-seconds. - :type phase1_duration_ms: float - :param phase2_duration_ms: Required. Duration of Phase2 in milli-seconds. - :type phase2_duration_ms: float - :param phase3_duration_ms: Required. Duration of Phase3 in milli-seconds. - :type phase3_duration_ms: float - :param phase4_duration_ms: Required. Duration of Phase4 in milli-seconds. - :type phase4_duration_ms: float - :param total_duration_ms: Required. Total duration in milli-seconds. - :type total_duration_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'service_type': {'required': True}, - 'cc_epoch_data_loss_version': {'required': True}, - 'cc_epoch_config_version': {'required': True}, - 'reconfig_type': {'required': True}, - 'result': {'required': True}, - 'phase0_duration_ms': {'required': True}, - 'phase1_duration_ms': {'required': True}, - 'phase2_duration_ms': {'required': True}, - 'phase3_duration_ms': {'required': True}, - 'phase4_duration_ms': {'required': True}, - 'total_duration_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - 'service_type': {'key': 'ServiceType', 'type': 'str'}, - 'cc_epoch_data_loss_version': {'key': 'CcEpochDataLossVersion', 'type': 'long'}, - 'cc_epoch_config_version': {'key': 'CcEpochConfigVersion', 'type': 'long'}, - 'reconfig_type': {'key': 'ReconfigType', 'type': 'str'}, - 'result': {'key': 'Result', 'type': 'str'}, - 'phase0_duration_ms': {'key': 'Phase0DurationMs', 'type': 'float'}, - 'phase1_duration_ms': {'key': 'Phase1DurationMs', 'type': 'float'}, - 'phase2_duration_ms': {'key': 'Phase2DurationMs', 'type': 'float'}, - 'phase3_duration_ms': {'key': 'Phase3DurationMs', 'type': 'float'}, - 'phase4_duration_ms': {'key': 'Phase4DurationMs', 'type': 'float'}, - 'total_duration_ms': {'key': 'TotalDurationMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, node_name: str, node_instance_id: str, service_type: str, cc_epoch_data_loss_version: int, cc_epoch_config_version: int, reconfig_type: str, result: str, phase0_duration_ms: float, phase1_duration_ms: float, phase2_duration_ms: float, phase3_duration_ms: float, phase4_duration_ms: float, total_duration_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionReconfiguredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.node_name = node_name - self.node_instance_id = node_instance_id - self.service_type = service_type - self.cc_epoch_data_loss_version = cc_epoch_data_loss_version - self.cc_epoch_config_version = cc_epoch_config_version - self.reconfig_type = reconfig_type - self.result = result - self.phase0_duration_ms = phase0_duration_ms - self.phase1_duration_ms = phase1_duration_ms - self.phase2_duration_ms = phase2_duration_ms - self.phase3_duration_ms = phase3_duration_ms - self.phase4_duration_ms = phase4_duration_ms - self.total_duration_ms = total_duration_ms - self.kind = 'PartitionReconfigured' - - -class PartitionRestartProgress(Model): - """Information about a partition restart user-induced operation. - - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param restart_partition_result: Represents information about an operation - in a terminal state (Completed or Faulted). - :type restart_partition_result: - ~azure.servicefabric.models.RestartPartitionResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'restart_partition_result': {'key': 'RestartPartitionResult', 'type': 'RestartPartitionResult'}, - } - - def __init__(self, *, state=None, restart_partition_result=None, **kwargs) -> None: - super(PartitionRestartProgress, self).__init__(**kwargs) - self.state = state - self.restart_partition_result = restart_partition_result - - -class PartitionsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for the partitions of a service, containing - health evaluations for each unhealthy partition that impacts current - aggregated health state. Can be returned when evaluating service health and - the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_partitions_per_service: Maximum allowed - percentage of unhealthy partitions per service from the - ServiceTypeHealthPolicy. - :type max_percent_unhealthy_partitions_per_service: int - :param total_count: Total number of partitions of the service from the - health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - PartitionHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_partitions_per_service: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(PartitionsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.max_percent_unhealthy_partitions_per_service = max_percent_unhealthy_partitions_per_service - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Partitions' - - -class ReplicatorStatus(Model): - """Represents a base class for primary or secondary replicator status. - Contains information about the service fabric replicator like the - replication/copy queue utilization, last acknowledgement received - timestamp, etc. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PrimaryReplicatorStatus, SecondaryReplicatorStatus - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Primary': 'PrimaryReplicatorStatus', 'SecondaryReplicatorStatus': 'SecondaryReplicatorStatus'} - } - - def __init__(self, **kwargs) -> None: - super(ReplicatorStatus, self).__init__(**kwargs) - self.kind = None - - -class PrimaryReplicatorStatus(ReplicatorStatus): - """Provides statistics about the Service Fabric Replicator, when it is - functioning in a Primary role. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param replication_queue_status: Details about the replication queue on - the primary replicator. - :type replication_queue_status: - ~azure.servicefabric.models.ReplicatorQueueStatus - :param remote_replicators: The status of all the active and idle secondary - replicators that the primary is aware of. - :type remote_replicators: - list[~azure.servicefabric.models.RemoteReplicatorStatus] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'remote_replicators': {'key': 'RemoteReplicators', 'type': '[RemoteReplicatorStatus]'}, - } - - def __init__(self, *, replication_queue_status=None, remote_replicators=None, **kwargs) -> None: - super(PrimaryReplicatorStatus, self).__init__(**kwargs) - self.replication_queue_status = replication_queue_status - self.remote_replicators = remote_replicators - self.kind = 'Primary' - - -class Probe(Model): - """Probes have a number of fields that you can use to control their behavior. - - :param initial_delay_seconds: The initial delay in seconds to start - executing probe once codepackage has started. Default value: 0 . - :type initial_delay_seconds: int - :param period_seconds: Periodic seconds to execute probe. Default value: - 10 . - :type period_seconds: int - :param timeout_seconds: Period after which probe is considered as failed - if it hasn't completed successfully. Default value: 1 . - :type timeout_seconds: int - :param success_threshold: The count of succcessful probe executions after - which probe is considered success. Default value: 1 . - :type success_threshold: int - :param failure_threshold: The count of failures after which probe is - considered failed. Default value: 3 . - :type failure_threshold: int - :param exec_property: Exec command to run inside the container. - :type exec_property: ~azure.servicefabric.models.ProbeExec - :param http_get: Http probe for the container. - :type http_get: ~azure.servicefabric.models.ProbeHttpGet - :param tcp_socket: Tcp port to probe inside the container. - :type tcp_socket: ~azure.servicefabric.models.ProbeTcpSocket - """ - - _attribute_map = { - 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, - 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, - 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, - 'exec_property': {'key': 'exec', 'type': 'ProbeExec'}, - 'http_get': {'key': 'httpGet', 'type': 'ProbeHttpGet'}, - 'tcp_socket': {'key': 'tcpSocket', 'type': 'ProbeTcpSocket'}, - } - - def __init__(self, *, initial_delay_seconds: int=0, period_seconds: int=10, timeout_seconds: int=1, success_threshold: int=1, failure_threshold: int=3, exec_property=None, http_get=None, tcp_socket=None, **kwargs) -> None: - super(Probe, self).__init__(**kwargs) - self.initial_delay_seconds = initial_delay_seconds - self.period_seconds = period_seconds - self.timeout_seconds = timeout_seconds - self.success_threshold = success_threshold - self.failure_threshold = failure_threshold - self.exec_property = exec_property - self.http_get = http_get - self.tcp_socket = tcp_socket - - -class ProbeExec(Model): - """Exec command to run inside the container. - - All required parameters must be populated in order to send to Azure. - - :param command: Required. Comma seperated command to run inside the - container for example "sh, -c, echo hello world". - :type command: str - """ - - _validation = { - 'command': {'required': True}, - } - - _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, - } - - def __init__(self, *, command: str, **kwargs) -> None: - super(ProbeExec, self).__init__(**kwargs) - self.command = command - - -class ProbeHttpGet(Model): - """Http probe for the container. - - All required parameters must be populated in order to send to Azure. - - :param port: Required. Port to access for probe. - :type port: int - :param path: Path to access on the HTTP request. - :type path: str - :param host: Host IP to connect to. - :type host: str - :param http_headers: Headers to set in the request. - :type http_headers: list[~azure.servicefabric.models.ProbeHttpGetHeaders] - :param scheme: Scheme for the http probe. Can be Http or Https. Possible - values include: 'http', 'https' - :type scheme: str or ~azure.servicefabric.models.Scheme - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'port': {'key': 'port', 'type': 'int'}, - 'path': {'key': 'path', 'type': 'str'}, - 'host': {'key': 'host', 'type': 'str'}, - 'http_headers': {'key': 'httpHeaders', 'type': '[ProbeHttpGetHeaders]'}, - 'scheme': {'key': 'scheme', 'type': 'str'}, - } - - def __init__(self, *, port: int, path: str=None, host: str=None, http_headers=None, scheme=None, **kwargs) -> None: - super(ProbeHttpGet, self).__init__(**kwargs) - self.port = port - self.path = path - self.host = host - self.http_headers = http_headers - self.scheme = scheme - - -class ProbeHttpGetHeaders(Model): - """Http headers. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the header. - :type name: str - :param value: Required. The value of the header. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str, **kwargs) -> None: - super(ProbeHttpGetHeaders, self).__init__(**kwargs) - self.name = name - self.value = value - - -class ProbeTcpSocket(Model): - """Tcp port to probe inside the container. - - All required parameters must be populated in order to send to Azure. - - :param port: Required. Port to access for probe. - :type port: int - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__(self, *, port: int, **kwargs) -> None: - super(ProbeTcpSocket, self).__init__(**kwargs) - self.port = port - - -class PropertyBatchDescriptionList(Model): - """Describes a list of property batch operations to be executed. Either all or - none of the operations will be committed. - - :param operations: A list of the property batch operations to be executed. - :type operations: list[~azure.servicefabric.models.PropertyBatchOperation] - """ - - _attribute_map = { - 'operations': {'key': 'Operations', 'type': '[PropertyBatchOperation]'}, - } - - def __init__(self, *, operations=None, **kwargs) -> None: - super(PropertyBatchDescriptionList, self).__init__(**kwargs) - self.operations = operations - - -class PropertyDescription(Model): - """Description of a Service Fabric property. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param custom_type_id: The property's custom type ID. Using this property, - the user is able to tag the type of the value of the property. - :type custom_type_id: str - :param value: Required. Describes a Service Fabric property value. - :type value: ~azure.servicefabric.models.PropertyValue - """ - - _validation = { - 'property_name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - } - - def __init__(self, *, property_name: str, value, custom_type_id: str=None, **kwargs) -> None: - super(PropertyDescription, self).__init__(**kwargs) - self.property_name = property_name - self.custom_type_id = custom_type_id - self.value = value - - -class PropertyInfo(Model): - """Information about a Service Fabric property. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the Service Fabric property. - :type name: str - :param value: Describes a Service Fabric property value. - :type value: ~azure.servicefabric.models.PropertyValue - :param metadata: Required. The metadata associated with a property, - including the property's name. - :type metadata: ~azure.servicefabric.models.PropertyMetadata - """ - - _validation = { - 'name': {'required': True}, - 'metadata': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - 'metadata': {'key': 'Metadata', 'type': 'PropertyMetadata'}, - } - - def __init__(self, *, name: str, metadata, value=None, **kwargs) -> None: - super(PropertyInfo, self).__init__(**kwargs) - self.name = name - self.value = value - self.metadata = metadata - - -class PropertyMetadata(Model): - """The metadata associated with a property, including the property's name. - - :param type_id: The kind of property, determined by the type of data. - Following are the possible values. Possible values include: 'Invalid', - 'Binary', 'Int64', 'Double', 'String', 'Guid' - :type type_id: str or ~azure.servicefabric.models.PropertyValueKind - :param custom_type_id: The property's custom type ID. - :type custom_type_id: str - :param parent: The name of the parent Service Fabric Name for the - property. It could be thought of as the name-space/table under which the - property exists. - :type parent: str - :param size_in_bytes: The length of the serialized property value. - :type size_in_bytes: int - :param last_modified_utc_timestamp: Represents when the Property was last - modified. Only write operations will cause this field to be updated. - :type last_modified_utc_timestamp: datetime - :param sequence_number: The version of the property. Every time a property - is modified, its sequence number is increased. - :type sequence_number: str - """ - - _attribute_map = { - 'type_id': {'key': 'TypeId', 'type': 'str'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - 'parent': {'key': 'Parent', 'type': 'str'}, - 'size_in_bytes': {'key': 'SizeInBytes', 'type': 'int'}, - 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - } - - def __init__(self, *, type_id=None, custom_type_id: str=None, parent: str=None, size_in_bytes: int=None, last_modified_utc_timestamp=None, sequence_number: str=None, **kwargs) -> None: - super(PropertyMetadata, self).__init__(**kwargs) - self.type_id = type_id - self.custom_type_id = custom_type_id - self.parent = parent - self.size_in_bytes = size_in_bytes - self.last_modified_utc_timestamp = last_modified_utc_timestamp - self.sequence_number = sequence_number - - -class ProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): - """Describes the operation to register or provision an application type using - an application package uploaded to the Service Fabric image store. - - All required parameters must be populated in order to send to Azure. - - :param async_property: Required. Indicates whether or not provisioning - should occur asynchronously. When set to true, the provision operation - returns when the request is accepted by the system, and the provision - operation continues without any timeout limit. The default value is false. - For large application packages, we recommend setting the value to true. - :type async_property: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_type_build_path: Required. The relative path for the - application package in the image store specified during the prior upload - operation. - :type application_type_build_path: str - :param application_package_cleanup_policy: The kind of action that needs - to be taken for cleaning up the application package after successful - provision. Possible values include: 'Invalid', 'Default', 'Automatic', - 'Manual' - :type application_package_cleanup_policy: str or - ~azure.servicefabric.models.ApplicationPackageCleanupPolicy - """ - - _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, - 'application_type_build_path': {'required': True}, - } - - _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, - 'application_package_cleanup_policy': {'key': 'ApplicationPackageCleanupPolicy', 'type': 'str'}, - } - - def __init__(self, *, async_property: bool, application_type_build_path: str, application_package_cleanup_policy=None, **kwargs) -> None: - super(ProvisionApplicationTypeDescription, self).__init__(async_property=async_property, **kwargs) - self.application_type_build_path = application_type_build_path - self.application_package_cleanup_policy = application_package_cleanup_policy - self.kind = 'ImageStorePath' - - -class ProvisionFabricDescription(Model): - """Describes the parameters for provisioning a cluster. - - :param code_file_path: The cluster code package file path. - :type code_file_path: str - :param cluster_manifest_file_path: The cluster manifest file path. - :type cluster_manifest_file_path: str - """ - - _attribute_map = { - 'code_file_path': {'key': 'CodeFilePath', 'type': 'str'}, - 'cluster_manifest_file_path': {'key': 'ClusterManifestFilePath', 'type': 'str'}, - } - - def __init__(self, *, code_file_path: str=None, cluster_manifest_file_path: str=None, **kwargs) -> None: - super(ProvisionFabricDescription, self).__init__(**kwargs) - self.code_file_path = code_file_path - self.cluster_manifest_file_path = cluster_manifest_file_path - - -class PutPropertyBatchOperation(PropertyBatchOperation): - """Puts the specified property under the specified name. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param value: Required. Describes a Service Fabric property value. - :type value: ~azure.servicefabric.models.PropertyValue - :param custom_type_id: The property's custom type ID. Using this property, - the user is able to tag the type of the value of the property. - :type custom_type_id: str - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - } - - def __init__(self, *, property_name: str, value, custom_type_id: str=None, **kwargs) -> None: - super(PutPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.value = value - self.custom_type_id = custom_type_id - self.kind = 'Put' - - -class ReconfigurationInformation(Model): - """Information about current reconfiguration like phase, type, previous - configuration role of replica and reconfiguration start date time. - - :param previous_configuration_role: Replica role before reconfiguration - started. Possible values include: 'Unknown', 'None', 'Primary', - 'IdleSecondary', 'ActiveSecondary' - :type previous_configuration_role: str or - ~azure.servicefabric.models.ReplicaRole - :param reconfiguration_phase: Current phase of ongoing reconfiguration. If - no reconfiguration is taking place then this value will be "None". - Possible values include: 'Unknown', 'None', 'Phase0', 'Phase1', 'Phase2', - 'Phase3', 'Phase4', 'AbortPhaseZero' - :type reconfiguration_phase: str or - ~azure.servicefabric.models.ReconfigurationPhase - :param reconfiguration_type: Type of current ongoing reconfiguration. If - no reconfiguration is taking place then this value will be "None". - Possible values include: 'Unknown', 'SwapPrimary', 'Failover', 'Other' - :type reconfiguration_type: str or - ~azure.servicefabric.models.ReconfigurationType - :param reconfiguration_start_time_utc: Start time (in UTC) of the ongoing - reconfiguration. If no reconfiguration is taking place then this value - will be zero date-time. - :type reconfiguration_start_time_utc: datetime - """ - - _attribute_map = { - 'previous_configuration_role': {'key': 'PreviousConfigurationRole', 'type': 'str'}, - 'reconfiguration_phase': {'key': 'ReconfigurationPhase', 'type': 'str'}, - 'reconfiguration_type': {'key': 'ReconfigurationType', 'type': 'str'}, - 'reconfiguration_start_time_utc': {'key': 'ReconfigurationStartTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, *, previous_configuration_role=None, reconfiguration_phase=None, reconfiguration_type=None, reconfiguration_start_time_utc=None, **kwargs) -> None: - super(ReconfigurationInformation, self).__init__(**kwargs) - self.previous_configuration_role = previous_configuration_role - self.reconfiguration_phase = reconfiguration_phase - self.reconfiguration_type = reconfiguration_type - self.reconfiguration_start_time_utc = reconfiguration_start_time_utc - - -class RegistryCredential(Model): - """Credential information to connect to container registry. - - :param registry_user_name: The user name to connect to container registry. - :type registry_user_name: str - :param registry_password: The password for supplied username to connect to - container registry. - :type registry_password: str - :param password_encrypted: Indicates that supplied container registry - password is encrypted. - :type password_encrypted: bool - """ - - _attribute_map = { - 'registry_user_name': {'key': 'RegistryUserName', 'type': 'str'}, - 'registry_password': {'key': 'RegistryPassword', 'type': 'str'}, - 'password_encrypted': {'key': 'PasswordEncrypted', 'type': 'bool'}, - } - - def __init__(self, *, registry_user_name: str=None, registry_password: str=None, password_encrypted: bool=None, **kwargs) -> None: - super(RegistryCredential, self).__init__(**kwargs) - self.registry_user_name = registry_user_name - self.registry_password = registry_password - self.password_encrypted = password_encrypted - - -class ReliableCollectionsRef(Model): - """Specifying this parameter adds support for reliable collections. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of ReliableCollection resource. Right now it's - not used and you can use any string. - :type name: str - :param do_not_persist_state: False (the default) if ReliableCollections - state is persisted to disk as usual. True if you do not want to persist - state, in which case replication is still enabled and you can use - ReliableCollections as distributed cache. - :type do_not_persist_state: bool - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'do_not_persist_state': {'key': 'doNotPersistState', 'type': 'bool'}, - } - - def __init__(self, *, name: str, do_not_persist_state: bool=None, **kwargs) -> None: - super(ReliableCollectionsRef, self).__init__(**kwargs) - self.name = name - self.do_not_persist_state = do_not_persist_state - - -class RemoteReplicatorAcknowledgementDetail(Model): - """Provides various statistics of the acknowledgements that are being received - from the remote replicator. - - :param average_receive_duration: Represents the average duration it takes - for the remote replicator to receive an operation. - :type average_receive_duration: str - :param average_apply_duration: Represents the average duration it takes - for the remote replicator to apply an operation. This usually entails - writing the operation to disk. - :type average_apply_duration: str - :param not_received_count: Represents the number of operations not yet - received by a remote replicator. - :type not_received_count: str - :param received_and_not_applied_count: Represents the number of operations - received and not yet applied by a remote replicator. - :type received_and_not_applied_count: str - """ - - _attribute_map = { - 'average_receive_duration': {'key': 'AverageReceiveDuration', 'type': 'str'}, - 'average_apply_duration': {'key': 'AverageApplyDuration', 'type': 'str'}, - 'not_received_count': {'key': 'NotReceivedCount', 'type': 'str'}, - 'received_and_not_applied_count': {'key': 'ReceivedAndNotAppliedCount', 'type': 'str'}, - } - - def __init__(self, *, average_receive_duration: str=None, average_apply_duration: str=None, not_received_count: str=None, received_and_not_applied_count: str=None, **kwargs) -> None: - super(RemoteReplicatorAcknowledgementDetail, self).__init__(**kwargs) - self.average_receive_duration = average_receive_duration - self.average_apply_duration = average_apply_duration - self.not_received_count = not_received_count - self.received_and_not_applied_count = received_and_not_applied_count - - -class RemoteReplicatorAcknowledgementStatus(Model): - """Provides details about the remote replicators from the primary replicator's - point of view. - - :param replication_stream_acknowledgement_detail: Details about the - acknowledgements for operations that are part of the replication stream - data. - :type replication_stream_acknowledgement_detail: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail - :param copy_stream_acknowledgement_detail: Details about the - acknowledgements for operations that are part of the copy stream data. - :type copy_stream_acknowledgement_detail: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail - """ - - _attribute_map = { - 'replication_stream_acknowledgement_detail': {'key': 'ReplicationStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, - 'copy_stream_acknowledgement_detail': {'key': 'CopyStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, - } - - def __init__(self, *, replication_stream_acknowledgement_detail=None, copy_stream_acknowledgement_detail=None, **kwargs) -> None: - super(RemoteReplicatorAcknowledgementStatus, self).__init__(**kwargs) - self.replication_stream_acknowledgement_detail = replication_stream_acknowledgement_detail - self.copy_stream_acknowledgement_detail = copy_stream_acknowledgement_detail - - -class RemoteReplicatorStatus(Model): - """Represents the state of the secondary replicator from the primary - replicator’s point of view. - - :param replica_id: Represents the replica ID of the remote secondary - replicator. - :type replica_id: str - :param last_acknowledgement_processed_time_utc: The last timestamp (in - UTC) when an acknowledgement from the secondary replicator was processed - on the primary. - UTC 0 represents an invalid value, indicating that no acknowledgement - messages were ever processed. - :type last_acknowledgement_processed_time_utc: datetime - :param last_received_replication_sequence_number: The highest replication - operation sequence number that the secondary has received from the - primary. - :type last_received_replication_sequence_number: str - :param last_applied_replication_sequence_number: The highest replication - operation sequence number that the secondary has applied to its state. - :type last_applied_replication_sequence_number: str - :param is_in_build: A value that indicates whether the secondary replica - is in the process of being built. - :type is_in_build: bool - :param last_received_copy_sequence_number: The highest copy operation - sequence number that the secondary has received from the primary. - A value of -1 implies that the secondary has received all copy operations. - :type last_received_copy_sequence_number: str - :param last_applied_copy_sequence_number: The highest copy operation - sequence number that the secondary has applied to its state. - A value of -1 implies that the secondary has applied all copy operations - and the copy process is complete. - :type last_applied_copy_sequence_number: str - :param remote_replicator_acknowledgement_status: Represents the - acknowledgment status for the remote secondary replicator. - :type remote_replicator_acknowledgement_status: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementStatus - """ - - _attribute_map = { - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'last_acknowledgement_processed_time_utc': {'key': 'LastAcknowledgementProcessedTimeUtc', 'type': 'iso-8601'}, - 'last_received_replication_sequence_number': {'key': 'LastReceivedReplicationSequenceNumber', 'type': 'str'}, - 'last_applied_replication_sequence_number': {'key': 'LastAppliedReplicationSequenceNumber', 'type': 'str'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'last_received_copy_sequence_number': {'key': 'LastReceivedCopySequenceNumber', 'type': 'str'}, - 'last_applied_copy_sequence_number': {'key': 'LastAppliedCopySequenceNumber', 'type': 'str'}, - 'remote_replicator_acknowledgement_status': {'key': 'RemoteReplicatorAcknowledgementStatus', 'type': 'RemoteReplicatorAcknowledgementStatus'}, - } - - def __init__(self, *, replica_id: str=None, last_acknowledgement_processed_time_utc=None, last_received_replication_sequence_number: str=None, last_applied_replication_sequence_number: str=None, is_in_build: bool=None, last_received_copy_sequence_number: str=None, last_applied_copy_sequence_number: str=None, remote_replicator_acknowledgement_status=None, **kwargs) -> None: - super(RemoteReplicatorStatus, self).__init__(**kwargs) - self.replica_id = replica_id - self.last_acknowledgement_processed_time_utc = last_acknowledgement_processed_time_utc - self.last_received_replication_sequence_number = last_received_replication_sequence_number - self.last_applied_replication_sequence_number = last_applied_replication_sequence_number - self.is_in_build = is_in_build - self.last_received_copy_sequence_number = last_received_copy_sequence_number - self.last_applied_copy_sequence_number = last_applied_copy_sequence_number - self.remote_replicator_acknowledgement_status = remote_replicator_acknowledgement_status - - -class RepairTask(Model): - """Represents a repair task, which includes information about what kind of - repair was requested, what its progress is, and what its final result was. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the repair task. - :type task_id: str - :param version: The version of the repair task. - When creating a new repair task, the version must be set to zero. When - updating a repair task, - the version is used for optimistic concurrency checks. If the version is - set to zero, the update will not check for write conflicts. If the - version is set to a non-zero value, then the - update will only succeed if the actual current version of the repair task - matches this value. - :type version: str - :param description: A description of the purpose of the repair task, or - other informational details. - May be set when the repair task is created, and is immutable once set. - :type description: str - :param state: Required. The workflow state of the repair task. Valid - initial states are Created, Claimed, and Preparing. Possible values - include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', - 'Executing', 'Restoring', 'Completed' - :type state: str or ~azure.servicefabric.models.State - :param flags: A bitwise-OR of the following values, which gives additional - details about the status of the repair task. - - 1 - Cancellation of the repair has been requested - - 2 - Abort of the repair has been requested - - 4 - Approval of the repair was forced via client request - :type flags: int - :param action: Required. The requested repair action. Must be specified - when the repair task is created, and is immutable once set. - :type action: str - :param target: The target object determines what actions the system will - take to prepare for the impact of the repair, prior to approving execution - of the repair. - May be set when the repair task is created, and is immutable once set. - :type target: ~azure.servicefabric.models.RepairTargetDescriptionBase - :param executor: The name of the repair executor. Must be specified in - Claimed and later states, and is immutable once set. - :type executor: str - :param executor_data: A data string that the repair executor can use to - store its internal state. - :type executor_data: str - :param impact: The impact object determines what actions the system will - take to prepare for the impact of the repair, prior to approving execution - of the repair. - Impact must be specified by the repair executor when transitioning to the - Preparing state, and is immutable once set. - :type impact: ~azure.servicefabric.models.RepairImpactDescriptionBase - :param result_status: A value describing the overall result of the repair - task execution. Must be specified in the Restoring and later states, and - is immutable once set. Possible values include: 'Invalid', 'Succeeded', - 'Cancelled', 'Interrupted', 'Failed', 'Pending' - :type result_status: str or ~azure.servicefabric.models.ResultStatus - :param result_code: A numeric value providing additional details about the - result of the repair task execution. - May be specified in the Restoring and later states, and is immutable once - set. - :type result_code: int - :param result_details: A string providing additional details about the - result of the repair task execution. - May be specified in the Restoring and later states, and is immutable once - set. - :type result_details: str - :param history: An object that contains timestamps of the repair task's - state transitions. - These timestamps are updated by the system, and cannot be directly - modified. - :type history: ~azure.servicefabric.models.RepairTaskHistory - :param preparing_health_check_state: The workflow state of the health - check when the repair task is in the Preparing state. Possible values - include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' - :type preparing_health_check_state: str or - ~azure.servicefabric.models.RepairTaskHealthCheckState - :param restoring_health_check_state: The workflow state of the health - check when the repair task is in the Restoring state. Possible values - include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' - :type restoring_health_check_state: str or - ~azure.servicefabric.models.RepairTaskHealthCheckState - :param perform_preparing_health_check: A value to determine if health - checks will be performed when the repair task enters the Preparing state. - :type perform_preparing_health_check: bool - :param perform_restoring_health_check: A value to determine if health - checks will be performed when the repair task enters the Restoring state. - :type perform_restoring_health_check: bool - """ - - _validation = { - 'task_id': {'required': True}, - 'state': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'action': {'key': 'Action', 'type': 'str'}, - 'target': {'key': 'Target', 'type': 'RepairTargetDescriptionBase'}, - 'executor': {'key': 'Executor', 'type': 'str'}, - 'executor_data': {'key': 'ExecutorData', 'type': 'str'}, - 'impact': {'key': 'Impact', 'type': 'RepairImpactDescriptionBase'}, - 'result_status': {'key': 'ResultStatus', 'type': 'str'}, - 'result_code': {'key': 'ResultCode', 'type': 'int'}, - 'result_details': {'key': 'ResultDetails', 'type': 'str'}, - 'history': {'key': 'History', 'type': 'RepairTaskHistory'}, - 'preparing_health_check_state': {'key': 'PreparingHealthCheckState', 'type': 'str'}, - 'restoring_health_check_state': {'key': 'RestoringHealthCheckState', 'type': 'str'}, - 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, - 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, - } - - def __init__(self, *, task_id: str, state, action: str, version: str=None, description: str=None, flags: int=None, target=None, executor: str=None, executor_data: str=None, impact=None, result_status=None, result_code: int=None, result_details: str=None, history=None, preparing_health_check_state=None, restoring_health_check_state=None, perform_preparing_health_check: bool=None, perform_restoring_health_check: bool=None, **kwargs) -> None: - super(RepairTask, self).__init__(**kwargs) - self.task_id = task_id - self.version = version - self.description = description - self.state = state - self.flags = flags - self.action = action - self.target = target - self.executor = executor - self.executor_data = executor_data - self.impact = impact - self.result_status = result_status - self.result_code = result_code - self.result_details = result_details - self.history = history - self.preparing_health_check_state = preparing_health_check_state - self.restoring_health_check_state = restoring_health_check_state - self.perform_preparing_health_check = perform_preparing_health_check - self.perform_restoring_health_check = perform_restoring_health_check - - -class RepairTaskApproveDescription(Model): - """Describes a request for forced approval of a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the repair task. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current version of the repair task. If zero, then no version check - is performed. - :type version: str - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, *, task_id: str, version: str=None, **kwargs) -> None: - super(RepairTaskApproveDescription, self).__init__(**kwargs) - self.task_id = task_id - self.version = version - - -class RepairTaskCancelDescription(Model): - """Describes a request to cancel a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the repair task. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current version of the repair task. If zero, then no version check - is performed. - :type version: str - :param request_abort: _True_ if the repair should be stopped as soon as - possible even if it has already started executing. _False_ if the repair - should be cancelled only if execution has not yet started. - :type request_abort: bool - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'request_abort': {'key': 'RequestAbort', 'type': 'bool'}, - } - - def __init__(self, *, task_id: str, version: str=None, request_abort: bool=None, **kwargs) -> None: - super(RepairTaskCancelDescription, self).__init__(**kwargs) - self.task_id = task_id - self.version = version - self.request_abort = request_abort - - -class RepairTaskDeleteDescription(Model): - """Describes a request to delete a completed repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the completed repair task to be - deleted. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current version of the repair task. If zero, then no version check - is performed. - :type version: str - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, *, task_id: str, version: str=None, **kwargs) -> None: - super(RepairTaskDeleteDescription, self).__init__(**kwargs) - self.task_id = task_id - self.version = version - - -class RepairTaskHistory(Model): - """A record of the times when the repair task entered each state. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - :param created_utc_timestamp: The time when the repair task entered the - Created state. - :type created_utc_timestamp: datetime - :param claimed_utc_timestamp: The time when the repair task entered the - Claimed state. - :type claimed_utc_timestamp: datetime - :param preparing_utc_timestamp: The time when the repair task entered the - Preparing state. - :type preparing_utc_timestamp: datetime - :param approved_utc_timestamp: The time when the repair task entered the - Approved state - :type approved_utc_timestamp: datetime - :param executing_utc_timestamp: The time when the repair task entered the - Executing state - :type executing_utc_timestamp: datetime - :param restoring_utc_timestamp: The time when the repair task entered the - Restoring state - :type restoring_utc_timestamp: datetime - :param completed_utc_timestamp: The time when the repair task entered the - Completed state - :type completed_utc_timestamp: datetime - :param preparing_health_check_start_utc_timestamp: The time when the - repair task started the health check in the Preparing state. - :type preparing_health_check_start_utc_timestamp: datetime - :param preparing_health_check_end_utc_timestamp: The time when the repair - task completed the health check in the Preparing state. - :type preparing_health_check_end_utc_timestamp: datetime - :param restoring_health_check_start_utc_timestamp: The time when the - repair task started the health check in the Restoring state. - :type restoring_health_check_start_utc_timestamp: datetime - :param restoring_health_check_end_utc_timestamp: The time when the repair - task completed the health check in the Restoring state. - :type restoring_health_check_end_utc_timestamp: datetime - """ - - _attribute_map = { - 'created_utc_timestamp': {'key': 'CreatedUtcTimestamp', 'type': 'iso-8601'}, - 'claimed_utc_timestamp': {'key': 'ClaimedUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_utc_timestamp': {'key': 'PreparingUtcTimestamp', 'type': 'iso-8601'}, - 'approved_utc_timestamp': {'key': 'ApprovedUtcTimestamp', 'type': 'iso-8601'}, - 'executing_utc_timestamp': {'key': 'ExecutingUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_utc_timestamp': {'key': 'RestoringUtcTimestamp', 'type': 'iso-8601'}, - 'completed_utc_timestamp': {'key': 'CompletedUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_health_check_start_utc_timestamp': {'key': 'PreparingHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_health_check_end_utc_timestamp': {'key': 'PreparingHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_health_check_start_utc_timestamp': {'key': 'RestoringHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_health_check_end_utc_timestamp': {'key': 'RestoringHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, created_utc_timestamp=None, claimed_utc_timestamp=None, preparing_utc_timestamp=None, approved_utc_timestamp=None, executing_utc_timestamp=None, restoring_utc_timestamp=None, completed_utc_timestamp=None, preparing_health_check_start_utc_timestamp=None, preparing_health_check_end_utc_timestamp=None, restoring_health_check_start_utc_timestamp=None, restoring_health_check_end_utc_timestamp=None, **kwargs) -> None: - super(RepairTaskHistory, self).__init__(**kwargs) - self.created_utc_timestamp = created_utc_timestamp - self.claimed_utc_timestamp = claimed_utc_timestamp - self.preparing_utc_timestamp = preparing_utc_timestamp - self.approved_utc_timestamp = approved_utc_timestamp - self.executing_utc_timestamp = executing_utc_timestamp - self.restoring_utc_timestamp = restoring_utc_timestamp - self.completed_utc_timestamp = completed_utc_timestamp - self.preparing_health_check_start_utc_timestamp = preparing_health_check_start_utc_timestamp - self.preparing_health_check_end_utc_timestamp = preparing_health_check_end_utc_timestamp - self.restoring_health_check_start_utc_timestamp = restoring_health_check_start_utc_timestamp - self.restoring_health_check_end_utc_timestamp = restoring_health_check_end_utc_timestamp - - -class RepairTaskUpdateHealthPolicyDescription(Model): - """Describes a request to update the health policy of a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the repair task to be updated. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current value of the repair task. If zero, then no version check is - performed. - :type version: str - :param perform_preparing_health_check: A boolean indicating if health - check is to be performed in the Preparing stage of the repair task. If not - specified the existing value should not be altered. Otherwise, specify the - desired new value. - :type perform_preparing_health_check: bool - :param perform_restoring_health_check: A boolean indicating if health - check is to be performed in the Restoring stage of the repair task. If not - specified the existing value should not be altered. Otherwise, specify the - desired new value. - :type perform_restoring_health_check: bool - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, - 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, - } - - def __init__(self, *, task_id: str, version: str=None, perform_preparing_health_check: bool=None, perform_restoring_health_check: bool=None, **kwargs) -> None: - super(RepairTaskUpdateHealthPolicyDescription, self).__init__(**kwargs) - self.task_id = task_id - self.version = version - self.perform_preparing_health_check = perform_preparing_health_check - self.perform_restoring_health_check = perform_restoring_health_check - - -class RepairTaskUpdateInfo(Model): - """Describes the result of an operation that created or updated a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param version: Required. The new version of the repair task. - :type version: str - """ - - _validation = { - 'version': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, *, version: str, **kwargs) -> None: - super(RepairTaskUpdateInfo, self).__init__(**kwargs) - self.version = version - - -class ReplicaHealth(EntityHealth): - """Represents a base class for stateful service replica or stateless service - instance health. - Contains the replica aggregated health state, the health events and the - unhealthy evaluations. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaHealth, - StatelessServiceInstanceHealth - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param partition_id: Id of the partition to which this replica belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaHealth', 'Stateless': 'StatelessServiceInstanceHealth'} - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, **kwargs) -> None: - super(ReplicaHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.partition_id = partition_id - self.service_kind = None - self.service_kind = 'ReplicaHealth' - - -class ReplicaHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a replica, containing information about - the data and the algorithm used by health store to evaluate health. The - evaluation is returned only when the aggregated health state is either - Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition to which the replica belongs. - :type partition_id: str - :param replica_or_instance_id: Id of a stateful service replica or a - stateless service instance. This ID is used in the queries that apply to - both stateful and stateless services. It is used by Service Fabric to - uniquely identify a replica of a partition of a stateful service or an - instance of a stateless service partition. It is unique within a partition - and does not change for the lifetime of the replica or the instance. If a - stateful replica gets dropped and another replica gets created on the same - node for the same partition, it will get a different value for the ID. If - a stateless instance is failed over on the same or different node it will - get a different value for the ID. - :type replica_or_instance_id: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the replica. The types of the - unhealthy evaluations can be EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, partition_id: str=None, replica_or_instance_id: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ReplicaHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.partition_id = partition_id - self.replica_or_instance_id = replica_or_instance_id - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Replica' - - -class ReplicaHealthState(EntityHealthState): - """Represents a base class for stateful service replica or stateless service - instance health state. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaHealthState, - StatelessServiceInstanceHealthState - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param partition_id: The ID of the partition to which this replica - belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaHealthState', 'Stateless': 'StatelessServiceInstanceHealthState'} - } - - def __init__(self, *, aggregated_health_state=None, partition_id: str=None, **kwargs) -> None: - super(ReplicaHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.partition_id = partition_id - self.service_kind = None - self.service_kind = 'ReplicaHealthState' - - -class ReplicaHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a stateful service replica or a - stateless service instance. - The replica health state contains the replica ID and its aggregated health - state. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param replica_or_instance_id: Id of a stateful service replica or a - stateless service instance. This ID is used in the queries that apply to - both stateful and stateless services. It is used by Service Fabric to - uniquely identify a replica of a partition of a stateful service or an - instance of a stateless service partition. It is unique within a partition - and does not change for the lifetime of the replica or the instance. If a - stateful replica gets dropped and another replica gets created on the same - node for the same partition, it will get a different value for the ID. If - a stateless instance is failed over on the same or different node it will - get a different value for the ID. - :type replica_or_instance_id: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, - } - - def __init__(self, *, health_state=None, replica_or_instance_id: str=None, **kwargs) -> None: - super(ReplicaHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.replica_or_instance_id = replica_or_instance_id - - -class ReplicaHealthStateChunkList(Model): - """The list of replica health state chunks that respect the input filters in - the chunk query. Returned by get cluster health state chunks query. - - :param items: The list of replica health state chunks that respect the - input filters in the chunk query. - :type items: list[~azure.servicefabric.models.ReplicaHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[ReplicaHealthStateChunk]'}, - } - - def __init__(self, *, items=None, **kwargs) -> None: - super(ReplicaHealthStateChunkList, self).__init__(**kwargs) - self.items = items - - -class ReplicaHealthStateFilter(Model): - """Defines matching criteria to determine whether a replica should be included - as a child of a partition in the cluster health chunk. - The replicas are only returned if the parent entities match a filter - specified in the cluster health chunk query description. The parent - partition, service and application must be included in the cluster health - chunk. - One filter can match zero, one or multiple replicas, depending on its - properties. - - :param replica_or_instance_id_filter: Id of the stateful service replica - or stateless service instance that matches the filter. The filter is - applied only to the specified replica, if it exists. - If the replica doesn't exist, no replica is returned in the cluster health - chunk based on this filter. - If the replica exists, it is included in the cluster health chunk if it - respects the other filter properties. - If not specified, all replicas that match the parent filters (if any) are - taken into consideration and matched against the other filter members, - like health state filter. - :type replica_or_instance_id_filter: str - :param health_state_filter: The filter for the health state of the - replicas. It allows selecting replicas if they match the desired health - states. - The possible values are integer value of one of the following health - states. Only replicas that match the filter are returned. All replicas are - used to evaluate the parent partition aggregated health state. - If not specified, default value is None, unless the replica ID is - specified. If the filter has default value and replica ID is specified, - the matching replica is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches replicas with - HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - """ - - _attribute_map = { - 'replica_or_instance_id_filter': {'key': 'ReplicaOrInstanceIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__(self, *, replica_or_instance_id_filter: str=None, health_state_filter: int=0, **kwargs) -> None: - super(ReplicaHealthStateFilter, self).__init__(**kwargs) - self.replica_or_instance_id_filter = replica_or_instance_id_filter - self.health_state_filter = health_state_filter - - -class ReplicaInfo(Model): - """Information about the identity, status, health, node name, uptime, and - other details about the replica. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaInfo, StatelessServiceInstanceInfo - - All required parameters must be populated in order to send to Azure. - - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param address: The address the replica is listening on. - :type address: str - :param last_in_build_duration_in_seconds: The last in build duration of - the replica in seconds. - :type last_in_build_duration_in_seconds: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaInfo', 'Stateless': 'StatelessServiceInstanceInfo'} - } - - def __init__(self, *, replica_status=None, health_state=None, node_name: str=None, address: str=None, last_in_build_duration_in_seconds: str=None, **kwargs) -> None: - super(ReplicaInfo, self).__init__(**kwargs) - self.replica_status = replica_status - self.health_state = health_state - self.node_name = node_name - self.address = address - self.last_in_build_duration_in_seconds = last_in_build_duration_in_seconds - self.service_kind = None - - -class ReplicaLifecycleDescription(Model): - """Describes how the replica will behave. - - :param is_singleton_replica_move_allowed_during_upgrade: If set to true, - replicas with a target replica set size of 1 will be permitted to move - during upgrade. - :type is_singleton_replica_move_allowed_during_upgrade: bool - :param restore_replica_location_after_upgrade: If set to true, move/swap - replica to original location after upgrade. - :type restore_replica_location_after_upgrade: bool - """ - - _attribute_map = { - 'is_singleton_replica_move_allowed_during_upgrade': {'key': 'IsSingletonReplicaMoveAllowedDuringUpgrade', 'type': 'bool'}, - 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, - } - - def __init__(self, *, is_singleton_replica_move_allowed_during_upgrade: bool=None, restore_replica_location_after_upgrade: bool=None, **kwargs) -> None: - super(ReplicaLifecycleDescription, self).__init__(**kwargs) - self.is_singleton_replica_move_allowed_during_upgrade = is_singleton_replica_move_allowed_during_upgrade - self.restore_replica_location_after_upgrade = restore_replica_location_after_upgrade - - -class ReplicaMetricLoadDescription(Model): - """Specifies metric loads of a partition's specific secondary replica or - instance. - - :param node_name: Node name of a specific secondary replica or instance. - :type node_name: str - :param replica_or_instance_load_entries: Loads of a different metrics for - a partition's secondary replica or instance. - :type replica_or_instance_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'replica_or_instance_load_entries': {'key': 'ReplicaOrInstanceLoadEntries', 'type': '[MetricLoadDescription]'}, - } - - def __init__(self, *, node_name: str=None, replica_or_instance_load_entries=None, **kwargs) -> None: - super(ReplicaMetricLoadDescription, self).__init__(**kwargs) - self.node_name = node_name - self.replica_or_instance_load_entries = replica_or_instance_load_entries - - -class ReplicasHealthEvaluation(HealthEvaluation): - """Represents health evaluation for replicas, containing health evaluations - for each unhealthy replica that impacted current aggregated health state. - Can be returned when evaluating partition health and the aggregated health - state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_replicas_per_partition: Maximum allowed - percentage of unhealthy replicas per partition from the - ApplicationHealthPolicy. - :type max_percent_unhealthy_replicas_per_partition: int - :param total_count: Total number of replicas in the partition from the - health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - ReplicaHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_replicas_per_partition: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ReplicasHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.max_percent_unhealthy_replicas_per_partition = max_percent_unhealthy_replicas_per_partition - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Replicas' - - -class ReplicatorQueueStatus(Model): - """Provides various statistics of the queue used in the service fabric - replicator. - Contains information about the service fabric replicator like the - replication/copy queue utilization, last acknowledgement received - timestamp, etc. - Depending on the role of the replicator, the properties in this type imply - different meanings. - - :param queue_utilization_percentage: Represents the utilization of the - queue. A value of 0 indicates that the queue is empty and a value of 100 - indicates the queue is full. - :type queue_utilization_percentage: int - :param queue_memory_size: Represents the virtual memory consumed by the - queue in bytes. - :type queue_memory_size: str - :param first_sequence_number: On a primary replicator, this is - semantically the sequence number of the operation for which all the - secondary replicas have sent an acknowledgement. - On a secondary replicator, this is the smallest sequence number of the - operation that is present in the queue. - :type first_sequence_number: str - :param completed_sequence_number: On a primary replicator, this is - semantically the highest sequence number of the operation for which all - the secondary replicas have sent an acknowledgement. - On a secondary replicator, this is semantically the highest sequence - number that has been applied to the persistent state. - :type completed_sequence_number: str - :param committed_sequence_number: On a primary replicator, this is - semantically the highest sequence number of the operation for which a - write quorum of the secondary replicas have sent an acknowledgement. - On a secondary replicator, this is semantically the highest sequence - number of the in-order operation received from the primary. - :type committed_sequence_number: str - :param last_sequence_number: Represents the latest sequence number of the - operation that is available in the queue. - :type last_sequence_number: str - """ - - _attribute_map = { - 'queue_utilization_percentage': {'key': 'QueueUtilizationPercentage', 'type': 'int'}, - 'queue_memory_size': {'key': 'QueueMemorySize', 'type': 'str'}, - 'first_sequence_number': {'key': 'FirstSequenceNumber', 'type': 'str'}, - 'completed_sequence_number': {'key': 'CompletedSequenceNumber', 'type': 'str'}, - 'committed_sequence_number': {'key': 'CommittedSequenceNumber', 'type': 'str'}, - 'last_sequence_number': {'key': 'LastSequenceNumber', 'type': 'str'}, - } - - def __init__(self, *, queue_utilization_percentage: int=None, queue_memory_size: str=None, first_sequence_number: str=None, completed_sequence_number: str=None, committed_sequence_number: str=None, last_sequence_number: str=None, **kwargs) -> None: - super(ReplicatorQueueStatus, self).__init__(**kwargs) - self.queue_utilization_percentage = queue_utilization_percentage - self.queue_memory_size = queue_memory_size - self.first_sequence_number = first_sequence_number - self.completed_sequence_number = completed_sequence_number - self.committed_sequence_number = committed_sequence_number - self.last_sequence_number = last_sequence_number - - -class ResolvedServiceEndpoint(Model): - """Endpoint of a resolved service partition. - - :param kind: The role of the replica where the endpoint is reported. - Possible values include: 'Invalid', 'Stateless', 'StatefulPrimary', - 'StatefulSecondary' - :type kind: str or ~azure.servicefabric.models.ServiceEndpointRole - :param address: The address of the endpoint. If the endpoint has multiple - listeners the address is a JSON object with one property per listener with - the value as the address of that listener. - :type address: str - """ - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - } - - def __init__(self, *, kind=None, address: str=None, **kwargs) -> None: - super(ResolvedServiceEndpoint, self).__init__(**kwargs) - self.kind = kind - self.address = address - - -class ResolvedServicePartition(Model): - """Information about a service partition and its associated endpoints. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The full name of the service with 'fabric:' URI - scheme. - :type name: str - :param partition_information: Required. A representation of the resolved - partition. - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param endpoints: Required. List of resolved service endpoints of a - service partition. - :type endpoints: list[~azure.servicefabric.models.ResolvedServiceEndpoint] - :param version: Required. The version of this resolved service partition - result. This version should be passed in the next time the ResolveService - call is made via the PreviousRspVersion query parameter. - :type version: str - """ - - _validation = { - 'name': {'required': True}, - 'partition_information': {'required': True}, - 'endpoints': {'required': True}, - 'version': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'endpoints': {'key': 'Endpoints', 'type': '[ResolvedServiceEndpoint]'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, *, name: str, partition_information, endpoints, version: str, **kwargs) -> None: - super(ResolvedServicePartition, self).__init__(**kwargs) - self.name = name - self.partition_information = partition_information - self.endpoints = endpoints - self.version = version - - -class ResourceLimits(Model): - """This type describes the resource limits for a given container. It describes - the most amount of resources a container is allowed to use before being - restarted. - - :param memory_in_gb: The memory limit in GB. - :type memory_in_gb: float - :param cpu: CPU limits in cores. At present, only full cores are - supported. - :type cpu: float - """ - - _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, - } - - def __init__(self, *, memory_in_gb: float=None, cpu: float=None, **kwargs) -> None: - super(ResourceLimits, self).__init__(**kwargs) - self.memory_in_gb = memory_in_gb - self.cpu = cpu - - -class ResourceRequests(Model): - """This type describes the requested resources for a given container. It - describes the least amount of resources required for the container. A - container can consume more than requested resources up to the specified - limits before being restarted. Currently, the requested resources are - treated as limits. - - All required parameters must be populated in order to send to Azure. - - :param memory_in_gb: Required. The memory request in GB for this - container. - :type memory_in_gb: float - :param cpu: Required. Requested number of CPU cores. At present, only full - cores are supported. - :type cpu: float - """ - - _validation = { - 'memory_in_gb': {'required': True}, - 'cpu': {'required': True}, - } - - _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, - } - - def __init__(self, *, memory_in_gb: float, cpu: float, **kwargs) -> None: - super(ResourceRequests, self).__init__(**kwargs) - self.memory_in_gb = memory_in_gb - self.cpu = cpu - - -class ResourceRequirements(Model): - """This type describes the resource requirements for a container or a service. - - All required parameters must be populated in order to send to Azure. - - :param requests: Required. Describes the requested resources for a given - container. - :type requests: ~azure.servicefabric.models.ResourceRequests - :param limits: Describes the maximum limits on the resources for a given - container. - :type limits: ~azure.servicefabric.models.ResourceLimits - """ - - _validation = { - 'requests': {'required': True}, - } - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'ResourceRequests'}, - 'limits': {'key': 'limits', 'type': 'ResourceLimits'}, - } - - def __init__(self, *, requests, limits=None, **kwargs) -> None: - super(ResourceRequirements, self).__init__(**kwargs) - self.requests = requests - self.limits = limits - - -class RestartDeployedCodePackageDescription(Model): - """Defines description for restarting a deployed code package on Service - Fabric node. - - All required parameters must be populated in order to send to Azure. - - :param service_manifest_name: Required. The name of service manifest that - specified this code package. - :type service_manifest_name: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param code_package_name: Required. The name of the code package defined - in the service manifest. - :type code_package_name: str - :param code_package_instance_id: Required. The instance ID for currently - running entry point. For a code package setup entry point (if specified) - runs first and after it finishes main entry point is started. - Each time entry point executable is run, its instance ID will change. If 0 - is passed in as the code package instance ID, the API will restart the - code package with whatever instance ID it is currently running. - If an instance ID other than 0 is passed in, the API will restart the code - package only if the current Instance ID matches the passed in instance ID. - Note, passing in the exact instance ID (not 0) in the API is safer, - because if ensures at most one restart of the code package. - :type code_package_instance_id: str - """ - - _validation = { - 'service_manifest_name': {'required': True}, - 'code_package_name': {'required': True}, - 'code_package_instance_id': {'required': True}, - } - - _attribute_map = { - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'code_package_instance_id': {'key': 'CodePackageInstanceId', 'type': 'str'}, - } - - def __init__(self, *, service_manifest_name: str, code_package_name: str, code_package_instance_id: str, service_package_activation_id: str=None, **kwargs) -> None: - super(RestartDeployedCodePackageDescription, self).__init__(**kwargs) - self.service_manifest_name = service_manifest_name - self.service_package_activation_id = service_package_activation_id - self.code_package_name = code_package_name - self.code_package_instance_id = code_package_instance_id - - -class RestartNodeDescription(Model): - """Describes the parameters to restart a Service Fabric node. - - All required parameters must be populated in order to send to Azure. - - :param node_instance_id: Required. The instance ID of the target node. If - instance ID is specified the node is restarted only if it matches with the - current instance of the node. A default value of "0" would match any - instance ID. The instance ID can be obtained using get node query. Default - value: "0" . - :type node_instance_id: str - :param create_fabric_dump: Specify True to create a dump of the fabric - node process. This is case-sensitive. Possible values include: 'False', - 'True'. Default value: "False" . - :type create_fabric_dump: str or - ~azure.servicefabric.models.CreateFabricDump - """ - - _validation = { - 'node_instance_id': {'required': True}, - } - - _attribute_map = { - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - 'create_fabric_dump': {'key': 'CreateFabricDump', 'type': 'str'}, - } - - def __init__(self, *, node_instance_id: str="0", create_fabric_dump="False", **kwargs) -> None: - super(RestartNodeDescription, self).__init__(**kwargs) - self.node_instance_id = node_instance_id - self.create_fabric_dump = create_fabric_dump - - -class RestartPartitionResult(Model): - """Represents information about an operation in a terminal state (Completed or - Faulted). - - :param error_code: If OperationState is Completed, this is 0. If - OperationState is Faulted, this is an error code indicating the reason. - :type error_code: int - :param selected_partition: This class returns information about the - partition that the user-induced operation acted upon. - :type selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__(self, *, error_code: int=None, selected_partition=None, **kwargs) -> None: - super(RestartPartitionResult, self).__init__(**kwargs) - self.error_code = error_code - self.selected_partition = selected_partition - - -class RestorePartitionDescription(Model): - """Specifies the parameters needed to trigger a restore of a specific - partition. - - All required parameters must be populated in order to send to Azure. - - :param backup_id: Required. Unique backup ID. - :type backup_id: str - :param backup_location: Required. Location of the backup relative to the - backup storage specified/ configured. - :type backup_location: str - :param backup_storage: Location of the backup from where the partition - will be restored. - :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription - """ - - _validation = { - 'backup_id': {'required': True}, - 'backup_location': {'required': True}, - } - - _attribute_map = { - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, - } - - def __init__(self, *, backup_id: str, backup_location: str, backup_storage=None, **kwargs) -> None: - super(RestorePartitionDescription, self).__init__(**kwargs) - self.backup_id = backup_id - self.backup_location = backup_location - self.backup_storage = backup_storage - - -class RestoreProgressInfo(Model): - """Describes the progress of a restore operation on a partition. - - :param restore_state: Represents the current state of the partition - restore operation. Possible values include: 'Invalid', 'Accepted', - 'RestoreInProgress', 'Success', 'Failure', 'Timeout' - :type restore_state: str or ~azure.servicefabric.models.RestoreState - :param time_stamp_utc: Timestamp when operation succeeded or failed. - :type time_stamp_utc: datetime - :param restored_epoch: Describes the epoch at which the partition is - restored. - :type restored_epoch: ~azure.servicefabric.models.Epoch - :param restored_lsn: Restored LSN. - :type restored_lsn: str - :param failure_error: Denotes the failure encountered in performing - restore operation. - :type failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'restore_state': {'key': 'RestoreState', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'restored_epoch': {'key': 'RestoredEpoch', 'type': 'Epoch'}, - 'restored_lsn': {'key': 'RestoredLsn', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__(self, *, restore_state=None, time_stamp_utc=None, restored_epoch=None, restored_lsn: str=None, failure_error=None, **kwargs) -> None: - super(RestoreProgressInfo, self).__init__(**kwargs) - self.restore_state = restore_state - self.time_stamp_utc = time_stamp_utc - self.restored_epoch = restored_epoch - self.restored_lsn = restored_lsn - self.failure_error = failure_error - - -class ResumeApplicationUpgradeDescription(Model): - """Describes the parameters for resuming an unmonitored manual Service Fabric - application upgrade. - - All required parameters must be populated in order to send to Azure. - - :param upgrade_domain_name: Required. The name of the upgrade domain in - which to resume the upgrade. - :type upgrade_domain_name: str - """ - - _validation = { - 'upgrade_domain_name': {'required': True}, - } - - _attribute_map = { - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - } - - def __init__(self, *, upgrade_domain_name: str, **kwargs) -> None: - super(ResumeApplicationUpgradeDescription, self).__init__(**kwargs) - self.upgrade_domain_name = upgrade_domain_name - - -class ResumeClusterUpgradeDescription(Model): - """Describes the parameters for resuming a cluster upgrade. - - All required parameters must be populated in order to send to Azure. - - :param upgrade_domain: Required. The next upgrade domain for this cluster - upgrade. - :type upgrade_domain: str - """ - - _validation = { - 'upgrade_domain': {'required': True}, - } - - _attribute_map = { - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - } - - def __init__(self, *, upgrade_domain: str, **kwargs) -> None: - super(ResumeClusterUpgradeDescription, self).__init__(**kwargs) - self.upgrade_domain = upgrade_domain - - -class RollingUpgradeUpdateDescription(Model): - """Describes the parameters for updating a rolling upgrade of application or - cluster. - - All required parameters must be populated in order to send to Azure. - - :param rolling_upgrade_mode: Required. The mode used to monitor health - during a rolling upgrade. The values are UnmonitoredAuto, - UnmonitoredManual, and Monitored. Possible values include: 'Invalid', - 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: - "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param replica_set_check_timeout_in_milliseconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type replica_set_check_timeout_in_milliseconds: long - :param failure_action: The compensating action to perform when a Monitored - upgrade encounters monitoring policy or health policy violations. - Invalid indicates the failure action is invalid. Rollback specifies that - the upgrade will start rolling back automatically. - Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - mode. Possible values include: 'Invalid', 'Rollback', 'Manual' - :type failure_action: str or ~azure.servicefabric.models.FailureAction - :param health_check_wait_duration_in_milliseconds: The amount of time to - wait after completing an upgrade domain before applying health policies. - It is first interpreted as a string representing an ISO 8601 duration. If - that fails, then it is interpreted as a number representing the total - number of milliseconds. - :type health_check_wait_duration_in_milliseconds: str - :param health_check_stable_duration_in_milliseconds: The amount of time - that the application or cluster must remain healthy before the upgrade - proceeds to the next upgrade domain. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type health_check_stable_duration_in_milliseconds: str - :param health_check_retry_timeout_in_milliseconds: The amount of time to - retry health evaluation when the application or cluster is unhealthy - before FailureAction is executed. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type health_check_retry_timeout_in_milliseconds: str - :param upgrade_timeout_in_milliseconds: The amount of time the overall - upgrade has to complete before FailureAction is executed. It is first - interpreted as a string representing an ISO 8601 duration. If that fails, - then it is interpreted as a number representing the total number of - milliseconds. - :type upgrade_timeout_in_milliseconds: str - :param upgrade_domain_timeout_in_milliseconds: The amount of time each - upgrade domain has to complete before FailureAction is executed. It is - first interpreted as a string representing an ISO 8601 duration. If that - fails, then it is interpreted as a number representing the total number of - milliseconds. - :type upgrade_domain_timeout_in_milliseconds: str - :param instance_close_delay_duration_in_seconds: Duration in seconds, to - wait before a stateless instance is closed, to allow the active requests - to drain gracefully. This would be effective when the instance is closing - during the application/cluster - upgrade, only for those instances which have a non-zero delay duration - configured in the service description. See - InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is - 4294967295, which indicates that the behavior will entirely depend on the - delay configured in the stateless service description. - :type instance_close_delay_duration_in_seconds: long - """ - - _validation = { - 'rolling_upgrade_mode': {'required': True}, - } - - _attribute_map = { - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'replica_set_check_timeout_in_milliseconds': {'key': 'ReplicaSetCheckTimeoutInMilliseconds', 'type': 'long'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, - 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, - 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - } - - def __init__(self, *, rolling_upgrade_mode="UnmonitoredAuto", force_restart: bool=None, replica_set_check_timeout_in_milliseconds: int=None, failure_action=None, health_check_wait_duration_in_milliseconds: str=None, health_check_stable_duration_in_milliseconds: str=None, health_check_retry_timeout_in_milliseconds: str=None, upgrade_timeout_in_milliseconds: str=None, upgrade_domain_timeout_in_milliseconds: str=None, instance_close_delay_duration_in_seconds: int=None, **kwargs) -> None: - super(RollingUpgradeUpdateDescription, self).__init__(**kwargs) - self.rolling_upgrade_mode = rolling_upgrade_mode - self.force_restart = force_restart - self.replica_set_check_timeout_in_milliseconds = replica_set_check_timeout_in_milliseconds - self.failure_action = failure_action - self.health_check_wait_duration_in_milliseconds = health_check_wait_duration_in_milliseconds - self.health_check_stable_duration_in_milliseconds = health_check_stable_duration_in_milliseconds - self.health_check_retry_timeout_in_milliseconds = health_check_retry_timeout_in_milliseconds - self.upgrade_timeout_in_milliseconds = upgrade_timeout_in_milliseconds - self.upgrade_domain_timeout_in_milliseconds = upgrade_domain_timeout_in_milliseconds - self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds - - -class RunToCompletionExecutionPolicy(ExecutionPolicy): - """The run to completion execution policy, the service will perform its - desired operation and complete successfully. If the service encounters - failure, it will restarted based on restart policy specified. If the - service completes its operation successfully, it will not be restarted - again. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param restart: Required. Enumerates the restart policy for - RunToCompletionExecutionPolicy. Possible values include: 'OnFailure', - 'Never' - :type restart: str or ~azure.servicefabric.models.RestartPolicy - """ - - _validation = { - 'type': {'required': True}, - 'restart': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'restart': {'key': 'restart', 'type': 'str'}, - } - - def __init__(self, *, restart, **kwargs) -> None: - super(RunToCompletionExecutionPolicy, self).__init__(**kwargs) - self.restart = restart - self.type = 'RunToCompletion' - - -class SafetyCheckWrapper(Model): - """A wrapper for the safety check object. Safety checks are performed by - service fabric before continuing with the operations. These checks ensure - the availability of the service and the reliability of the state. - - :param safety_check: Represents a safety check performed by service fabric - before continuing with the operations. These checks ensure the - availability of the service and the reliability of the state. - :type safety_check: ~azure.servicefabric.models.SafetyCheck - """ - - _attribute_map = { - 'safety_check': {'key': 'SafetyCheck', 'type': 'SafetyCheck'}, - } - - def __init__(self, *, safety_check=None, **kwargs) -> None: - super(SafetyCheckWrapper, self).__init__(**kwargs) - self.safety_check = safety_check - - -class ScalingPolicyDescription(Model): - """Describes how the scaling should be performed. - - All required parameters must be populated in order to send to Azure. - - :param scaling_trigger: Required. Specifies the trigger associated with - this scaling policy - :type scaling_trigger: - ~azure.servicefabric.models.ScalingTriggerDescription - :param scaling_mechanism: Required. Specifies the mechanism associated - with this scaling policy - :type scaling_mechanism: - ~azure.servicefabric.models.ScalingMechanismDescription - """ - - _validation = { - 'scaling_trigger': {'required': True}, - 'scaling_mechanism': {'required': True}, - } - - _attribute_map = { - 'scaling_trigger': {'key': 'ScalingTrigger', 'type': 'ScalingTriggerDescription'}, - 'scaling_mechanism': {'key': 'ScalingMechanism', 'type': 'ScalingMechanismDescription'}, - } - - def __init__(self, *, scaling_trigger, scaling_mechanism, **kwargs) -> None: - super(ScalingPolicyDescription, self).__init__(**kwargs) - self.scaling_trigger = scaling_trigger - self.scaling_mechanism = scaling_mechanism - - -class SecondaryReplicatorStatus(ReplicatorStatus): - """Provides statistics about the Service Fabric Replicator, when it is - functioning in a ActiveSecondary role. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SecondaryActiveReplicatorStatus, - SecondaryIdleReplicatorStatus - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param replication_queue_status: Details about the replication queue on - the secondary replicator. - :type replication_queue_status: - ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_replication_operation_received_time_utc: The last time-stamp - (UTC) at which a replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation - message was never received. - :type last_replication_operation_received_time_utc: datetime - :param is_in_build: Value that indicates whether the replica is currently - being built. - :type is_in_build: bool - :param copy_queue_status: Details about the copy queue on the secondary - replicator. - :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at - which a copy operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation - message was never received. - :type last_copy_operation_received_time_utc: datetime - :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at - which an acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment - message was never sent. - :type last_acknowledgement_sent_time_utc: datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - _subtype_map = { - 'kind': {'ActiveSecondary': 'SecondaryActiveReplicatorStatus', 'IdleSecondary': 'SecondaryIdleReplicatorStatus'} - } - - def __init__(self, *, replication_queue_status=None, last_replication_operation_received_time_utc=None, is_in_build: bool=None, copy_queue_status=None, last_copy_operation_received_time_utc=None, last_acknowledgement_sent_time_utc=None, **kwargs) -> None: - super(SecondaryReplicatorStatus, self).__init__(**kwargs) - self.replication_queue_status = replication_queue_status - self.last_replication_operation_received_time_utc = last_replication_operation_received_time_utc - self.is_in_build = is_in_build - self.copy_queue_status = copy_queue_status - self.last_copy_operation_received_time_utc = last_copy_operation_received_time_utc - self.last_acknowledgement_sent_time_utc = last_acknowledgement_sent_time_utc - self.kind = 'SecondaryReplicatorStatus' - - -class SecondaryActiveReplicatorStatus(SecondaryReplicatorStatus): - """Status of the secondary replicator when it is in active mode and is part of - the replica set. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param replication_queue_status: Details about the replication queue on - the secondary replicator. - :type replication_queue_status: - ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_replication_operation_received_time_utc: The last time-stamp - (UTC) at which a replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation - message was never received. - :type last_replication_operation_received_time_utc: datetime - :param is_in_build: Value that indicates whether the replica is currently - being built. - :type is_in_build: bool - :param copy_queue_status: Details about the copy queue on the secondary - replicator. - :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at - which a copy operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation - message was never received. - :type last_copy_operation_received_time_utc: datetime - :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at - which an acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment - message was never sent. - :type last_acknowledgement_sent_time_utc: datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, *, replication_queue_status=None, last_replication_operation_received_time_utc=None, is_in_build: bool=None, copy_queue_status=None, last_copy_operation_received_time_utc=None, last_acknowledgement_sent_time_utc=None, **kwargs) -> None: - super(SecondaryActiveReplicatorStatus, self).__init__(replication_queue_status=replication_queue_status, last_replication_operation_received_time_utc=last_replication_operation_received_time_utc, is_in_build=is_in_build, copy_queue_status=copy_queue_status, last_copy_operation_received_time_utc=last_copy_operation_received_time_utc, last_acknowledgement_sent_time_utc=last_acknowledgement_sent_time_utc, **kwargs) - self.kind = 'ActiveSecondary' - - -class SecondaryIdleReplicatorStatus(SecondaryReplicatorStatus): - """Status of the secondary replicator when it is in idle mode and is being - built by the primary. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param replication_queue_status: Details about the replication queue on - the secondary replicator. - :type replication_queue_status: - ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_replication_operation_received_time_utc: The last time-stamp - (UTC) at which a replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation - message was never received. - :type last_replication_operation_received_time_utc: datetime - :param is_in_build: Value that indicates whether the replica is currently - being built. - :type is_in_build: bool - :param copy_queue_status: Details about the copy queue on the secondary - replicator. - :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at - which a copy operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation - message was never received. - :type last_copy_operation_received_time_utc: datetime - :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at - which an acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment - message was never sent. - :type last_acknowledgement_sent_time_utc: datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, *, replication_queue_status=None, last_replication_operation_received_time_utc=None, is_in_build: bool=None, copy_queue_status=None, last_copy_operation_received_time_utc=None, last_acknowledgement_sent_time_utc=None, **kwargs) -> None: - super(SecondaryIdleReplicatorStatus, self).__init__(replication_queue_status=replication_queue_status, last_replication_operation_received_time_utc=last_replication_operation_received_time_utc, is_in_build=is_in_build, copy_queue_status=copy_queue_status, last_copy_operation_received_time_utc=last_copy_operation_received_time_utc, last_acknowledgement_sent_time_utc=last_acknowledgement_sent_time_utc, **kwargs) - self.kind = 'IdleSecondary' - - -class SecretResourceDescription(Model): - """This type describes a secret resource. - - All required parameters must be populated in order to send to Azure. - - :param properties: Required. Describes the properties of a secret - resource. - :type properties: ~azure.servicefabric.models.SecretResourceProperties - :param name: Required. Name of the Secret resource. - :type name: str - """ - - _validation = { - 'properties': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'SecretResourceProperties'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, properties, name: str, **kwargs) -> None: - super(SecretResourceDescription, self).__init__(**kwargs) - self.properties = properties - self.name = name - - -class SecretValue(Model): - """This type represents the unencrypted value of the secret. - - :param value: The actual value of the secret. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, **kwargs) -> None: - super(SecretValue, self).__init__(**kwargs) - self.value = value - - -class SecretValueProperties(Model): - """This type describes properties of secret value resource. - - :param value: The actual value of the secret. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, **kwargs) -> None: - super(SecretValueProperties, self).__init__(**kwargs) - self.value = value - - -class SecretValueResourceDescription(Model): - """This type describes a value of a secret resource. The name of this resource - is the version identifier corresponding to this secret value. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Version identifier of the secret value. - :type name: str - :param value: The actual value of the secret. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str=None, **kwargs) -> None: - super(SecretValueResourceDescription, self).__init__(**kwargs) - self.name = name - self.value = value - - -class SeedNodeSafetyCheck(SafetyCheck): - """Represents a safety check for the seed nodes being performed by service - fabric before continuing with node level operations. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SeedNodeSafetyCheck, self).__init__(**kwargs) - self.kind = 'EnsureSeedNodeQuorum' - - -class SelectedPartition(Model): - """This class returns information about the partition that the user-induced - operation acted upon. - - :param service_name: The name of the service the partition belongs to. - :type service_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, service_name: str=None, partition_id: str=None, **kwargs) -> None: - super(SelectedPartition, self).__init__(**kwargs) - self.service_name = service_name - self.partition_id = partition_id - - -class ServiceBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information for a specific Service Fabric service - specifying what backup policy is being applied and suspend description, if - any. - - All required parameters must be populated in order to send to Azure. - - :param policy_name: The name of the backup policy which is applicable to - this Service Fabric application or service or partition. - :type policy_name: str - :param policy_inherited_from: Specifies the scope at which the backup - policy is applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type policy_inherited_from: str or - ~azure.servicefabric.models.BackupPolicyScope - :param suspension_info: Describes the backup suspension details. - :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :param kind: Required. Constant filled by server. - :type kind: str - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, service_name: str=None, **kwargs) -> None: - super(ServiceBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) - self.service_name = service_name - self.kind = 'Service' - - -class ServiceBackupEntity(BackupEntity): - """Identifies the Service Fabric stateful service which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :param entity_kind: Required. Constant filled by server. - :type entity_kind: str - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__(self, *, service_name: str=None, **kwargs) -> None: - super(ServiceBackupEntity, self).__init__(**kwargs) - self.service_name = service_name - self.entity_kind = 'Service' - - -class ServiceCorrelationDescription(Model): - """Creates a particular correlation between services. - - All required parameters must be populated in order to send to Azure. - - :param scheme: Required. The ServiceCorrelationScheme which describes the - relationship between this service and the service specified via - ServiceName. Possible values include: 'Invalid', 'Affinity', - 'AlignedAffinity', 'NonAlignedAffinity' - :type scheme: str or ~azure.servicefabric.models.ServiceCorrelationScheme - :param service_name: Required. The name of the service that the - correlation relationship is established with. - :type service_name: str - """ - - _validation = { - 'scheme': {'required': True}, - 'service_name': {'required': True}, - } - - _attribute_map = { - 'scheme': {'key': 'Scheme', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__(self, *, scheme, service_name: str, **kwargs) -> None: - super(ServiceCorrelationDescription, self).__init__(**kwargs) - self.scheme = scheme - self.service_name = service_name - - -class ServiceEvent(FabricEvent): - """Represents the base for all Service Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServiceCreatedEvent, ServiceDeletedEvent, - ServiceNewHealthReportEvent, ServiceHealthReportExpiredEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ServiceCreated': 'ServiceCreatedEvent', 'ServiceDeleted': 'ServiceDeletedEvent', 'ServiceNewHealthReport': 'ServiceNewHealthReportEvent', 'ServiceHealthReportExpired': 'ServiceHealthReportExpiredEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ServiceEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.service_id = service_id - self.kind = 'ServiceEvent' - - -class ServiceCreatedEvent(ServiceEvent): - """Service Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param service_type_name: Required. Service type name. - :type service_type_name: str - :param application_name: Required. Application name. - :type application_name: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param service_instance: Required. Id of Service instance. - :type service_instance: long - :param is_stateful: Required. Indicates if Service is stateful. - :type is_stateful: bool - :param partition_count: Required. Number of partitions. - :type partition_count: int - :param target_replica_set_size: Required. Size of target replicas set. - :type target_replica_set_size: int - :param min_replica_set_size: Required. Minimum size of replicas set. - :type min_replica_set_size: int - :param service_package_version: Required. Version of Service package. - :type service_package_version: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'service_type_name': {'required': True}, - 'application_name': {'required': True}, - 'application_type_name': {'required': True}, - 'service_instance': {'required': True}, - 'is_stateful': {'required': True}, - 'partition_count': {'required': True}, - 'target_replica_set_size': {'required': True}, - 'min_replica_set_size': {'required': True}, - 'service_package_version': {'required': True}, - 'partition_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, service_type_name: str, application_name: str, application_type_name: str, service_instance: int, is_stateful: bool, partition_count: int, target_replica_set_size: int, min_replica_set_size: int, service_package_version: str, partition_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ServiceCreatedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) - self.service_type_name = service_type_name - self.application_name = application_name - self.application_type_name = application_type_name - self.service_instance = service_instance - self.is_stateful = is_stateful - self.partition_count = partition_count - self.target_replica_set_size = target_replica_set_size - self.min_replica_set_size = min_replica_set_size - self.service_package_version = service_package_version - self.partition_id = partition_id - self.kind = 'ServiceCreated' - - -class ServiceDeletedEvent(ServiceEvent): - """Service Deleted event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param service_type_name: Required. Service type name. - :type service_type_name: str - :param application_name: Required. Application name. - :type application_name: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param service_instance: Required. Id of Service instance. - :type service_instance: long - :param is_stateful: Required. Indicates if Service is stateful. - :type is_stateful: bool - :param partition_count: Required. Number of partitions. - :type partition_count: int - :param target_replica_set_size: Required. Size of target replicas set. - :type target_replica_set_size: int - :param min_replica_set_size: Required. Minimum size of replicas set. - :type min_replica_set_size: int - :param service_package_version: Required. Version of Service package. - :type service_package_version: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'service_type_name': {'required': True}, - 'application_name': {'required': True}, - 'application_type_name': {'required': True}, - 'service_instance': {'required': True}, - 'is_stateful': {'required': True}, - 'partition_count': {'required': True}, - 'target_replica_set_size': {'required': True}, - 'min_replica_set_size': {'required': True}, - 'service_package_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, service_type_name: str, application_name: str, application_type_name: str, service_instance: int, is_stateful: bool, partition_count: int, target_replica_set_size: int, min_replica_set_size: int, service_package_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ServiceDeletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) - self.service_type_name = service_type_name - self.application_name = application_name - self.application_type_name = application_type_name - self.service_instance = service_instance - self.is_stateful = is_stateful - self.partition_count = partition_count - self.target_replica_set_size = target_replica_set_size - self.min_replica_set_size = min_replica_set_size - self.service_package_version = service_package_version - self.kind = 'ServiceDeleted' - - -class ServiceDescription(Model): - """A ServiceDescription contains all of the information necessary to create a - service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceDescription, StatelessServiceDescription - - All required parameters must be populated in order to send to Azure. - - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_name: Required. The full name of the service with 'fabric:' - URI scheme. - :type service_name: str - :param service_type_name: Required. Name of the service type as specified - in the service manifest. - :type service_type_name: str - :param initialization_data: The initialization data as an array of bytes. - Initialization data is passed to service instances or replicas when they - are created. - :type initialization_data: list[int] - :param partition_description: Required. The partition description as an - object. - :type partition_description: - ~azure.servicefabric.models.PartitionSchemeDescription - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics. - :type service_load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param is_default_move_cost_specified: Indicates if the DefaultMoveCost - property is specified. - :type is_default_move_cost_specified: bool - :param service_package_activation_mode: The activation mode of service - package to be used for a service. Possible values include: - 'SharedProcess', 'ExclusiveProcess' - :type service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS - system service to be enabled in Service Fabric cluster. - :type service_dns_name: str - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param tags_required_to_place: Tags for placement of this service. - :type tags_required_to_place: - ~azure.servicefabric.models.NodeTagsDescription - :param tags_required_to_run: Tags for running of this service. - :type tags_required_to_run: - ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceDescription', 'Stateless': 'StatelessServiceDescription'} - } - - def __init__(self, *, service_name: str, service_type_name: str, partition_description, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, **kwargs) -> None: - super(ServiceDescription, self).__init__(**kwargs) - self.application_name = application_name - self.service_name = service_name - self.service_type_name = service_type_name - self.initialization_data = initialization_data - self.partition_description = partition_description - self.placement_constraints = placement_constraints - self.correlation_scheme = correlation_scheme - self.service_load_metrics = service_load_metrics - self.service_placement_policies = service_placement_policies - self.default_move_cost = default_move_cost - self.is_default_move_cost_specified = is_default_move_cost_specified - self.service_package_activation_mode = service_package_activation_mode - self.service_dns_name = service_dns_name - self.scaling_policies = scaling_policies - self.tags_required_to_place = tags_required_to_place - self.tags_required_to_run = tags_required_to_run - self.service_kind = None - - -class ServiceFromTemplateDescription(Model): - """Defines description for creating a Service Fabric service from a template - defined in the application manifest. - - All required parameters must be populated in order to send to Azure. - - :param application_name: Required. The name of the application, including - the 'fabric:' URI scheme. - :type application_name: str - :param service_name: Required. The full name of the service with 'fabric:' - URI scheme. - :type service_name: str - :param service_type_name: Required. Name of the service type as specified - in the service manifest. - :type service_type_name: str - :param initialization_data: The initialization data for the newly created - service instance. - :type initialization_data: list[int] - :param service_package_activation_mode: The activation mode of service - package to be used for a service. Possible values include: - 'SharedProcess', 'ExclusiveProcess' - :type service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS - system service to be enabled in Service Fabric cluster. - :type service_dns_name: str - """ - - _validation = { - 'application_name': {'required': True}, - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - } - - def __init__(self, *, application_name: str, service_name: str, service_type_name: str, initialization_data=None, service_package_activation_mode=None, service_dns_name: str=None, **kwargs) -> None: - super(ServiceFromTemplateDescription, self).__init__(**kwargs) - self.application_name = application_name - self.service_name = service_name - self.service_type_name = service_type_name - self.initialization_data = initialization_data - self.service_package_activation_mode = service_package_activation_mode - self.service_dns_name = service_dns_name - - -class ServiceHealth(EntityHealth): - """Information about the health of a Service Fabric service. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param name: The name of the service whose health information is described - by this object. - :type name: str - :param partition_health_states: The list of partition health states - associated with the service. - :type partition_health_states: - list[~azure.servicefabric.models.PartitionHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'partition_health_states': {'key': 'PartitionHealthStates', 'type': '[PartitionHealthState]'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, partition_health_states=None, **kwargs) -> None: - super(ServiceHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.name = name - self.partition_health_states = partition_health_states - - -class ServiceHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a service, containing information about - the data and the algorithm used by health store to evaluate health. The - evaluation is returned only when the aggregated health state is either - Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param service_name: Name of the service whose health evaluation is - described by this object. - :type service_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the service. The types of the - unhealthy evaluations can be PartitionsHealthEvaluation or - EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, service_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ServiceHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.service_name = service_name - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Service' - - -class ServiceHealthReportExpiredEvent(ServiceEvent): - """Service Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param instance_id: Required. Id of Service instance. - :type instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ServiceHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) - self.instance_id = instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ServiceHealthReportExpired' - - -class ServiceHealthState(EntityHealthState): - """Represents the health state of a service, which contains the service - identifier and its aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param service_name: Name of the service whose health state is represented - by this object. - :type service_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, service_name: str=None, **kwargs) -> None: - super(ServiceHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.service_name = service_name - - -class ServiceHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a service, which contains the service - name, its aggregated health state and any partitions that respect the - filters in the cluster health chunk query description. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_name: The name of the service whose health state chunk is - provided in this object. - :type service_name: str - :param partition_health_state_chunks: The list of partition health state - chunks belonging to the service that respect the filters in the cluster - health chunk query description. - :type partition_health_state_chunks: - ~azure.servicefabric.models.PartitionHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_health_state_chunks': {'key': 'PartitionHealthStateChunks', 'type': 'PartitionHealthStateChunkList'}, - } - - def __init__(self, *, health_state=None, service_name: str=None, partition_health_state_chunks=None, **kwargs) -> None: - super(ServiceHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.service_name = service_name - self.partition_health_state_chunks = partition_health_state_chunks - - -class ServiceHealthStateChunkList(Model): - """The list of service health state chunks that respect the input filters in - the chunk query. Returned by get cluster health state chunks query. - - :param items: The list of service health state chunks that respect the - input filters in the chunk query. - :type items: list[~azure.servicefabric.models.ServiceHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[ServiceHealthStateChunk]'}, - } - - def __init__(self, *, items=None, **kwargs) -> None: - super(ServiceHealthStateChunkList, self).__init__(**kwargs) - self.items = items - - -class ServiceHealthStateFilter(Model): - """Defines matching criteria to determine whether a service should be included - as a child of an application in the cluster health chunk. - The services are only returned if the parent application matches a filter - specified in the cluster health chunk query description. - One filter can match zero, one or multiple services, depending on its - properties. - - :param service_name_filter: The name of the service that matches the - filter. The filter is applied only to the specified service, if it exists. - If the service doesn't exist, no service is returned in the cluster health - chunk based on this filter. - If the service exists, it is included as the application's child if the - health state matches the other filter properties. - If not specified, all services that match the parent filters (if any) are - taken into consideration and matched against the other filter members, - like health state filter. - :type service_name_filter: str - :param health_state_filter: The filter for the health state of the - services. It allows selecting services if they match the desired health - states. - The possible values are integer value of one of the following health - states. Only services that match the filter are returned. All services are - used to evaluate the cluster aggregated health state. - If not specified, default value is None, unless the service name is - specified. If the filter has default value and service name is specified, - the matching service is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches services with - HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - :param partition_filters: Defines a list of filters that specify which - partitions to be included in the returned cluster health chunk as children - of the service. The partitions are returned only if the parent service - matches a filter. - If the list is empty, no partitions are returned. All the partitions are - used to evaluate the parent service aggregated health state, regardless of - the input filters. - The service filter may specify multiple partition filters. - For example, it can specify a filter to return all partitions with health - state Error and another filter to always include a partition identified by - its partition ID. - :type partition_filters: - list[~azure.servicefabric.models.PartitionHealthStateFilter] - """ - - _attribute_map = { - 'service_name_filter': {'key': 'ServiceNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'partition_filters': {'key': 'PartitionFilters', 'type': '[PartitionHealthStateFilter]'}, - } - - def __init__(self, *, service_name_filter: str=None, health_state_filter: int=0, partition_filters=None, **kwargs) -> None: - super(ServiceHealthStateFilter, self).__init__(**kwargs) - self.service_name_filter = service_name_filter - self.health_state_filter = health_state_filter - self.partition_filters = partition_filters - - -class ServiceIdentity(Model): - """Map service identity friendly name to an application identity. - - :param name: The identity friendly name. - :type name: str - :param identity_ref: The application identity name. - :type identity_ref: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'identity_ref': {'key': 'identityRef', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, identity_ref: str=None, **kwargs) -> None: - super(ServiceIdentity, self).__init__(**kwargs) - self.name = name - self.identity_ref = identity_ref - - -class ServiceInfo(Model): - """Information about a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceInfo, StatelessServiceInfo - - All required parameters must be populated in order to send to Azure. - - :param id: The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to - identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type id: str - :param name: The full name of the service with 'fabric:' URI scheme. - :type name: str - :param type_name: Name of the service type as specified in the service - manifest. - :type type_name: str - :param manifest_version: The version of the service manifest. - :type manifest_version: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_status: The status of the application. Possible values - include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', - 'Failed' - :type service_status: str or ~azure.servicefabric.models.ServiceStatus - :param is_service_group: Whether the service is in a service group. - :type is_service_group: bool - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceInfo', 'Stateless': 'StatelessServiceInfo'} - } - - def __init__(self, *, id: str=None, name: str=None, type_name: str=None, manifest_version: str=None, health_state=None, service_status=None, is_service_group: bool=None, **kwargs) -> None: - super(ServiceInfo, self).__init__(**kwargs) - self.id = id - self.name = name - self.type_name = type_name - self.manifest_version = manifest_version - self.health_state = health_state - self.service_status = service_status - self.is_service_group = is_service_group - self.service_kind = None - - -class ServiceLoadMetricDescription(Model): - """Specifies a metric to load balance a service during runtime. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the metric. If the service chooses to - report load during runtime, the load metric name should match the name - that is specified in Name exactly. Note that metric names are - case-sensitive. - :type name: str - :param weight: The service load metric relative weight, compared to other - metrics configured for this service, as a number. Possible values include: - 'Zero', 'Low', 'Medium', 'High' - :type weight: str or ~azure.servicefabric.models.ServiceLoadMetricWeight - :param primary_default_load: Used only for Stateful services. The default - amount of load, as a number, that this service creates for this metric - when it is a Primary replica. - :type primary_default_load: int - :param secondary_default_load: Used only for Stateful services. The - default amount of load, as a number, that this service creates for this - metric when it is a Secondary replica. - :type secondary_default_load: int - :param default_load: Used only for Stateless services. The default amount - of load, as a number, that this service creates for this metric. - :type default_load: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'weight': {'key': 'Weight', 'type': 'str'}, - 'primary_default_load': {'key': 'PrimaryDefaultLoad', 'type': 'int'}, - 'secondary_default_load': {'key': 'SecondaryDefaultLoad', 'type': 'int'}, - 'default_load': {'key': 'DefaultLoad', 'type': 'int'}, - } - - def __init__(self, *, name: str, weight=None, primary_default_load: int=None, secondary_default_load: int=None, default_load: int=None, **kwargs) -> None: - super(ServiceLoadMetricDescription, self).__init__(**kwargs) - self.name = name - self.weight = weight - self.primary_default_load = primary_default_load - self.secondary_default_load = secondary_default_load - self.default_load = default_load - - -class ServiceNameInfo(Model): - """Information about the service name. - - :param id: The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to - identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type id: str - :param name: The full name of the service with 'fabric:' URI scheme. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: - super(ServiceNameInfo, self).__init__(**kwargs) - self.id = id - self.name = name - - -class ServiceNewHealthReportEvent(ServiceEvent): - """Service Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param instance_id: Required. Id of Service instance. - :type instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ServiceNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) - self.instance_id = instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ServiceNewHealthReport' - - -class ServicePartitionInfo(Model): - """Information about a partition of a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServicePartitionInfo, - StatelessServicePartitionInfo - - All required parameters must be populated in order to send to Azure. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param partition_status: The status of the service fabric service - partition. Possible values include: 'Invalid', 'Ready', 'NotReady', - 'InQuorumLoss', 'Reconfiguring', 'Deleting' - :type partition_status: str or - ~azure.servicefabric.models.ServicePartitionStatus - :param partition_information: Information about the partition identity, - partitioning scheme and keys supported by it. - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServicePartitionInfo', 'Stateless': 'StatelessServicePartitionInfo'} - } - - def __init__(self, *, health_state=None, partition_status=None, partition_information=None, **kwargs) -> None: - super(ServicePartitionInfo, self).__init__(**kwargs) - self.health_state = health_state - self.partition_status = partition_status - self.partition_information = partition_information - self.service_kind = None - - -class ServicePlacementPolicyDescription(Model): - """Describes the policy to be used for placement of a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServicePlacementInvalidDomainPolicyDescription, - ServicePlacementNonPartiallyPlaceServicePolicyDescription, - ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, - ServicePlacementPreferPrimaryDomainPolicyDescription, - ServicePlacementRequiredDomainPolicyDescription, - ServicePlacementRequireDomainDistributionPolicyDescription - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'AllowMultipleStatelessInstancesOnNode': 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} - } - - def __init__(self, **kwargs) -> None: - super(ServicePlacementPolicyDescription, self).__init__(**kwargs) - self.type = None - - -class ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - allowing multiple stateless instances of a partition of the service to be - placed on a node. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: Holdover from other policy descriptions, not used for - this policy, values are ignored by runtime. Keeping it for any - backwards-compatibility with clients. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, *, domain_name: str=None, **kwargs) -> None: - super(ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, self).__init__(**kwargs) - self.domain_name = domain_name - self.type = 'AllowMultipleStatelessInstancesOnNode' - - -class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where a particular fault or upgrade domain should not be used for placement - of the instances or replicas of that service. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: The name of the domain that should not be used for - placement. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, *, domain_name: str=None, **kwargs) -> None: - super(ServicePlacementInvalidDomainPolicyDescription, self).__init__(**kwargs) - self.domain_name = domain_name - self.type = 'InvalidDomain' - - -class ServicePlacementNonPartiallyPlaceServicePolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where all replicas must be able to be placed in order for any replicas to - be created. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ServicePlacementNonPartiallyPlaceServicePolicyDescription, self).__init__(**kwargs) - self.type = 'NonPartiallyPlaceService' - - -class ServicePlacementPreferPrimaryDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where the service's Primary replicas should optimally be placed in a - particular domain. - This placement policy is usually used with fault domains in scenarios where - the Service Fabric cluster is geographically distributed in order to - indicate that a service's primary replica should be located in a particular - fault domain, which in geo-distributed scenarios usually aligns with - regional or datacenter boundaries. Note that since this is an optimization - it is possible that the Primary replica may not end up located in this - domain due to failures, capacity limits, or other constraints. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: The name of the domain that should used for placement - as per this policy. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, *, domain_name: str=None, **kwargs) -> None: - super(ServicePlacementPreferPrimaryDomainPolicyDescription, self).__init__(**kwargs) - self.domain_name = domain_name - self.type = 'PreferPrimaryDomain' - - -class ServicePlacementRequiredDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where the instances or replicas of that service must be placed in a - particular domain. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: The name of the domain that should used for placement - as per this policy. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, *, domain_name: str=None, **kwargs) -> None: - super(ServicePlacementRequiredDomainPolicyDescription, self).__init__(**kwargs) - self.domain_name = domain_name - self.type = 'RequireDomain' - - -class ServicePlacementRequireDomainDistributionPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where two replicas from the same partition should never be placed in the - same fault or upgrade domain. - While this is not common it can expose the service to an increased risk of - concurrent failures due to unplanned outages or other cases of - subsequent/concurrent failures. As an example, consider a case where - replicas are deployed across different data center, with one replica per - location. In the event that one of the datacenters goes offline, normally - the replica that was placed in that datacenter will be packed into one of - the remaining datacenters. If this is not desirable then this policy should - be set. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: The name of the domain that should used for placement - as per this policy. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, *, domain_name: str=None, **kwargs) -> None: - super(ServicePlacementRequireDomainDistributionPolicyDescription, self).__init__(**kwargs) - self.domain_name = domain_name - self.type = 'RequireDomainDistribution' - - -class ServiceProperties(Model): - """Describes properties of a service resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param description: User readable description of the service. - :type description: str - :param replica_count: The number of replicas of the service to create. - Defaults to 1 if not specified. - :type replica_count: int - :param execution_policy: The execution policy of the service - :type execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :param auto_scaling_policies: Auto scaling policies - :type auto_scaling_policies: - list[~azure.servicefabric.models.AutoScalingPolicy] - :ivar status: Status of the service. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the service. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the service's health state is not 'Ok', - this additional details from service fabric Health Manager for the user to - know why the service is marked unhealthy. - :vartype unhealthy_evaluation: str - :param identity_refs: The service identity list. - :type identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :param dns_name: Dns name of the service. - :type dns_name: str - """ - - _validation = { - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'replica_count': {'key': 'replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'health_state': {'key': 'healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, replica_count: int=None, execution_policy=None, auto_scaling_policies=None, identity_refs=None, dns_name: str=None, **kwargs) -> None: - super(ServiceProperties, self).__init__(**kwargs) - self.description = description - self.replica_count = replica_count - self.execution_policy = execution_policy - self.auto_scaling_policies = auto_scaling_policies - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity_refs = identity_refs - self.dns_name = dns_name - - -class ServiceReplicaProperties(Model): - """Describes the properties of a service replica. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. The operation system required by the code in - service. Possible values include: 'Linux', 'Windows' - :type os_type: str or ~azure.servicefabric.models.OperatingSystemType - :param code_packages: Required. Describes the set of code packages that - forms the service. A code package describes the container and the - properties for running it. All the code packages are started together on - the same host and share the same context (network, process etc.). - :type code_packages: - list[~azure.servicefabric.models.ContainerCodePackageProperties] - :param network_refs: The names of the private networks that this service - needs to be part of. - :type network_refs: list[~azure.servicefabric.models.NetworkRef] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef - """ - - _validation = { - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'str'}, - 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - } - - def __init__(self, *, os_type, code_packages, network_refs=None, diagnostics=None, **kwargs) -> None: - super(ServiceReplicaProperties, self).__init__(**kwargs) - self.os_type = os_type - self.code_packages = code_packages - self.network_refs = network_refs - self.diagnostics = diagnostics - - -class ServiceReplicaDescription(ServiceReplicaProperties): - """Describes a replica of a service resource. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. The operation system required by the code in - service. Possible values include: 'Linux', 'Windows' - :type os_type: str or ~azure.servicefabric.models.OperatingSystemType - :param code_packages: Required. Describes the set of code packages that - forms the service. A code package describes the container and the - properties for running it. All the code packages are started together on - the same host and share the same context (network, process etc.). - :type code_packages: - list[~azure.servicefabric.models.ContainerCodePackageProperties] - :param network_refs: The names of the private networks that this service - needs to be part of. - :type network_refs: list[~azure.servicefabric.models.NetworkRef] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :param replica_name: Required. Name of the replica. - :type replica_name: str - """ - - _validation = { - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - 'replica_name': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'str'}, - 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - 'replica_name': {'key': 'replicaName', 'type': 'str'}, - } - - def __init__(self, *, os_type, code_packages, replica_name: str, network_refs=None, diagnostics=None, **kwargs) -> None: - super(ServiceReplicaDescription, self).__init__(os_type=os_type, code_packages=code_packages, network_refs=network_refs, diagnostics=diagnostics, **kwargs) - self.replica_name = replica_name - - -class ServiceResourceDescription(Model): - """This type describes a service resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Service resource. - :type name: str - :param os_type: Required. The operation system required by the code in - service. Possible values include: 'Linux', 'Windows' - :type os_type: str or ~azure.servicefabric.models.OperatingSystemType - :param code_packages: Required. Describes the set of code packages that - forms the service. A code package describes the container and the - properties for running it. All the code packages are started together on - the same host and share the same context (network, process etc.). - :type code_packages: - list[~azure.servicefabric.models.ContainerCodePackageProperties] - :param network_refs: The names of the private networks that this service - needs to be part of. - :type network_refs: list[~azure.servicefabric.models.NetworkRef] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :param description: User readable description of the service. - :type description: str - :param replica_count: The number of replicas of the service to create. - Defaults to 1 if not specified. - :type replica_count: int - :param execution_policy: The execution policy of the service - :type execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :param auto_scaling_policies: Auto scaling policies - :type auto_scaling_policies: - list[~azure.servicefabric.models.AutoScalingPolicy] - :ivar status: Status of the service. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the service. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the service's health state is not 'Ok', - this additional details from service fabric Health Manager for the user to - know why the service is marked unhealthy. - :vartype unhealthy_evaluation: str - :param identity_refs: The service identity list. - :type identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :param dns_name: Dns name of the service. - :type dns_name: str - """ - - _validation = { - 'name': {'required': True}, - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'code_packages': {'key': 'properties.codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'properties.networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsRef'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'properties.executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'properties.autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'properties.identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, - } - - def __init__(self, *, name: str, os_type, code_packages, network_refs=None, diagnostics=None, description: str=None, replica_count: int=None, execution_policy=None, auto_scaling_policies=None, identity_refs=None, dns_name: str=None, **kwargs) -> None: - super(ServiceResourceDescription, self).__init__(**kwargs) - self.name = name - self.os_type = os_type - self.code_packages = code_packages - self.network_refs = network_refs - self.diagnostics = diagnostics - self.description = description - self.replica_count = replica_count - self.execution_policy = execution_policy - self.auto_scaling_policies = auto_scaling_policies - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity_refs = identity_refs - self.dns_name = dns_name - - -class ServicesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for services of a certain service type - belonging to an application, containing health evaluations for each - unhealthy service that impacted current aggregated health state. Can be - returned when evaluating application health and the aggregated health state - is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param service_type_name: Name of the service type of the services. - :type service_type_name: str - :param max_percent_unhealthy_services: Maximum allowed percentage of - unhealthy services from the ServiceTypeHealthPolicy. - :type max_percent_unhealthy_services: int - :param total_count: Total number of services of the current service type - in the application from the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - ServiceHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, service_type_name: str=None, max_percent_unhealthy_services: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ServicesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.service_type_name = service_type_name - self.max_percent_unhealthy_services = max_percent_unhealthy_services - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Services' - - -class ServiceTypeDescription(Model): - """Describes a service type defined in the service manifest of a provisioned - application type. The properties the ones defined in the service manifest. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceTypeDescription, - StatelessServiceTypeDescription - - All required parameters must be populated in order to send to Azure. - - :param is_stateful: Indicates whether the service type is a stateful - service type or a stateless service type. This property is true if the - service type is a stateful service type, false otherwise. - :type is_stateful: bool - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param placement_constraints: The placement constraint to be used when - instantiating this service in a Service Fabric cluster. - :type placement_constraints: str - :param load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: List of service placement policy - descriptions. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param extensions: List of service type extensions. - :type extensions: - list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Stateful': 'StatefulServiceTypeDescription', 'Stateless': 'StatelessServiceTypeDescription'} - } - - def __init__(self, *, is_stateful: bool=None, service_type_name: str=None, placement_constraints: str=None, load_metrics=None, service_placement_policies=None, extensions=None, **kwargs) -> None: - super(ServiceTypeDescription, self).__init__(**kwargs) - self.is_stateful = is_stateful - self.service_type_name = service_type_name - self.placement_constraints = placement_constraints - self.load_metrics = load_metrics - self.service_placement_policies = service_placement_policies - self.extensions = extensions - self.kind = None - - -class ServiceTypeExtensionDescription(Model): - """Describes extension of a service type defined in the service manifest. - - :param key: The name of the extension. - :type key: str - :param value: The extension value. - :type value: str - """ - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - } - - def __init__(self, *, key: str=None, value: str=None, **kwargs) -> None: - super(ServiceTypeExtensionDescription, self).__init__(**kwargs) - self.key = key - self.value = value - - -class ServiceTypeHealthPolicy(Model): - """Represents the health policy used to evaluate the health of services - belonging to a service type. - - :param max_percent_unhealthy_partitions_per_service: The maximum allowed - percentage of unhealthy partitions per service. Allowed values are Byte - values from zero to 100 - The percentage represents the maximum tolerated percentage of partitions - that can be unhealthy before the service is considered in error. - If the percentage is respected but there is at least one unhealthy - partition, the health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy - partitions over the total number of partitions in the service. - The computation rounds up to tolerate one failure on small numbers of - partitions. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_partitions_per_service: int - :param max_percent_unhealthy_replicas_per_partition: The maximum allowed - percentage of unhealthy replicas per partition. Allowed values are Byte - values from zero to 100. - The percentage represents the maximum tolerated percentage of replicas - that can be unhealthy before the partition is considered in error. - If the percentage is respected but there is at least one unhealthy - replica, the health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy replicas - over the total number of replicas in the partition. - The computation rounds up to tolerate one failure on small numbers of - replicas. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_replicas_per_partition: int - :param max_percent_unhealthy_services: The maximum allowed percentage of - unhealthy services. Allowed values are Byte values from zero to 100. - The percentage represents the maximum tolerated percentage of services - that can be unhealthy before the application is considered in error. - If the percentage is respected but there is at least one unhealthy - service, the health is evaluated as Warning. - This is calculated by dividing the number of unhealthy services of the - specific service type over the total number of services of the specific - service type. - The computation rounds up to tolerate one failure on small numbers of - services. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_services: int - """ - - _attribute_map = { - 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, - 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, - 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, - } - - def __init__(self, *, max_percent_unhealthy_partitions_per_service: int=0, max_percent_unhealthy_replicas_per_partition: int=0, max_percent_unhealthy_services: int=0, **kwargs) -> None: - super(ServiceTypeHealthPolicy, self).__init__(**kwargs) - self.max_percent_unhealthy_partitions_per_service = max_percent_unhealthy_partitions_per_service - self.max_percent_unhealthy_replicas_per_partition = max_percent_unhealthy_replicas_per_partition - self.max_percent_unhealthy_services = max_percent_unhealthy_services - - -class ServiceTypeHealthPolicyMapItem(Model): - """Defines an item in ServiceTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key of the service type health policy map item. - This is the name of the service type. - :type key: str - :param value: Required. The value of the service type health policy map - item. This is the ServiceTypeHealthPolicy for this service type. - :type value: ~azure.servicefabric.models.ServiceTypeHealthPolicy - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ServiceTypeHealthPolicy'}, - } - - def __init__(self, *, key: str, value, **kwargs) -> None: - super(ServiceTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = key - self.value = value - - -class ServiceTypeInfo(Model): - """Information about a service type that is defined in a service manifest of a - provisioned application type. - - :param service_type_description: Describes a service type defined in the - service manifest of a provisioned application type. The properties the - ones defined in the service manifest. - :type service_type_description: - ~azure.servicefabric.models.ServiceTypeDescription - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param service_manifest_version: The version of the service manifest in - which this service type is defined. - :type service_manifest_version: str - :param is_service_group: Indicates whether the service is a service group. - If it is, the property value is true otherwise false. - :type is_service_group: bool - """ - - _attribute_map = { - 'service_type_description': {'key': 'ServiceTypeDescription', 'type': 'ServiceTypeDescription'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - } - - def __init__(self, *, service_type_description=None, service_manifest_name: str=None, service_manifest_version: str=None, is_service_group: bool=None, **kwargs) -> None: - super(ServiceTypeInfo, self).__init__(**kwargs) - self.service_type_description = service_type_description - self.service_manifest_name = service_manifest_name - self.service_manifest_version = service_manifest_version - self.is_service_group = is_service_group - - -class ServiceTypeManifest(Model): - """Contains the manifest describing a service type registered as part of an - application in a Service Fabric cluster. - - :param manifest: The XML manifest as a string. - :type manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__(self, *, manifest: str=None, **kwargs) -> None: - super(ServiceTypeManifest, self).__init__(**kwargs) - self.manifest = manifest - - -class ServiceUpdateDescription(Model): - """A ServiceUpdateDescription contains all of the information necessary to - update a service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceUpdateDescription, - StatelessServiceUpdateDescription - - All required parameters must be populated in order to send to Azure. - - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 6 then the flags for - ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. - - None - Does not indicate any other properties are set. The value is - zero. - - TargetReplicaSetSize/InstanceCount - Indicates whether the - TargetReplicaSetSize property (for Stateful services) or the InstanceCount - property (for Stateless services) is set. The value is 1. - - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - property is set. The value is 2. - - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property - is set. The value is 4. - - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - property is set. The value is 8. - - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The - value is 16. - - PlacementConstraints - Indicates the PlacementConstraints property is - set. The value is 32. - - PlacementPolicyList - Indicates the ServicePlacementPolicies property is - set. The value is 64. - - Correlation - Indicates the CorrelationScheme property is set. The value - is 128. - - Metrics - Indicates the ServiceLoadMetrics property is set. The value is - 256. - - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The - value is 512. - - ScalingPolicy - Indicates the ScalingPolicies property is set. The value - is 1024. - - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit - property is set. The value is 2048. - - MinInstanceCount - Indicates the MinInstanceCount property is set. The - value is 4096. - - MinInstancePercentage - Indicates the MinInstancePercentage property is - set. The value is 8192. - - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 16384. - - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 32768. - - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property - is set. The value is 65536. - - ServiceDnsName - Indicates the ServiceDnsName property is set. The value - is 131072. - - TagsForPlacement - Indicates the TagsForPlacement property is set. The - value is 1048576. - - TagsForRunning - Indicates the TagsForRunning property is set. The value - is 2097152. - :type flags: str - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param load_metrics: The service load metrics. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param service_dns_name: The DNS name of the service. - :type service_dns_name: str - :param tags_for_placement: Tags for placement of this service. - :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :param tags_for_running: Tags for running of this service. - :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceUpdateDescription', 'Stateless': 'StatelessServiceUpdateDescription'} - } - - def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, **kwargs) -> None: - super(ServiceUpdateDescription, self).__init__(**kwargs) - self.flags = flags - self.placement_constraints = placement_constraints - self.correlation_scheme = correlation_scheme - self.load_metrics = load_metrics - self.service_placement_policies = service_placement_policies - self.default_move_cost = default_move_cost - self.scaling_policies = scaling_policies - self.service_dns_name = service_dns_name - self.tags_for_placement = tags_for_placement - self.tags_for_running = tags_for_running - self.service_kind = None - - -class ServiceUpgradeProgress(Model): - """Information about how many replicas are completed or pending for a specific - service during upgrade. - - :param service_name: Name of the Service resource. - :type service_name: str - :param completed_replica_count: The number of replicas that completes the - upgrade in the service. - :type completed_replica_count: str - :param pending_replica_count: The number of replicas that are waiting to - be upgraded in the service. - :type pending_replica_count: str - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'completed_replica_count': {'key': 'CompletedReplicaCount', 'type': 'str'}, - 'pending_replica_count': {'key': 'PendingReplicaCount', 'type': 'str'}, - } - - def __init__(self, *, service_name: str=None, completed_replica_count: str=None, pending_replica_count: str=None, **kwargs) -> None: - super(ServiceUpgradeProgress, self).__init__(**kwargs) - self.service_name = service_name - self.completed_replica_count = completed_replica_count - self.pending_replica_count = pending_replica_count - - -class Setting(Model): - """Describes a setting for the container. The setting file path can be fetched - from environment variable "Fabric_SettingPath". The path for Windows - container is "C:\\secrets". The path for Linux container is "/var/secrets". - - :param type: The type of the setting being given in value. Possible values - include: 'ClearText', 'KeyVaultReference', 'SecretValueReference'. Default - value: "ClearText" . - :type type: str or ~azure.servicefabric.models.SettingType - :param name: The name of the setting. - :type name: str - :param value: The value of the setting, will be processed based on the - type provided. - :type value: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, type="ClearText", name: str=None, value: str=None, **kwargs) -> None: - super(Setting, self).__init__(**kwargs) - self.type = type - self.name = name - self.value = value - - -class SingletonPartitionInformation(PartitionInformation): - """Information about a partition that is singleton. The services with - singleton partitioning scheme are effectively non-partitioned. They only - have one partition. - - All required parameters must be populated in order to send to Azure. - - :param id: An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. - The partition ID is unique and does not change for the lifetime of the - service. If the same service was deleted and recreated the IDs of its - partitions would be different. - :type id: str - :param service_partition_kind: Required. Constant filled by server. - :type service_partition_kind: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SingletonPartitionInformation, self).__init__(id=id, **kwargs) - self.service_partition_kind = 'Singleton' - - -class SingletonPartitionSchemeDescription(PartitionSchemeDescription): - """Describes the partition scheme of a singleton-partitioned, or - non-partitioned service. - - All required parameters must be populated in order to send to Azure. - - :param partition_scheme: Required. Constant filled by server. - :type partition_scheme: str - """ - - _validation = { - 'partition_scheme': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SingletonPartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = 'Singleton' - - -class StartClusterUpgradeDescription(Model): - """Describes the parameters for starting a cluster upgrade. - - :param code_version: The cluster code version. - :type code_version: str - :param config_version: The cluster configuration version. - :type config_version: str - :param upgrade_kind: The kind of upgrade out of the following possible - values. Possible values include: 'Invalid', 'Rolling'. Default value: - "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param sort_order: Defines the order in which an upgrade proceeds through - the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', - 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default - value: "Default" . - :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param enable_delta_health_evaluation: When true, enables delta health - evaluation rather than absolute health evaluation after completion of each - upgrade domain. - :type enable_delta_health_evaluation: bool - :param cluster_upgrade_health_policy: Defines a health policy used to - evaluate the health of the cluster during a cluster upgrade. - :type cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :param application_health_policy_map: Defines the application health - policy map used to evaluate the health of an application or one of its - children entities. - :type application_health_policy_map: - ~azure.servicefabric.models.ApplicationHealthPolicies - :param instance_close_delay_duration_in_seconds: Duration in seconds, to - wait before a stateless instance is closed, to allow the active requests - to drain gracefully. This would be effective when the instance is closing - during the application/cluster - upgrade, only for those instances which have a non-zero delay duration - configured in the service description. See - InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is - 4294967295, which indicates that the behavior will entirely depend on the - delay configured in the stateless service description. - :type instance_close_delay_duration_in_seconds: long - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - } - - def __init__(self, *, code_version: str=None, config_version: str=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", monitoring_policy=None, cluster_health_policy=None, enable_delta_health_evaluation: bool=None, cluster_upgrade_health_policy=None, application_health_policy_map=None, instance_close_delay_duration_in_seconds: int=None, **kwargs) -> None: - super(StartClusterUpgradeDescription, self).__init__(**kwargs) - self.code_version = code_version - self.config_version = config_version - self.upgrade_kind = upgrade_kind - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.force_restart = force_restart - self.sort_order = sort_order - self.monitoring_policy = monitoring_policy - self.cluster_health_policy = cluster_health_policy - self.enable_delta_health_evaluation = enable_delta_health_evaluation - self.cluster_upgrade_health_policy = cluster_upgrade_health_policy - self.application_health_policy_map = application_health_policy_map - self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds - - -class StartedChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos is started. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param chaos_parameters: Defines all the parameters to configure a Chaos - run. - :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, - } - - def __init__(self, *, time_stamp_utc, chaos_parameters=None, **kwargs) -> None: - super(StartedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.chaos_parameters = chaos_parameters - self.kind = 'Started' - - -class StatefulReplicaHealthReportExpiredEvent(ReplicaEvent): - """Stateful Replica Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param replica_instance_id: Required. Id of Replica instance. - :type replica_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'replica_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, replica_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(StatefulReplicaHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.replica_instance_id = replica_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'StatefulReplicaHealthReportExpired' - - -class StatefulReplicaNewHealthReportEvent(ReplicaEvent): - """Stateful Replica Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param replica_instance_id: Required. Id of Replica instance. - :type replica_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'replica_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, replica_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(StatefulReplicaNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.replica_instance_id = replica_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'StatefulReplicaNewHealthReport' - - -class StatefulServiceDescription(ServiceDescription): - """Describes a stateful service. - - All required parameters must be populated in order to send to Azure. - - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_name: Required. The full name of the service with 'fabric:' - URI scheme. - :type service_name: str - :param service_type_name: Required. Name of the service type as specified - in the service manifest. - :type service_type_name: str - :param initialization_data: The initialization data as an array of bytes. - Initialization data is passed to service instances or replicas when they - are created. - :type initialization_data: list[int] - :param partition_description: Required. The partition description as an - object. - :type partition_description: - ~azure.servicefabric.models.PartitionSchemeDescription - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics. - :type service_load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param is_default_move_cost_specified: Indicates if the DefaultMoveCost - property is specified. - :type is_default_move_cost_specified: bool - :param service_package_activation_mode: The activation mode of service - package to be used for a service. Possible values include: - 'SharedProcess', 'ExclusiveProcess' - :type service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS - system service to be enabled in Service Fabric cluster. - :type service_dns_name: str - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param tags_required_to_place: Tags for placement of this service. - :type tags_required_to_place: - ~azure.servicefabric.models.NodeTagsDescription - :param tags_required_to_run: Tags for running of this service. - :type tags_required_to_run: - ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param target_replica_set_size: Required. The target replica set size as a - number. - :type target_replica_set_size: int - :param min_replica_set_size: Required. The minimum replica set size as a - number. - :type min_replica_set_size: int - :param has_persisted_state: Required. A flag indicating whether this is a - persistent service which stores states on the local disk. If it is then - the value of this property is true, if not it is false. - :type has_persisted_state: bool - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 6 then the flags for - QuorumLossWaitDuration (2) and StandByReplicaKeepDuration(4) are set. - - None - Does not indicate any other properties are set. The value is - zero. - - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - property is set. The value is 1. - - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property - is set. The value is 2. - - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - property is set. The value is 4. - - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit - property is set. The value is 8. - - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property - is set. The value is 16. - :type flags: int - :param replica_restart_wait_duration_seconds: The duration, in seconds, - between when a replica goes down and when a new replica is created. - :type replica_restart_wait_duration_seconds: long - :param quorum_loss_wait_duration_seconds: The maximum duration, in - seconds, for which a partition is allowed to be in a state of quorum loss. - :type quorum_loss_wait_duration_seconds: long - :param stand_by_replica_keep_duration_seconds: The definition on how long - StandBy replicas should be maintained before being removed. - :type stand_by_replica_keep_duration_seconds: long - :param service_placement_time_limit_seconds: The duration for which - replicas can stay InBuild before reporting that build is stuck. - :type service_placement_time_limit_seconds: long - :param drop_source_replica_on_move: Indicates whether to drop source - Secondary replica even if the target replica has not finished build. If - desired behavior is to drop it as soon as possible the value of this - property is true, if not it is false. - :type drop_source_replica_on_move: bool - :param replica_lifecycle_description: Defines how replicas of this service - will behave during ther lifecycle. - :type replica_lifecycle_description: - ~azure.servicefabric.models.ReplicaLifecycleDescription - """ - - _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, - 'target_replica_set_size': {'required': True, 'minimum': 1}, - 'min_replica_set_size': {'required': True, 'minimum': 1}, - 'has_persisted_state': {'required': True}, - 'replica_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'quorum_loss_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'stand_by_replica_keep_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'service_placement_time_limit_seconds': {'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'long'}, - 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'long'}, - 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'long'}, - 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'long'}, - 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, - 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, - } - - def __init__(self, *, service_name: str, service_type_name: str, partition_description, target_replica_set_size: int, min_replica_set_size: int, has_persisted_state: bool, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, flags: int=None, replica_restart_wait_duration_seconds: int=None, quorum_loss_wait_duration_seconds: int=None, stand_by_replica_keep_duration_seconds: int=None, service_placement_time_limit_seconds: int=None, drop_source_replica_on_move: bool=None, replica_lifecycle_description=None, **kwargs) -> None: - super(StatefulServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, tags_required_to_place=tags_required_to_place, tags_required_to_run=tags_required_to_run, **kwargs) - self.target_replica_set_size = target_replica_set_size - self.min_replica_set_size = min_replica_set_size - self.has_persisted_state = has_persisted_state - self.flags = flags - self.replica_restart_wait_duration_seconds = replica_restart_wait_duration_seconds - self.quorum_loss_wait_duration_seconds = quorum_loss_wait_duration_seconds - self.stand_by_replica_keep_duration_seconds = stand_by_replica_keep_duration_seconds - self.service_placement_time_limit_seconds = service_placement_time_limit_seconds - self.drop_source_replica_on_move = drop_source_replica_on_move - self.replica_lifecycle_description = replica_lifecycle_description - self.service_kind = 'Stateful' - - -class StatefulServiceInfo(ServiceInfo): - """Information about a stateful Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :param id: The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to - identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type id: str - :param name: The full name of the service with 'fabric:' URI scheme. - :type name: str - :param type_name: Name of the service type as specified in the service - manifest. - :type type_name: str - :param manifest_version: The version of the service manifest. - :type manifest_version: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_status: The status of the application. Possible values - include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', - 'Failed' - :type service_status: str or ~azure.servicefabric.models.ServiceStatus - :param is_service_group: Whether the service is in a service group. - :type is_service_group: bool - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param has_persisted_state: Whether the service has persisted state. - :type has_persisted_state: bool - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, name: str=None, type_name: str=None, manifest_version: str=None, health_state=None, service_status=None, is_service_group: bool=None, has_persisted_state: bool=None, **kwargs) -> None: - super(StatefulServiceInfo, self).__init__(id=id, name=name, type_name=type_name, manifest_version=manifest_version, health_state=health_state, service_status=service_status, is_service_group=is_service_group, **kwargs) - self.has_persisted_state = has_persisted_state - self.service_kind = 'Stateful' - - -class StatefulServicePartitionInfo(ServicePartitionInfo): - """Information about a partition of a stateful Service Fabric service.. - - All required parameters must be populated in order to send to Azure. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param partition_status: The status of the service fabric service - partition. Possible values include: 'Invalid', 'Ready', 'NotReady', - 'InQuorumLoss', 'Reconfiguring', 'Deleting' - :type partition_status: str or - ~azure.servicefabric.models.ServicePartitionStatus - :param partition_information: Information about the partition identity, - partitioning scheme and keys supported by it. - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param target_replica_set_size: The target replica set size as a number. - :type target_replica_set_size: long - :param min_replica_set_size: The minimum replica set size as a number. - :type min_replica_set_size: long - :param last_quorum_loss_duration: The duration for which this partition - was in quorum loss. If the partition is currently in quorum loss, it - returns the duration since it has been in that state. This field is using - ISO8601 format for specifying the duration. - :type last_quorum_loss_duration: timedelta - :param primary_epoch: An Epoch is a configuration number for the partition - as a whole. When the configuration of the replica set changes, for example - when the Primary replica changes, the operations that are replicated from - the new Primary replica are said to be a new Epoch from the ones which - were sent by the old Primary replica. - :type primary_epoch: ~azure.servicefabric.models.Epoch - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'long'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'long'}, - 'last_quorum_loss_duration': {'key': 'LastQuorumLossDuration', 'type': 'duration'}, - 'primary_epoch': {'key': 'PrimaryEpoch', 'type': 'Epoch'}, - } - - def __init__(self, *, health_state=None, partition_status=None, partition_information=None, target_replica_set_size: int=None, min_replica_set_size: int=None, last_quorum_loss_duration=None, primary_epoch=None, **kwargs) -> None: - super(StatefulServicePartitionInfo, self).__init__(health_state=health_state, partition_status=partition_status, partition_information=partition_information, **kwargs) - self.target_replica_set_size = target_replica_set_size - self.min_replica_set_size = min_replica_set_size - self.last_quorum_loss_duration = last_quorum_loss_duration - self.primary_epoch = primary_epoch - self.service_kind = 'Stateful' - - -class StatefulServiceReplicaHealth(ReplicaHealth): - """Represents the health of the stateful service replica. - Contains the replica aggregated health state, the health events and the - unhealthy evaluations. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param partition_id: Id of the partition to which this replica belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, replica_id: str=None, **kwargs) -> None: - super(StatefulServiceReplicaHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, partition_id=partition_id, **kwargs) - self.replica_id = replica_id - self.service_kind = 'Stateful' - - -class StatefulServiceReplicaHealthState(ReplicaHealthState): - """Represents the health state of the stateful service replica, which contains - the replica ID and the aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param partition_id: The ID of the partition to which this replica - belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, partition_id: str=None, replica_id: str=None, **kwargs) -> None: - super(StatefulServiceReplicaHealthState, self).__init__(aggregated_health_state=aggregated_health_state, partition_id=partition_id, **kwargs) - self.replica_id = replica_id - self.service_kind = 'Stateful' - - -class StatefulServiceReplicaInfo(ReplicaInfo): - """Represents a stateful service replica. This includes information about the - identity, role, status, health, node name, uptime, and other details about - the replica. - - All required parameters must be populated in order to send to Azure. - - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param address: The address the replica is listening on. - :type address: str - :param last_in_build_duration_in_seconds: The last in build duration of - the replica in seconds. - :type last_in_build_duration_in_seconds: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_role: The role of a replica of a stateful service. Possible - values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', - 'ActiveSecondary' - :type replica_role: str or ~azure.servicefabric.models.ReplicaRole - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__(self, *, replica_status=None, health_state=None, node_name: str=None, address: str=None, last_in_build_duration_in_seconds: str=None, replica_role=None, replica_id: str=None, **kwargs) -> None: - super(StatefulServiceReplicaInfo, self).__init__(replica_status=replica_status, health_state=health_state, node_name=node_name, address=address, last_in_build_duration_in_seconds=last_in_build_duration_in_seconds, **kwargs) - self.replica_role = replica_role - self.replica_id = replica_id - self.service_kind = 'Stateful' - - -class StatefulServiceTypeDescription(ServiceTypeDescription): - """Describes a stateful service type defined in the service manifest of a - provisioned application type. - - All required parameters must be populated in order to send to Azure. - - :param is_stateful: Indicates whether the service type is a stateful - service type or a stateless service type. This property is true if the - service type is a stateful service type, false otherwise. - :type is_stateful: bool - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param placement_constraints: The placement constraint to be used when - instantiating this service in a Service Fabric cluster. - :type placement_constraints: str - :param load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: List of service placement policy - descriptions. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param extensions: List of service type extensions. - :type extensions: - list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :param kind: Required. Constant filled by server. - :type kind: str - :param has_persisted_state: A flag indicating whether this is a persistent - service which stores states on the local disk. If it is then the value of - this property is true, if not it is false. - :type has_persisted_state: bool - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - } - - def __init__(self, *, is_stateful: bool=None, service_type_name: str=None, placement_constraints: str=None, load_metrics=None, service_placement_policies=None, extensions=None, has_persisted_state: bool=None, **kwargs) -> None: - super(StatefulServiceTypeDescription, self).__init__(is_stateful=is_stateful, service_type_name=service_type_name, placement_constraints=placement_constraints, load_metrics=load_metrics, service_placement_policies=service_placement_policies, extensions=extensions, **kwargs) - self.has_persisted_state = has_persisted_state - self.kind = 'Stateful' - - -class StatefulServiceUpdateDescription(ServiceUpdateDescription): - """Describes an update for a stateful service. - - All required parameters must be populated in order to send to Azure. - - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 6 then the flags for - ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. - - None - Does not indicate any other properties are set. The value is - zero. - - TargetReplicaSetSize/InstanceCount - Indicates whether the - TargetReplicaSetSize property (for Stateful services) or the InstanceCount - property (for Stateless services) is set. The value is 1. - - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - property is set. The value is 2. - - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property - is set. The value is 4. - - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - property is set. The value is 8. - - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The - value is 16. - - PlacementConstraints - Indicates the PlacementConstraints property is - set. The value is 32. - - PlacementPolicyList - Indicates the ServicePlacementPolicies property is - set. The value is 64. - - Correlation - Indicates the CorrelationScheme property is set. The value - is 128. - - Metrics - Indicates the ServiceLoadMetrics property is set. The value is - 256. - - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The - value is 512. - - ScalingPolicy - Indicates the ScalingPolicies property is set. The value - is 1024. - - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit - property is set. The value is 2048. - - MinInstanceCount - Indicates the MinInstanceCount property is set. The - value is 4096. - - MinInstancePercentage - Indicates the MinInstancePercentage property is - set. The value is 8192. - - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 16384. - - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 32768. - - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property - is set. The value is 65536. - - ServiceDnsName - Indicates the ServiceDnsName property is set. The value - is 131072. - - TagsForPlacement - Indicates the TagsForPlacement property is set. The - value is 1048576. - - TagsForRunning - Indicates the TagsForRunning property is set. The value - is 2097152. - :type flags: str - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param load_metrics: The service load metrics. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param service_dns_name: The DNS name of the service. - :type service_dns_name: str - :param tags_for_placement: Tags for placement of this service. - :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :param tags_for_running: Tags for running of this service. - :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param target_replica_set_size: The target replica set size as a number. - :type target_replica_set_size: int - :param min_replica_set_size: The minimum replica set size as a number. - :type min_replica_set_size: int - :param replica_restart_wait_duration_seconds: The duration, in seconds, - between when a replica goes down and when a new replica is created. - :type replica_restart_wait_duration_seconds: str - :param quorum_loss_wait_duration_seconds: The maximum duration, in - seconds, for which a partition is allowed to be in a state of quorum loss. - :type quorum_loss_wait_duration_seconds: str - :param stand_by_replica_keep_duration_seconds: The definition on how long - StandBy replicas should be maintained before being removed. - :type stand_by_replica_keep_duration_seconds: str - :param service_placement_time_limit_seconds: The duration for which - replicas can stay InBuild before reporting that build is stuck. - :type service_placement_time_limit_seconds: str - :param drop_source_replica_on_move: Indicates whether to drop source - Secondary replica even if the target replica has not finished build. If - desired behavior is to drop it as soon as possible the value of this - property is true, if not it is false. - :type drop_source_replica_on_move: bool - :param replica_lifecycle_description: Defines how replicas of this service - will behave during ther lifecycle. - :type replica_lifecycle_description: - ~azure.servicefabric.models.ReplicaLifecycleDescription - """ - - _validation = { - 'service_kind': {'required': True}, - 'target_replica_set_size': {'minimum': 1}, - 'min_replica_set_size': {'minimum': 1}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'str'}, - 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'str'}, - 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'str'}, - 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'str'}, - 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, - 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, - } - - def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, target_replica_set_size: int=None, min_replica_set_size: int=None, replica_restart_wait_duration_seconds: str=None, quorum_loss_wait_duration_seconds: str=None, stand_by_replica_keep_duration_seconds: str=None, service_placement_time_limit_seconds: str=None, drop_source_replica_on_move: bool=None, replica_lifecycle_description=None, **kwargs) -> None: - super(StatefulServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_dns_name=service_dns_name, tags_for_placement=tags_for_placement, tags_for_running=tags_for_running, **kwargs) - self.target_replica_set_size = target_replica_set_size - self.min_replica_set_size = min_replica_set_size - self.replica_restart_wait_duration_seconds = replica_restart_wait_duration_seconds - self.quorum_loss_wait_duration_seconds = quorum_loss_wait_duration_seconds - self.stand_by_replica_keep_duration_seconds = stand_by_replica_keep_duration_seconds - self.service_placement_time_limit_seconds = service_placement_time_limit_seconds - self.drop_source_replica_on_move = drop_source_replica_on_move - self.replica_lifecycle_description = replica_lifecycle_description - self.service_kind = 'Stateful' - - -class StatelessReplicaHealthReportExpiredEvent(ReplicaEvent): - """Stateless Replica Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(StatelessReplicaHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'StatelessReplicaHealthReportExpired' - - -class StatelessReplicaNewHealthReportEvent(ReplicaEvent): - """Stateless Replica Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(StatelessReplicaNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'StatelessReplicaNewHealthReport' - - -class StatelessServiceDescription(ServiceDescription): - """Describes a stateless service. - - All required parameters must be populated in order to send to Azure. - - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_name: Required. The full name of the service with 'fabric:' - URI scheme. - :type service_name: str - :param service_type_name: Required. Name of the service type as specified - in the service manifest. - :type service_type_name: str - :param initialization_data: The initialization data as an array of bytes. - Initialization data is passed to service instances or replicas when they - are created. - :type initialization_data: list[int] - :param partition_description: Required. The partition description as an - object. - :type partition_description: - ~azure.servicefabric.models.PartitionSchemeDescription - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics. - :type service_load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param is_default_move_cost_specified: Indicates if the DefaultMoveCost - property is specified. - :type is_default_move_cost_specified: bool - :param service_package_activation_mode: The activation mode of service - package to be used for a service. Possible values include: - 'SharedProcess', 'ExclusiveProcess' - :type service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS - system service to be enabled in Service Fabric cluster. - :type service_dns_name: str - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param tags_required_to_place: Tags for placement of this service. - :type tags_required_to_place: - ~azure.servicefabric.models.NodeTagsDescription - :param tags_required_to_run: Tags for running of this service. - :type tags_required_to_run: - ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_count: Required. The instance count. - :type instance_count: int - :param min_instance_count: MinInstanceCount is the minimum number of - instances that must be up to meet the EnsureAvailability safety check - during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation - -1 is first converted into the number of nodes on which the instances are - allowed to be placed according to the placement constraints on the - service. - :type min_instance_count: int - :param min_instance_percentage: MinInstancePercentage is the minimum - percentage of InstanceCount that must be up to meet the EnsureAvailability - safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage - computation, -1 is first converted into the number of nodes on which the - instances are allowed to be placed according to the placement constraints - on the service. - :type min_instance_percentage: int - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 1 then the flags for - InstanceCloseDelayDuration is set. - - None - Does not indicate any other properties are set. The value is - zero. - - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 1. - - InstanceRestartWaitDuration - Indicates the - InstanceRestartWaitDurationSeconds property is set. The value is 2. - :type flags: int - :param instance_close_delay_duration_seconds: Duration in seconds, to wait - before a stateless instance is closed, to allow the active requests to - drain gracefully. This would be effective when the instance is closing - during the application/cluster upgrade and disabling node. - The endpoint exposed on this instance is removed prior to starting the - delay, which prevents new connections to this instance. - In addition, clients that have subscribed to service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do - the following upon receiving the endpoint removal notification: - - Stop sending new requests to this instance. - - Close existing connections after in-flight requests have completed. - - Connect to a different instance of the service partition for future - requests. - Note, the default value of InstanceCloseDelayDuration is 0, which - indicates that there won't be any delay or removal of the endpoint prior - to closing the instance. - :type instance_close_delay_duration_seconds: long - :param instance_lifecycle_description: Defines how instances of this - service will behave during ther lifecycle. - :type instance_lifecycle_description: - ~azure.servicefabric.models.InstanceLifecycleDescription - :param instance_restart_wait_duration_seconds: When a stateless instance - goes down, this timer starts. When it expires Service Fabric will create a - new instance on any node in the cluster. - This configuration is to reduce unnecessary creation of a new instance in - situations where the instance going down is likely to recover in a short - time. For example, during an upgrade. - The default value is 0, which indicates that when stateless instance goes - down, Service Fabric will immediately start building its replacement. - :type instance_restart_wait_duration_seconds: long - """ - - _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, - 'instance_count': {'required': True, 'minimum': -1}, - 'instance_close_delay_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'instance_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'long'}, - 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, - 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'long'}, - } - - def __init__(self, *, service_name: str, service_type_name: str, partition_description, instance_count: int, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, min_instance_count: int=None, min_instance_percentage: int=None, flags: int=None, instance_close_delay_duration_seconds: int=None, instance_lifecycle_description=None, instance_restart_wait_duration_seconds: int=None, **kwargs) -> None: - super(StatelessServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, tags_required_to_place=tags_required_to_place, tags_required_to_run=tags_required_to_run, **kwargs) - self.instance_count = instance_count - self.min_instance_count = min_instance_count - self.min_instance_percentage = min_instance_percentage - self.flags = flags - self.instance_close_delay_duration_seconds = instance_close_delay_duration_seconds - self.instance_lifecycle_description = instance_lifecycle_description - self.instance_restart_wait_duration_seconds = instance_restart_wait_duration_seconds - self.service_kind = 'Stateless' - - -class StatelessServiceInfo(ServiceInfo): - """Information about a stateless Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :param id: The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to - identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type id: str - :param name: The full name of the service with 'fabric:' URI scheme. - :type name: str - :param type_name: Name of the service type as specified in the service - manifest. - :type type_name: str - :param manifest_version: The version of the service manifest. - :type manifest_version: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_status: The status of the application. Possible values - include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', - 'Failed' - :type service_status: str or ~azure.servicefabric.models.ServiceStatus - :param is_service_group: Whether the service is in a service group. - :type is_service_group: bool - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, type_name: str=None, manifest_version: str=None, health_state=None, service_status=None, is_service_group: bool=None, **kwargs) -> None: - super(StatelessServiceInfo, self).__init__(id=id, name=name, type_name=type_name, manifest_version=manifest_version, health_state=health_state, service_status=service_status, is_service_group=is_service_group, **kwargs) - self.service_kind = 'Stateless' - - -class StatelessServiceInstanceHealth(ReplicaHealth): - """Represents the health of the stateless service instance. - Contains the instance aggregated health state, the health events and the - unhealthy evaluations. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param partition_id: Id of the partition to which this replica belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_id: Id of a stateless service instance. InstanceId is used - by Service Fabric to uniquely identify an instance of a partition of a - stateless service. It is unique within a partition and does not change for - the lifetime of the instance. If the instance has failed over on the same - or different node, it will get a different value for the InstanceId. - :type instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, instance_id: str=None, **kwargs) -> None: - super(StatelessServiceInstanceHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, partition_id=partition_id, **kwargs) - self.instance_id = instance_id - self.service_kind = 'Stateless' - - -class StatelessServiceInstanceHealthState(ReplicaHealthState): - """Represents the health state of the stateless service instance, which - contains the instance ID and the aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param partition_id: The ID of the partition to which this replica - belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of the stateless service instance on the wire this - field is called ReplicaId. - :type replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, partition_id: str=None, replica_id: str=None, **kwargs) -> None: - super(StatelessServiceInstanceHealthState, self).__init__(aggregated_health_state=aggregated_health_state, partition_id=partition_id, **kwargs) - self.replica_id = replica_id - self.service_kind = 'Stateless' - - -class StatelessServiceInstanceInfo(ReplicaInfo): - """Represents a stateless service instance. This includes information about - the identity, status, health, node name, uptime, and other details about - the instance. - - All required parameters must be populated in order to send to Azure. - - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param address: The address the replica is listening on. - :type address: str - :param last_in_build_duration_in_seconds: The last in build duration of - the replica in seconds. - :type last_in_build_duration_in_seconds: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_id: Id of a stateless service instance. InstanceId is used - by Service Fabric to uniquely identify an instance of a partition of a - stateless service. It is unique within a partition and does not change for - the lifetime of the instance. If the instance has failed over on the same - or different node, it will get a different value for the InstanceId. - :type instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, *, replica_status=None, health_state=None, node_name: str=None, address: str=None, last_in_build_duration_in_seconds: str=None, instance_id: str=None, **kwargs) -> None: - super(StatelessServiceInstanceInfo, self).__init__(replica_status=replica_status, health_state=health_state, node_name=node_name, address=address, last_in_build_duration_in_seconds=last_in_build_duration_in_seconds, **kwargs) - self.instance_id = instance_id - self.service_kind = 'Stateless' - - -class StatelessServicePartitionInfo(ServicePartitionInfo): - """Information about a partition of a stateless Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param partition_status: The status of the service fabric service - partition. Possible values include: 'Invalid', 'Ready', 'NotReady', - 'InQuorumLoss', 'Reconfiguring', 'Deleting' - :type partition_status: str or - ~azure.servicefabric.models.ServicePartitionStatus - :param partition_information: Information about the partition identity, - partitioning scheme and keys supported by it. - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_count: Number of instances of this partition. - :type instance_count: long - :param min_instance_count: MinInstanceCount is the minimum number of - instances that must be up to meet the EnsureAvailability safety check - during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation - -1 is first converted into the number of nodes on which the instances are - allowed to be placed according to the placement constraints on the - service. - :type min_instance_count: int - :param min_instance_percentage: MinInstancePercentage is the minimum - percentage of InstanceCount that must be up to meet the EnsureAvailability - safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage - computation, -1 is first converted into the number of nodes on which the - instances are allowed to be placed according to the placement constraints - on the service. - :type min_instance_percentage: int - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'long'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - } - - def __init__(self, *, health_state=None, partition_status=None, partition_information=None, instance_count: int=None, min_instance_count: int=None, min_instance_percentage: int=None, **kwargs) -> None: - super(StatelessServicePartitionInfo, self).__init__(health_state=health_state, partition_status=partition_status, partition_information=partition_information, **kwargs) - self.instance_count = instance_count - self.min_instance_count = min_instance_count - self.min_instance_percentage = min_instance_percentage - self.service_kind = 'Stateless' - - -class StatelessServiceTypeDescription(ServiceTypeDescription): - """Describes a stateless service type defined in the service manifest of a - provisioned application type. - - All required parameters must be populated in order to send to Azure. - - :param is_stateful: Indicates whether the service type is a stateful - service type or a stateless service type. This property is true if the - service type is a stateful service type, false otherwise. - :type is_stateful: bool - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param placement_constraints: The placement constraint to be used when - instantiating this service in a Service Fabric cluster. - :type placement_constraints: str - :param load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: List of service placement policy - descriptions. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param extensions: List of service type extensions. - :type extensions: - list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :param kind: Required. Constant filled by server. - :type kind: str - :param use_implicit_host: A flag indicating if this type is not - implemented and hosted by a user service process, but is implicitly hosted - by a system created process. This value is true for services using the - guest executable services, false otherwise. - :type use_implicit_host: bool - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'use_implicit_host': {'key': 'UseImplicitHost', 'type': 'bool'}, - } - - def __init__(self, *, is_stateful: bool=None, service_type_name: str=None, placement_constraints: str=None, load_metrics=None, service_placement_policies=None, extensions=None, use_implicit_host: bool=None, **kwargs) -> None: - super(StatelessServiceTypeDescription, self).__init__(is_stateful=is_stateful, service_type_name=service_type_name, placement_constraints=placement_constraints, load_metrics=load_metrics, service_placement_policies=service_placement_policies, extensions=extensions, **kwargs) - self.use_implicit_host = use_implicit_host - self.kind = 'Stateless' - - -class StatelessServiceUpdateDescription(ServiceUpdateDescription): - """Describes an update for a stateless service. - - All required parameters must be populated in order to send to Azure. - - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 6 then the flags for - ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. - - None - Does not indicate any other properties are set. The value is - zero. - - TargetReplicaSetSize/InstanceCount - Indicates whether the - TargetReplicaSetSize property (for Stateful services) or the InstanceCount - property (for Stateless services) is set. The value is 1. - - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - property is set. The value is 2. - - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property - is set. The value is 4. - - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - property is set. The value is 8. - - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The - value is 16. - - PlacementConstraints - Indicates the PlacementConstraints property is - set. The value is 32. - - PlacementPolicyList - Indicates the ServicePlacementPolicies property is - set. The value is 64. - - Correlation - Indicates the CorrelationScheme property is set. The value - is 128. - - Metrics - Indicates the ServiceLoadMetrics property is set. The value is - 256. - - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The - value is 512. - - ScalingPolicy - Indicates the ScalingPolicies property is set. The value - is 1024. - - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit - property is set. The value is 2048. - - MinInstanceCount - Indicates the MinInstanceCount property is set. The - value is 4096. - - MinInstancePercentage - Indicates the MinInstancePercentage property is - set. The value is 8192. - - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 16384. - - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 32768. - - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property - is set. The value is 65536. - - ServiceDnsName - Indicates the ServiceDnsName property is set. The value - is 131072. - - TagsForPlacement - Indicates the TagsForPlacement property is set. The - value is 1048576. - - TagsForRunning - Indicates the TagsForRunning property is set. The value - is 2097152. - :type flags: str - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param load_metrics: The service load metrics. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param service_dns_name: The DNS name of the service. - :type service_dns_name: str - :param tags_for_placement: Tags for placement of this service. - :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :param tags_for_running: Tags for running of this service. - :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_count: The instance count. - :type instance_count: int - :param min_instance_count: MinInstanceCount is the minimum number of - instances that must be up to meet the EnsureAvailability safety check - during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation - -1 is first converted into the number of nodes on which the instances are - allowed to be placed according to the placement constraints on the - service. - :type min_instance_count: int - :param min_instance_percentage: MinInstancePercentage is the minimum - percentage of InstanceCount that must be up to meet the EnsureAvailability - safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage - computation, -1 is first converted into the number of nodes on which the - instances are allowed to be placed according to the placement constraints - on the service. - :type min_instance_percentage: int - :param instance_close_delay_duration_seconds: Duration in seconds, to wait - before a stateless instance is closed, to allow the active requests to - drain gracefully. This would be effective when the instance is closing - during the application/cluster upgrade and disabling node. - The endpoint exposed on this instance is removed prior to starting the - delay, which prevents new connections to this instance. - In addition, clients that have subscribed to service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do - the following upon receiving the endpoint removal notification: - - Stop sending new requests to this instance. - - Close existing connections after in-flight requests have completed. - - Connect to a different instance of the service partition for future - requests. - :type instance_close_delay_duration_seconds: str - :param instance_lifecycle_description: Defines how instances of this - service will behave during ther lifecycle. - :type instance_lifecycle_description: - ~azure.servicefabric.models.InstanceLifecycleDescription - :param instance_restart_wait_duration_seconds: When a stateless instance - goes down, this timer starts. When it expires Service Fabric will create a - new instance on any node in the cluster. - This configuration is to reduce unnecessary creation of a new instance in - situations where the instance going down is likely to recover in a short - time. For example, during an upgrade. - The default value is 0, which indicates that when stateless instance goes - down, Service Fabric will immediately start building its replacement. - :type instance_restart_wait_duration_seconds: str - """ - - _validation = { - 'service_kind': {'required': True}, - 'instance_count': {'minimum': -1}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'str'}, - 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, - 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'str'}, - } - - def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, instance_count: int=None, min_instance_count: int=None, min_instance_percentage: int=None, instance_close_delay_duration_seconds: str=None, instance_lifecycle_description=None, instance_restart_wait_duration_seconds: str=None, **kwargs) -> None: - super(StatelessServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_dns_name=service_dns_name, tags_for_placement=tags_for_placement, tags_for_running=tags_for_running, **kwargs) - self.instance_count = instance_count - self.min_instance_count = min_instance_count - self.min_instance_percentage = min_instance_percentage - self.instance_close_delay_duration_seconds = instance_close_delay_duration_seconds - self.instance_lifecycle_description = instance_lifecycle_description - self.instance_restart_wait_duration_seconds = instance_restart_wait_duration_seconds - self.service_kind = 'Stateless' - - -class StoppedChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos stops because either - the user issued a stop or the time to run was up. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Describes why Chaos stopped. Chaos can stop because of - StopChaos API call or the timeToRun provided in ChaosParameters is over. - :type reason: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: - super(StoppedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.reason = reason - self.kind = 'Stopped' - - -class StringPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type String. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. The data of the property value. - :type data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__(self, *, data: str, **kwargs) -> None: - super(StringPropertyValue, self).__init__(**kwargs) - self.data = data - self.kind = 'String' - - -class SuccessfulPropertyBatchInfo(PropertyBatchInfo): - """Derived from PropertyBatchInfo. Represents the property batch succeeding. - Contains the results of any "Get" operations in the batch. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param properties: A map containing the properties that were requested - through any "Get" property batch operations. The key represents the index - of the "Get" operation in the original request, in string form. The value - is the property. If a property is not found, it will not be in the map. - :type properties: dict[str, ~azure.servicefabric.models.PropertyInfo] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'properties': {'key': 'Properties', 'type': '{PropertyInfo}'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(SuccessfulPropertyBatchInfo, self).__init__(**kwargs) - self.properties = properties - self.kind = 'Successful' - - -class SystemApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for the fabric:/System application, containing - information about the data and the algorithm used by health store to - evaluate health. The evaluation is returned only when the aggregated health - state of the cluster is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the system application. The types - of the unhealthy evaluations can be DeployedApplicationsHealthEvaluation, - ServicesHealthEvaluation or EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(SystemApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'SystemApplication' - - -class TcpConfig(Model): - """Describes the tcp configuration for external connectivity for this network. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. tcp gateway config name. - :type name: str - :param port: Required. Specifies the port at which the service endpoint - below needs to be exposed. - :type port: int - :param destination: Required. Describes destination endpoint for routing - traffic. - :type destination: ~azure.servicefabric.models.GatewayDestination - """ - - _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, - } - - def __init__(self, *, name: str, port: int, destination, **kwargs) -> None: - super(TcpConfig, self).__init__(**kwargs) - self.name = name - self.port = port - self.destination = destination - - -class TestErrorChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when an unexpected event occurs - in the Chaos engine. - For example, due to the cluster snapshot being inconsistent, while faulting - an entity, Chaos found that the entity was already faulted -- which would - be an unexpected event. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Describes why TestErrorChaosEvent was generated. For - example, Chaos tries to fault a partition but finds that the partition is - no longer fault tolerant, then a TestErrorEvent gets generated with the - reason stating that the partition is not fault tolerant. - :type reason: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: - super(TestErrorChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.reason = reason - self.kind = 'TestError' - - -class TimeBasedBackupScheduleDescription(BackupScheduleDescription): - """Describes the time based backup schedule. - - All required parameters must be populated in order to send to Azure. - - :param schedule_kind: Required. Constant filled by server. - :type schedule_kind: str - :param schedule_frequency_type: Required. Describes the frequency with - which to run the time based backup schedule. Possible values include: - 'Invalid', 'Daily', 'Weekly' - :type schedule_frequency_type: str or - ~azure.servicefabric.models.BackupScheduleFrequencyType - :param run_days: List of days of a week when to trigger the periodic - backup. This is valid only when the backup schedule frequency type is - weekly. - :type run_days: list[str or ~azure.servicefabric.models.DayOfWeek] - :param run_times: Required. Represents the list of exact time during the - day in ISO8601 format. Like '19:00:00' will represent '7PM' during the - day. Date specified along with time will be ignored. - :type run_times: list[datetime] - """ - - _validation = { - 'schedule_kind': {'required': True}, - 'schedule_frequency_type': {'required': True}, - 'run_times': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - 'schedule_frequency_type': {'key': 'ScheduleFrequencyType', 'type': 'str'}, - 'run_days': {'key': 'RunDays', 'type': '[str]'}, - 'run_times': {'key': 'RunTimes', 'type': '[iso-8601]'}, - } - - def __init__(self, *, schedule_frequency_type, run_times, run_days=None, **kwargs) -> None: - super(TimeBasedBackupScheduleDescription, self).__init__(**kwargs) - self.schedule_frequency_type = schedule_frequency_type - self.run_days = run_days - self.run_times = run_times - self.schedule_kind = 'TimeBased' - - -class TimeOfDay(Model): - """Defines an hour and minute of the day specified in 24 hour time. - - :param hour: Represents the hour of the day. Value must be between 0 and - 23 inclusive. - :type hour: int - :param minute: Represents the minute of the hour. Value must be between 0 - to 59 inclusive. - :type minute: int - """ - - _validation = { - 'hour': {'maximum': 23, 'minimum': 0}, - 'minute': {'maximum': 59, 'minimum': 0}, - } - - _attribute_map = { - 'hour': {'key': 'Hour', 'type': 'int'}, - 'minute': {'key': 'Minute', 'type': 'int'}, - } - - def __init__(self, *, hour: int=None, minute: int=None, **kwargs) -> None: - super(TimeOfDay, self).__init__(**kwargs) - self.hour = hour - self.minute = minute - - -class TimeRange(Model): - """Defines a time range in a 24 hour day specified by a start and end time. - - :param start_time: Defines an hour and minute of the day specified in 24 - hour time. - :type start_time: ~azure.servicefabric.models.TimeOfDay - :param end_time: Defines an hour and minute of the day specified in 24 - hour time. - :type end_time: ~azure.servicefabric.models.TimeOfDay - """ - - _attribute_map = { - 'start_time': {'key': 'StartTime', 'type': 'TimeOfDay'}, - 'end_time': {'key': 'EndTime', 'type': 'TimeOfDay'}, - } - - def __init__(self, *, start_time=None, end_time=None, **kwargs) -> None: - super(TimeRange, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - - -class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): - """Describes a partitioning scheme where an integer range is allocated evenly - across a number of partitions. - - All required parameters must be populated in order to send to Azure. - - :param partition_scheme: Required. Constant filled by server. - :type partition_scheme: str - :param count: Required. The number of partitions. - :type count: int - :param low_key: Required. String indicating the lower bound of the - partition key range that - should be split between the partitions. - :type low_key: str - :param high_key: Required. String indicating the upper bound of the - partition key range that - should be split between the partitions. - :type high_key: str - """ - - _validation = { - 'partition_scheme': {'required': True}, - 'count': {'required': True}, - 'low_key': {'required': True}, - 'high_key': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, - } - - def __init__(self, *, count: int, low_key: str, high_key: str, **kwargs) -> None: - super(UniformInt64RangePartitionSchemeDescription, self).__init__(**kwargs) - self.count = count - self.low_key = low_key - self.high_key = high_key - self.partition_scheme = 'UniformInt64Range' - - -class UnplacedReplicaInformation(Model): - """Contains information for an unplaced replica. - - :param service_name: The name of the service. - :type service_name: str - :param partition_id: The ID of the partition. - :type partition_id: str - :param unplaced_replica_details: List of reasons due to which a replica - cannot be placed. - :type unplaced_replica_details: list[str] - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'unplaced_replica_details': {'key': 'UnplacedReplicaDetails', 'type': '[str]'}, - } - - def __init__(self, *, service_name: str=None, partition_id: str=None, unplaced_replica_details=None, **kwargs) -> None: - super(UnplacedReplicaInformation, self).__init__(**kwargs) - self.service_name = service_name - self.partition_id = partition_id - self.unplaced_replica_details = unplaced_replica_details - - -class UnprovisionApplicationTypeDescriptionInfo(Model): - """Describes the operation to unregister or unprovision an application type - and its version that was registered with the Service Fabric. - - All required parameters must be populated in order to send to Azure. - - :param application_type_version: Required. The version of the application - type as defined in the application manifest. - :type application_type_version: str - :param async_property: The flag indicating whether or not unprovision - should occur asynchronously. When set to true, the unprovision operation - returns when the request is accepted by the system, and the unprovision - operation continues without any timeout limit. The default value is false. - However, we recommend setting it to true for large application packages - that were provisioned. - :type async_property: bool - """ - - _validation = { - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'async_property': {'key': 'Async', 'type': 'bool'}, - } - - def __init__(self, *, application_type_version: str, async_property: bool=None, **kwargs) -> None: - super(UnprovisionApplicationTypeDescriptionInfo, self).__init__(**kwargs) - self.application_type_version = application_type_version - self.async_property = async_property - - -class UnprovisionFabricDescription(Model): - """Describes the parameters for unprovisioning a cluster. - - :param code_version: The cluster code package version. - :type code_version: str - :param config_version: The cluster manifest version. - :type config_version: str - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - } - - def __init__(self, *, code_version: str=None, config_version: str=None, **kwargs) -> None: - super(UnprovisionFabricDescription, self).__init__(**kwargs) - self.code_version = code_version - self.config_version = config_version - - -class UpdateClusterUpgradeDescription(Model): - """Parameters for updating a cluster upgrade. - - :param upgrade_kind: The type of upgrade out of the following possible - values. Possible values include: 'Invalid', 'Rolling', - 'Rolling_ForceRestart'. Default value: "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeType - :param update_description: Describes the parameters for updating a rolling - upgrade of application or cluster. - :type update_description: - ~azure.servicefabric.models.RollingUpgradeUpdateDescription - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param enable_delta_health_evaluation: When true, enables delta health - evaluation rather than absolute health evaluation after completion of each - upgrade domain. - :type enable_delta_health_evaluation: bool - :param cluster_upgrade_health_policy: Defines a health policy used to - evaluate the health of the cluster during a cluster upgrade. - :type cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :param application_health_policy_map: Defines the application health - policy map used to evaluate the health of an application or one of its - children entities. - :type application_health_policy_map: - ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _attribute_map = { - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__(self, *, upgrade_kind="Rolling", update_description=None, cluster_health_policy=None, enable_delta_health_evaluation: bool=None, cluster_upgrade_health_policy=None, application_health_policy_map=None, **kwargs) -> None: - super(UpdateClusterUpgradeDescription, self).__init__(**kwargs) - self.upgrade_kind = upgrade_kind - self.update_description = update_description - self.cluster_health_policy = cluster_health_policy - self.enable_delta_health_evaluation = enable_delta_health_evaluation - self.cluster_upgrade_health_policy = cluster_upgrade_health_policy - self.application_health_policy_map = application_health_policy_map - - -class UpdatePartitionLoadResult(Model): - """Specifies result of updating load for specified partitions. The output will - be ordered based on the partition ID. - - :param partition_id: Id of the partition. - :type partition_id: str - :param partition_error_code: If OperationState is Completed - this is 0. - If OperationState is Faulted - this is an error code indicating the - reason. - :type partition_error_code: int - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'partition_error_code': {'key': 'PartitionErrorCode', 'type': 'int'}, - } - - def __init__(self, *, partition_id: str=None, partition_error_code: int=None, **kwargs) -> None: - super(UpdatePartitionLoadResult, self).__init__(**kwargs) - self.partition_id = partition_id - self.partition_error_code = partition_error_code - - -class UpgradeDomainDeltaNodesCheckHealthEvaluation(HealthEvaluation): - """Represents health evaluation for delta unhealthy cluster nodes in an - upgrade domain, containing health evaluations for each unhealthy node that - impacted current aggregated health state. - Can be returned during cluster upgrade when cluster aggregated health state - is Warning or Error. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param upgrade_domain_name: Name of the upgrade domain where nodes health - is currently evaluated. - :type upgrade_domain_name: str - :param baseline_error_count: Number of upgrade domain nodes with - aggregated heath state Error in the health store at the beginning of the - cluster upgrade. - :type baseline_error_count: long - :param baseline_total_count: Total number of upgrade domain nodes in the - health store at the beginning of the cluster upgrade. - :type baseline_total_count: long - :param max_percent_delta_unhealthy_nodes: Maximum allowed percentage of - upgrade domain delta unhealthy nodes from the ClusterUpgradeHealthPolicy. - :type max_percent_delta_unhealthy_nodes: int - :param total_count: Total number of upgrade domain nodes in the health - store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - NodeHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, - 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, upgrade_domain_name: str=None, baseline_error_count: int=None, baseline_total_count: int=None, max_percent_delta_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(UpgradeDomainDeltaNodesCheckHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.upgrade_domain_name = upgrade_domain_name - self.baseline_error_count = baseline_error_count - self.baseline_total_count = baseline_total_count - self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'UpgradeDomainDeltaNodesCheck' - - -class UpgradeDomainInfo(Model): - """Information about an upgrade domain. - - :param name: The name of the upgrade domain - :type name: str - :param state: The state of the upgrade domain. Possible values include: - 'Invalid', 'Pending', 'InProgress', 'Completed' - :type state: str or ~azure.servicefabric.models.UpgradeDomainState - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, state=None, **kwargs) -> None: - super(UpgradeDomainInfo, self).__init__(**kwargs) - self.name = name - self.state = state - - -class UpgradeDomainNodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for cluster nodes in an upgrade domain, - containing health evaluations for each unhealthy node that impacted current - aggregated health state. Can be returned when evaluating cluster health - during cluster upgrade and the aggregated health state is either Error or - Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param upgrade_domain_name: Name of the upgrade domain where nodes health - is currently evaluated. - :type upgrade_domain_name: str - :param max_percent_unhealthy_nodes: Maximum allowed percentage of - unhealthy nodes from the ClusterHealthPolicy. - :type max_percent_unhealthy_nodes: int - :param total_count: Total number of nodes in the current upgrade domain. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - NodeHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, upgrade_domain_name: str=None, max_percent_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(UpgradeDomainNodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.upgrade_domain_name = upgrade_domain_name - self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'UpgradeDomainNodes' - - -class UpgradeOrchestrationServiceState(Model): - """Service state of Service Fabric Upgrade Orchestration Service. - - :param service_state: The state of Service Fabric Upgrade Orchestration - Service. - :type service_state: str - """ - - _attribute_map = { - 'service_state': {'key': 'ServiceState', 'type': 'str'}, - } - - def __init__(self, *, service_state: str=None, **kwargs) -> None: - super(UpgradeOrchestrationServiceState, self).__init__(**kwargs) - self.service_state = service_state - - -class UpgradeOrchestrationServiceStateSummary(Model): - """Service state summary of Service Fabric Upgrade Orchestration Service. - - :param current_code_version: The current code version of the cluster. - :type current_code_version: str - :param current_manifest_version: The current manifest version of the - cluster. - :type current_manifest_version: str - :param target_code_version: The target code version of the cluster. - :type target_code_version: str - :param target_manifest_version: The target manifest version of the - cluster. - :type target_manifest_version: str - :param pending_upgrade_type: The type of the pending upgrade of the - cluster. - :type pending_upgrade_type: str - """ - - _attribute_map = { - 'current_code_version': {'key': 'CurrentCodeVersion', 'type': 'str'}, - 'current_manifest_version': {'key': 'CurrentManifestVersion', 'type': 'str'}, - 'target_code_version': {'key': 'TargetCodeVersion', 'type': 'str'}, - 'target_manifest_version': {'key': 'TargetManifestVersion', 'type': 'str'}, - 'pending_upgrade_type': {'key': 'PendingUpgradeType', 'type': 'str'}, - } - - def __init__(self, *, current_code_version: str=None, current_manifest_version: str=None, target_code_version: str=None, target_manifest_version: str=None, pending_upgrade_type: str=None, **kwargs) -> None: - super(UpgradeOrchestrationServiceStateSummary, self).__init__(**kwargs) - self.current_code_version = current_code_version - self.current_manifest_version = current_manifest_version - self.target_code_version = target_code_version - self.target_manifest_version = target_manifest_version - self.pending_upgrade_type = pending_upgrade_type - - -class UploadChunkRange(Model): - """Information about which portion of the file to upload. - - :param start_position: The start position of the portion of the file. It's - represented by the number of bytes. - :type start_position: str - :param end_position: The end position of the portion of the file. It's - represented by the number of bytes. - :type end_position: str - """ - - _attribute_map = { - 'start_position': {'key': 'StartPosition', 'type': 'str'}, - 'end_position': {'key': 'EndPosition', 'type': 'str'}, - } - - def __init__(self, *, start_position: str=None, end_position: str=None, **kwargs) -> None: - super(UploadChunkRange, self).__init__(**kwargs) - self.start_position = start_position - self.end_position = end_position - - -class UploadSession(Model): - """Information about a image store upload session. - - :param upload_sessions: When querying upload session by upload session ID, - the result contains only one upload session. When querying upload session - by image store relative path, the result might contain multiple upload - sessions. - :type upload_sessions: list[~azure.servicefabric.models.UploadSessionInfo] - """ - - _attribute_map = { - 'upload_sessions': {'key': 'UploadSessions', 'type': '[UploadSessionInfo]'}, - } - - def __init__(self, *, upload_sessions=None, **kwargs) -> None: - super(UploadSession, self).__init__(**kwargs) - self.upload_sessions = upload_sessions - - -class UploadSessionInfo(Model): - """Information about an image store upload session. A session is associated - with a relative path in the image store. - - :param store_relative_path: The remote location within image store. This - path is relative to the image store root. - :type store_relative_path: str - :param session_id: A unique ID of the upload session. A session ID can be - reused only if the session was committed or removed. - :type session_id: str - :param modified_date: The date and time when the upload session was last - modified. - :type modified_date: datetime - :param file_size: The size in bytes of the uploading file. - :type file_size: str - :param expected_ranges: List of chunk ranges that image store has not - received yet. - :type expected_ranges: list[~azure.servicefabric.models.UploadChunkRange] - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'session_id': {'key': 'SessionId', 'type': 'str'}, - 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, - 'file_size': {'key': 'FileSize', 'type': 'str'}, - 'expected_ranges': {'key': 'ExpectedRanges', 'type': '[UploadChunkRange]'}, - } - - def __init__(self, *, store_relative_path: str=None, session_id: str=None, modified_date=None, file_size: str=None, expected_ranges=None, **kwargs) -> None: - super(UploadSessionInfo, self).__init__(**kwargs) - self.store_relative_path = store_relative_path - self.session_id = session_id - self.modified_date = modified_date - self.file_size = file_size - self.expected_ranges = expected_ranges - - -class UsageInfo(Model): - """Information about how much space and how many files in the file system the - ImageStore is using in this category. - - :param used_space: the size of all files in this category - :type used_space: str - :param file_count: the number of all files in this category - :type file_count: str - """ - - _attribute_map = { - 'used_space': {'key': 'UsedSpace', 'type': 'str'}, - 'file_count': {'key': 'FileCount', 'type': 'str'}, - } - - def __init__(self, *, used_space: str=None, file_count: str=None, **kwargs) -> None: - super(UsageInfo, self).__init__(**kwargs) - self.used_space = used_space - self.file_count = file_count - - -class ValidationFailedChaosEvent(ChaosEvent): - """Chaos event corresponding to a failure during validation. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Describes why the ValidationFailedChaosEvent was generated. - This may happen because more than MaxPercentUnhealthyNodes are unhealthy - for more than MaxClusterStabilizationTimeout. This reason will be in the - Reason property of the ValidationFailedChaosEvent as a string. - :type reason: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: - super(ValidationFailedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.reason = reason - self.kind = 'ValidationFailed' - - -class VolumeProviderParametersAzureFile(Model): - """This type describes a volume provided by an Azure Files file share. - - All required parameters must be populated in order to send to Azure. - - :param account_name: Required. Name of the Azure storage account for the - File Share. - :type account_name: str - :param account_key: Access key of the Azure storage account for the File - Share. - :type account_key: str - :param share_name: Required. Name of the Azure Files file share that - provides storage for the volume. - :type share_name: str - """ - - _validation = { - 'account_name': {'required': True}, - 'share_name': {'required': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'account_key': {'key': 'accountKey', 'type': 'str'}, - 'share_name': {'key': 'shareName', 'type': 'str'}, - } - - def __init__(self, *, account_name: str, share_name: str, account_key: str=None, **kwargs) -> None: - super(VolumeProviderParametersAzureFile, self).__init__(**kwargs) - self.account_name = account_name - self.account_key = account_key - self.share_name = share_name - - -class VolumeResourceDescription(Model): - """This type describes a volume resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Volume resource. - :type name: str - :param description: User readable description of the volume. - :type description: str - :ivar status: Status of the volume. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the volume. - :vartype status_details: str - :ivar provider: Required. Provider of the volume. Default value: - "SFAzureFile" . - :vartype provider: str - :param azure_file_parameters: This type describes a volume provided by an - Azure Files file share. - :type azure_file_parameters: - ~azure.servicefabric.models.VolumeProviderParametersAzureFile - """ - - _validation = { - 'name': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'provider': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'provider': {'key': 'properties.provider', 'type': 'str'}, - 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, - } - - provider = "SFAzureFile" - - def __init__(self, *, name: str, description: str=None, azure_file_parameters=None, **kwargs) -> None: - super(VolumeResourceDescription, self).__init__(**kwargs) - self.name = name - self.description = description - self.status = None - self.status_details = None - self.azure_file_parameters = azure_file_parameters - - -class WaitForInbuildReplicaSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the replica build operation to finish. This - indicates that there is a replica that is going through the copy or is - providing data for building another replica. Bring the node down will abort - this copy operation which are typically expensive involving data movements. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, partition_id: str=None, **kwargs) -> None: - super(WaitForInbuildReplicaSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'WaitForInbuildReplica' - - -class WaitForPrimaryPlacementSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the primary replica that was moved out of the - node due to upgrade to be placed back again on that node. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, partition_id: str=None, **kwargs) -> None: - super(WaitForPrimaryPlacementSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'WaitForPrimaryPlacement' - - -class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the primary replica to be moved out of the node - before starting an upgrade to ensure the availability of the primary - replica for the partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, partition_id: str=None, **kwargs) -> None: - super(WaitForPrimarySwapSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'WaitForPrimarySwap' - - -class WaitForReconfigurationSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the current reconfiguration of the partition to - be completed before starting an upgrade. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, partition_id: str=None, **kwargs) -> None: - super(WaitForReconfigurationSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'WaitForReconfiguration' - - -class WaitingChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos is waiting for the - cluster to become ready for faulting, for example, Chaos may be waiting for - the on-going upgrade to finish. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Describes why the WaitingChaosEvent was generated, for - example, due to a cluster upgrade. - :type reason: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: - super(WaitingChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.reason = reason - self.kind = 'Waiting' diff --git a/customSDK/servicefabric/models/aad_metadata.py b/customSDK/servicefabric/models/aad_metadata.py new file mode 100644 index 0000000..2baa5e8 --- /dev/null +++ b/customSDK/servicefabric/models/aad_metadata.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class AadMetadata(Model): + """Azure Active Directory metadata used for secured connection to cluster. + + :param authority: The AAD authority url. + :type authority: str + :param client: The AAD client application Id. + :type client: str + :param cluster: The AAD cluster application Id. + :type cluster: str + :param login: The AAD login url. + :type login: str + :param redirect: The client application redirect address. + :type redirect: str + :param tenant: The AAD tenant Id. + :type tenant: str + """ + + _attribute_map = { + 'authority': {'key': 'authority', 'type': 'str'}, + 'client': {'key': 'client', 'type': 'str'}, + 'cluster': {'key': 'cluster', 'type': 'str'}, + 'login': {'key': 'login', 'type': 'str'}, + 'redirect': {'key': 'redirect', 'type': 'str'}, + 'tenant': {'key': 'tenant', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AadMetadata, self).__init__(**kwargs) + self.authority = kwargs.get('authority', None) + self.client = kwargs.get('client', None) + self.cluster = kwargs.get('cluster', None) + self.login = kwargs.get('login', None) + self.redirect = kwargs.get('redirect', None) + self.tenant = kwargs.get('tenant', None) diff --git a/customSDK/servicefabric/models/aad_metadata_object.py b/customSDK/servicefabric/models/aad_metadata_object.py new file mode 100644 index 0000000..3972df3 --- /dev/null +++ b/customSDK/servicefabric/models/aad_metadata_object.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class AadMetadataObject(Model): + """Azure Active Directory metadata object used for secured connection to + cluster. + + :param type: The client authentication method. + :type type: str + :param metadata: Azure Active Directory metadata used for secured + connection to cluster. + :type metadata: ~azure.servicefabric.models.AadMetadata + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': 'AadMetadata'}, + } + + def __init__(self, **kwargs): + super(AadMetadataObject, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.metadata = kwargs.get('metadata', None) diff --git a/customSDK/servicefabric/models/aad_metadata_object_py3.py b/customSDK/servicefabric/models/aad_metadata_object_py3.py new file mode 100644 index 0000000..0b24eb1 --- /dev/null +++ b/customSDK/servicefabric/models/aad_metadata_object_py3.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class AadMetadataObject(Model): + """Azure Active Directory metadata object used for secured connection to + cluster. + + :param type: The client authentication method. + :type type: str + :param metadata: Azure Active Directory metadata used for secured + connection to cluster. + :type metadata: ~azure.servicefabric.models.AadMetadata + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': 'AadMetadata'}, + } + + def __init__(self, *, type: str=None, metadata=None, **kwargs) -> None: + super(AadMetadataObject, self).__init__(**kwargs) + self.type = type + self.metadata = metadata diff --git a/customSDK/servicefabric/models/aad_metadata_py3.py b/customSDK/servicefabric/models/aad_metadata_py3.py new file mode 100644 index 0000000..868dfea --- /dev/null +++ b/customSDK/servicefabric/models/aad_metadata_py3.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class AadMetadata(Model): + """Azure Active Directory metadata used for secured connection to cluster. + + :param authority: The AAD authority url. + :type authority: str + :param client: The AAD client application Id. + :type client: str + :param cluster: The AAD cluster application Id. + :type cluster: str + :param login: The AAD login url. + :type login: str + :param redirect: The client application redirect address. + :type redirect: str + :param tenant: The AAD tenant Id. + :type tenant: str + """ + + _attribute_map = { + 'authority': {'key': 'authority', 'type': 'str'}, + 'client': {'key': 'client', 'type': 'str'}, + 'cluster': {'key': 'cluster', 'type': 'str'}, + 'login': {'key': 'login', 'type': 'str'}, + 'redirect': {'key': 'redirect', 'type': 'str'}, + 'tenant': {'key': 'tenant', 'type': 'str'}, + } + + def __init__(self, *, authority: str=None, client: str=None, cluster: str=None, login: str=None, redirect: str=None, tenant: str=None, **kwargs) -> None: + super(AadMetadata, self).__init__(**kwargs) + self.authority = authority + self.client = client + self.cluster = cluster + self.login = login + self.redirect = redirect + self.tenant = tenant diff --git a/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism.py b/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism.py new file mode 100644 index 0000000..86905ac --- /dev/null +++ b/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism.py @@ -0,0 +1,53 @@ +# 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 .scaling_mechanism_description import ScalingMechanismDescription + + +class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription): + """Represents a scaling mechanism for adding or removing named partitions of a + stateless service. Partition names are in the format '0','1''N-1'. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param min_partition_count: Required. Minimum number of named partitions + of the service. + :type min_partition_count: int + :param max_partition_count: Required. Maximum number of named partitions + of the service. + :type max_partition_count: int + :param scale_increment: Required. The number of instances to add or remove + during a scaling operation. + :type scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_partition_count': {'required': True}, + 'max_partition_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'}, + 'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'}, + 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs) + self.min_partition_count = kwargs.get('min_partition_count', None) + self.max_partition_count = kwargs.get('max_partition_count', None) + self.scale_increment = kwargs.get('scale_increment', None) + self.kind = 'AddRemoveIncrementalNamedPartition' diff --git a/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism_py3.py b/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism_py3.py new file mode 100644 index 0000000..cf3a473 --- /dev/null +++ b/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism_py3.py @@ -0,0 +1,53 @@ +# 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 .scaling_mechanism_description_py3 import ScalingMechanismDescription + + +class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription): + """Represents a scaling mechanism for adding or removing named partitions of a + stateless service. Partition names are in the format '0','1''N-1'. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param min_partition_count: Required. Minimum number of named partitions + of the service. + :type min_partition_count: int + :param max_partition_count: Required. Maximum number of named partitions + of the service. + :type max_partition_count: int + :param scale_increment: Required. The number of instances to add or remove + during a scaling operation. + :type scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_partition_count': {'required': True}, + 'max_partition_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'}, + 'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'}, + 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, + } + + def __init__(self, *, min_partition_count: int, max_partition_count: int, scale_increment: int, **kwargs) -> None: + super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs) + self.min_partition_count = min_partition_count + self.max_partition_count = max_partition_count + self.scale_increment = scale_increment + self.kind = 'AddRemoveIncrementalNamedPartition' diff --git a/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism.py b/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism.py new file mode 100644 index 0000000..6332ff3 --- /dev/null +++ b/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism.py @@ -0,0 +1,53 @@ +# 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 .auto_scaling_mechanism import AutoScalingMechanism + + +class AddRemoveReplicaScalingMechanism(AutoScalingMechanism): + """Describes the horizontal auto scaling mechanism that adds or removes + replicas (containers or container groups). + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param min_count: Required. Minimum number of containers (scale down won't + be performed below this number). + :type min_count: int + :param max_count: Required. Maximum number of containers (scale up won't + be performed above this number). + :type max_count: int + :param scale_increment: Required. Each time auto scaling is performed, + this number of containers will be added or removed. + :type scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_count': {'required': True}, + 'max_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'scale_increment': {'key': 'scaleIncrement', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AddRemoveReplicaScalingMechanism, self).__init__(**kwargs) + self.min_count = kwargs.get('min_count', None) + self.max_count = kwargs.get('max_count', None) + self.scale_increment = kwargs.get('scale_increment', None) + self.kind = 'AddRemoveReplica' diff --git a/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism_py3.py b/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism_py3.py new file mode 100644 index 0000000..ce862f8 --- /dev/null +++ b/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism_py3.py @@ -0,0 +1,53 @@ +# 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 .auto_scaling_mechanism_py3 import AutoScalingMechanism + + +class AddRemoveReplicaScalingMechanism(AutoScalingMechanism): + """Describes the horizontal auto scaling mechanism that adds or removes + replicas (containers or container groups). + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param min_count: Required. Minimum number of containers (scale down won't + be performed below this number). + :type min_count: int + :param max_count: Required. Maximum number of containers (scale up won't + be performed above this number). + :type max_count: int + :param scale_increment: Required. Each time auto scaling is performed, + this number of containers will be added or removed. + :type scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_count': {'required': True}, + 'max_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'scale_increment': {'key': 'scaleIncrement', 'type': 'int'}, + } + + def __init__(self, *, min_count: int, max_count: int, scale_increment: int, **kwargs) -> None: + super(AddRemoveReplicaScalingMechanism, self).__init__(**kwargs) + self.min_count = min_count + self.max_count = max_count + self.scale_increment = scale_increment + self.kind = 'AddRemoveReplica' diff --git a/customSDK/servicefabric/models/analysis_event_metadata.py b/customSDK/servicefabric/models/analysis_event_metadata.py new file mode 100644 index 0000000..9f249f1 --- /dev/null +++ b/customSDK/servicefabric/models/analysis_event_metadata.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class AnalysisEventMetadata(Model): + """Metadata about an Analysis Event. + + :param delay: The analysis delay. + :type delay: timedelta + :param duration: The duration of analysis. + :type duration: timedelta + """ + + _attribute_map = { + 'delay': {'key': 'Delay', 'type': 'duration'}, + 'duration': {'key': 'Duration', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(AnalysisEventMetadata, self).__init__(**kwargs) + self.delay = kwargs.get('delay', None) + self.duration = kwargs.get('duration', None) diff --git a/customSDK/servicefabric/models/analysis_event_metadata_py3.py b/customSDK/servicefabric/models/analysis_event_metadata_py3.py new file mode 100644 index 0000000..c3615fa --- /dev/null +++ b/customSDK/servicefabric/models/analysis_event_metadata_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class AnalysisEventMetadata(Model): + """Metadata about an Analysis Event. + + :param delay: The analysis delay. + :type delay: timedelta + :param duration: The duration of analysis. + :type duration: timedelta + """ + + _attribute_map = { + 'delay': {'key': 'Delay', 'type': 'duration'}, + 'duration': {'key': 'Duration', 'type': 'duration'}, + } + + def __init__(self, *, delay=None, duration=None, **kwargs) -> None: + super(AnalysisEventMetadata, self).__init__(**kwargs) + self.delay = delay + self.duration = duration diff --git a/customSDK/servicefabric/models/application_backup_configuration_info.py b/customSDK/servicefabric/models/application_backup_configuration_info.py new file mode 100644 index 0000000..43eb607 --- /dev/null +++ b/customSDK/servicefabric/models/application_backup_configuration_info.py @@ -0,0 +1,54 @@ +# 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 .backup_configuration_info import BackupConfigurationInfo + + +class ApplicationBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information for a specific Service Fabric application + specifying what backup policy is being applied and suspend description, if + any. + + All required parameters must be populated in order to send to Azure. + + :param policy_name: The name of the backup policy which is applicable to + this Service Fabric application or service or partition. + :type policy_name: str + :param policy_inherited_from: Specifies the scope at which the backup + policy is applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type policy_inherited_from: str or + ~azure.servicefabric.models.BackupPolicyScope + :param suspension_info: Describes the backup suspension details. + :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :param kind: Required. Constant filled by server. + :type kind: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationBackupConfigurationInfo, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.kind = 'Application' diff --git a/customSDK/servicefabric/models/application_backup_configuration_info_py3.py b/customSDK/servicefabric/models/application_backup_configuration_info_py3.py new file mode 100644 index 0000000..6bbb5ce --- /dev/null +++ b/customSDK/servicefabric/models/application_backup_configuration_info_py3.py @@ -0,0 +1,54 @@ +# 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 .backup_configuration_info_py3 import BackupConfigurationInfo + + +class ApplicationBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information for a specific Service Fabric application + specifying what backup policy is being applied and suspend description, if + any. + + All required parameters must be populated in order to send to Azure. + + :param policy_name: The name of the backup policy which is applicable to + this Service Fabric application or service or partition. + :type policy_name: str + :param policy_inherited_from: Specifies the scope at which the backup + policy is applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type policy_inherited_from: str or + ~azure.servicefabric.models.BackupPolicyScope + :param suspension_info: Describes the backup suspension details. + :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :param kind: Required. Constant filled by server. + :type kind: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, application_name: str=None, **kwargs) -> None: + super(ApplicationBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) + self.application_name = application_name + self.kind = 'Application' diff --git a/customSDK/servicefabric/models/application_backup_entity.py b/customSDK/servicefabric/models/application_backup_entity.py new file mode 100644 index 0000000..ad276a3 --- /dev/null +++ b/customSDK/servicefabric/models/application_backup_entity.py @@ -0,0 +1,39 @@ +# 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 .backup_entity import BackupEntity + + +class ApplicationBackupEntity(BackupEntity): + """Identifies the Service Fabric application which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :param entity_kind: Required. Constant filled by server. + :type entity_kind: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationBackupEntity, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.entity_kind = 'Application' diff --git a/customSDK/servicefabric/models/application_backup_entity_py3.py b/customSDK/servicefabric/models/application_backup_entity_py3.py new file mode 100644 index 0000000..a07dd1d --- /dev/null +++ b/customSDK/servicefabric/models/application_backup_entity_py3.py @@ -0,0 +1,39 @@ +# 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 .backup_entity_py3 import BackupEntity + + +class ApplicationBackupEntity(BackupEntity): + """Identifies the Service Fabric application which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :param entity_kind: Required. Constant filled by server. + :type entity_kind: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__(self, *, application_name: str=None, **kwargs) -> None: + super(ApplicationBackupEntity, self).__init__(**kwargs) + self.application_name = application_name + self.entity_kind = 'Application' diff --git a/customSDK/servicefabric/models/application_capacity_description.py b/customSDK/servicefabric/models/application_capacity_description.py new file mode 100644 index 0000000..79f6f5b --- /dev/null +++ b/customSDK/servicefabric/models/application_capacity_description.py @@ -0,0 +1,58 @@ +# 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 msrest.serialization import Model + + +class ApplicationCapacityDescription(Model): + """Describes capacity information for services of this application. This + description can be used for describing the following. + - Reserving the capacity for the services on the nodes + - Limiting the total number of nodes that services of this application can + run on + - Limiting the custom capacity metrics to limit the total consumption of + this metric by the services of this application. + + :param minimum_nodes: The minimum number of nodes where Service Fabric + will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those + nodes. If this property is set to zero, no capacity will be reserved. The + value of this property cannot be more than the value of the MaximumNodes + property. + :type minimum_nodes: long + :param maximum_nodes: The maximum number of nodes where Service Fabric + will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those + nodes. By default, the value of this property is zero and it means that + the services can be placed on any node. Default value: 0 . + :type maximum_nodes: long + :param application_metrics: List of application capacity metric + description. + :type application_metrics: + list[~azure.servicefabric.models.ApplicationMetricDescription] + """ + + _validation = { + 'minimum_nodes': {'minimum': 0}, + 'maximum_nodes': {'minimum': 0}, + } + + _attribute_map = { + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, + } + + def __init__(self, **kwargs): + super(ApplicationCapacityDescription, self).__init__(**kwargs) + self.minimum_nodes = kwargs.get('minimum_nodes', None) + self.maximum_nodes = kwargs.get('maximum_nodes', 0) + self.application_metrics = kwargs.get('application_metrics', None) diff --git a/customSDK/servicefabric/models/application_capacity_description_py3.py b/customSDK/servicefabric/models/application_capacity_description_py3.py new file mode 100644 index 0000000..dff8cad --- /dev/null +++ b/customSDK/servicefabric/models/application_capacity_description_py3.py @@ -0,0 +1,58 @@ +# 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 msrest.serialization import Model + + +class ApplicationCapacityDescription(Model): + """Describes capacity information for services of this application. This + description can be used for describing the following. + - Reserving the capacity for the services on the nodes + - Limiting the total number of nodes that services of this application can + run on + - Limiting the custom capacity metrics to limit the total consumption of + this metric by the services of this application. + + :param minimum_nodes: The minimum number of nodes where Service Fabric + will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those + nodes. If this property is set to zero, no capacity will be reserved. The + value of this property cannot be more than the value of the MaximumNodes + property. + :type minimum_nodes: long + :param maximum_nodes: The maximum number of nodes where Service Fabric + will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those + nodes. By default, the value of this property is zero and it means that + the services can be placed on any node. Default value: 0 . + :type maximum_nodes: long + :param application_metrics: List of application capacity metric + description. + :type application_metrics: + list[~azure.servicefabric.models.ApplicationMetricDescription] + """ + + _validation = { + 'minimum_nodes': {'minimum': 0}, + 'maximum_nodes': {'minimum': 0}, + } + + _attribute_map = { + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, + } + + def __init__(self, *, minimum_nodes: int=None, maximum_nodes: int=0, application_metrics=None, **kwargs) -> None: + super(ApplicationCapacityDescription, self).__init__(**kwargs) + self.minimum_nodes = minimum_nodes + self.maximum_nodes = maximum_nodes + self.application_metrics = application_metrics diff --git a/customSDK/servicefabric/models/application_container_instance_exited_event.py b/customSDK/servicefabric/models/application_container_instance_exited_event.py new file mode 100644 index 0000000..8556c73 --- /dev/null +++ b/customSDK/servicefabric/models/application_container_instance_exited_event.py @@ -0,0 +1,122 @@ +# 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 .application_event import ApplicationEvent + + +class ApplicationContainerInstanceExitedEvent(ApplicationEvent): + """Container Exited event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param service_name: Required. Name of Service. + :type service_name: str + :param service_package_name: Required. Name of Service package. + :type service_package_name: str + :param service_package_activation_id: Required. Activation Id of Service + package. + :type service_package_activation_id: str + :param is_exclusive: Required. Indicates IsExclusive flag. + :type is_exclusive: bool + :param code_package_name: Required. Name of Code package. + :type code_package_name: str + :param entry_point_type: Required. Type of EntryPoint. + :type entry_point_type: str + :param image_name: Required. Name of Container image. + :type image_name: str + :param container_name: Required. Name of Container. + :type container_name: str + :param host_id: Required. Host Id. + :type host_id: str + :param exit_code: Required. Exit code of process. + :type exit_code: long + :param unexpected_termination: Required. Indicates if termination is + unexpected. + :type unexpected_termination: bool + :param start_time: Required. Start time of process. + :type start_time: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'service_name': {'required': True}, + 'service_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'is_exclusive': {'required': True}, + 'code_package_name': {'required': True}, + 'entry_point_type': {'required': True}, + 'image_name': {'required': True}, + 'container_name': {'required': True}, + 'host_id': {'required': True}, + 'exit_code': {'required': True}, + 'unexpected_termination': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, + 'image_name': {'key': 'ImageName', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + 'host_id': {'key': 'HostId', 'type': 'str'}, + 'exit_code': {'key': 'ExitCode', 'type': 'long'}, + 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ApplicationContainerInstanceExitedEvent, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.service_package_name = kwargs.get('service_package_name', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.is_exclusive = kwargs.get('is_exclusive', None) + self.code_package_name = kwargs.get('code_package_name', None) + self.entry_point_type = kwargs.get('entry_point_type', None) + self.image_name = kwargs.get('image_name', None) + self.container_name = kwargs.get('container_name', None) + self.host_id = kwargs.get('host_id', None) + self.exit_code = kwargs.get('exit_code', None) + self.unexpected_termination = kwargs.get('unexpected_termination', None) + self.start_time = kwargs.get('start_time', None) + self.kind = 'ApplicationContainerInstanceExited' diff --git a/customSDK/servicefabric/models/application_container_instance_exited_event_py3.py b/customSDK/servicefabric/models/application_container_instance_exited_event_py3.py new file mode 100644 index 0000000..0f0451c --- /dev/null +++ b/customSDK/servicefabric/models/application_container_instance_exited_event_py3.py @@ -0,0 +1,122 @@ +# 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 .application_event_py3 import ApplicationEvent + + +class ApplicationContainerInstanceExitedEvent(ApplicationEvent): + """Container Exited event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param service_name: Required. Name of Service. + :type service_name: str + :param service_package_name: Required. Name of Service package. + :type service_package_name: str + :param service_package_activation_id: Required. Activation Id of Service + package. + :type service_package_activation_id: str + :param is_exclusive: Required. Indicates IsExclusive flag. + :type is_exclusive: bool + :param code_package_name: Required. Name of Code package. + :type code_package_name: str + :param entry_point_type: Required. Type of EntryPoint. + :type entry_point_type: str + :param image_name: Required. Name of Container image. + :type image_name: str + :param container_name: Required. Name of Container. + :type container_name: str + :param host_id: Required. Host Id. + :type host_id: str + :param exit_code: Required. Exit code of process. + :type exit_code: long + :param unexpected_termination: Required. Indicates if termination is + unexpected. + :type unexpected_termination: bool + :param start_time: Required. Start time of process. + :type start_time: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'service_name': {'required': True}, + 'service_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'is_exclusive': {'required': True}, + 'code_package_name': {'required': True}, + 'entry_point_type': {'required': True}, + 'image_name': {'required': True}, + 'container_name': {'required': True}, + 'host_id': {'required': True}, + 'exit_code': {'required': True}, + 'unexpected_termination': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, + 'image_name': {'key': 'ImageName', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + 'host_id': {'key': 'HostId', 'type': 'str'}, + 'exit_code': {'key': 'ExitCode', 'type': 'long'}, + 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_name: str, service_package_name: str, service_package_activation_id: str, is_exclusive: bool, code_package_name: str, entry_point_type: str, image_name: str, container_name: str, host_id: str, exit_code: int, unexpected_termination: bool, start_time, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationContainerInstanceExitedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.service_name = service_name + self.service_package_name = service_package_name + self.service_package_activation_id = service_package_activation_id + self.is_exclusive = is_exclusive + self.code_package_name = code_package_name + self.entry_point_type = entry_point_type + self.image_name = image_name + self.container_name = container_name + self.host_id = host_id + self.exit_code = exit_code + self.unexpected_termination = unexpected_termination + self.start_time = start_time + self.kind = 'ApplicationContainerInstanceExited' diff --git a/customSDK/servicefabric/models/application_created_event.py b/customSDK/servicefabric/models/application_created_event.py new file mode 100644 index 0000000..bd190e7 --- /dev/null +++ b/customSDK/servicefabric/models/application_created_event.py @@ -0,0 +1,75 @@ +# 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 .application_event import ApplicationEvent + + +class ApplicationCreatedEvent(ApplicationEvent): + """Application Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param application_type_version: Required. Application type version. + :type application_type_version: str + :param application_definition_kind: Required. Application definition kind. + :type application_definition_kind: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'application_definition_kind': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationCreatedEvent, self).__init__(**kwargs) + self.application_type_name = kwargs.get('application_type_name', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.application_definition_kind = kwargs.get('application_definition_kind', None) + self.kind = 'ApplicationCreated' diff --git a/customSDK/servicefabric/models/application_created_event_py3.py b/customSDK/servicefabric/models/application_created_event_py3.py new file mode 100644 index 0000000..849b60b --- /dev/null +++ b/customSDK/servicefabric/models/application_created_event_py3.py @@ -0,0 +1,75 @@ +# 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 .application_event_py3 import ApplicationEvent + + +class ApplicationCreatedEvent(ApplicationEvent): + """Application Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param application_type_version: Required. Application type version. + :type application_type_version: str + :param application_definition_kind: Required. Application definition kind. + :type application_definition_kind: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'application_definition_kind': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, application_definition_kind: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationCreatedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_type_name = application_type_name + self.application_type_version = application_type_version + self.application_definition_kind = application_definition_kind + self.kind = 'ApplicationCreated' diff --git a/customSDK/servicefabric/models/application_deleted_event.py b/customSDK/servicefabric/models/application_deleted_event.py new file mode 100644 index 0000000..440bd67 --- /dev/null +++ b/customSDK/servicefabric/models/application_deleted_event.py @@ -0,0 +1,70 @@ +# 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 .application_event import ApplicationEvent + + +class ApplicationDeletedEvent(ApplicationEvent): + """Application Deleted event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param application_type_version: Required. Application type version. + :type application_type_version: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationDeletedEvent, self).__init__(**kwargs) + self.application_type_name = kwargs.get('application_type_name', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.kind = 'ApplicationDeleted' diff --git a/customSDK/servicefabric/models/application_deleted_event_py3.py b/customSDK/servicefabric/models/application_deleted_event_py3.py new file mode 100644 index 0000000..b6aba07 --- /dev/null +++ b/customSDK/servicefabric/models/application_deleted_event_py3.py @@ -0,0 +1,70 @@ +# 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 .application_event_py3 import ApplicationEvent + + +class ApplicationDeletedEvent(ApplicationEvent): + """Application Deleted event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param application_type_version: Required. Application type version. + :type application_type_version: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationDeletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_type_name = application_type_name + self.application_type_version = application_type_version + self.kind = 'ApplicationDeleted' diff --git a/customSDK/servicefabric/models/application_description.py b/customSDK/servicefabric/models/application_description.py new file mode 100644 index 0000000..4794af6 --- /dev/null +++ b/customSDK/servicefabric/models/application_description.py @@ -0,0 +1,71 @@ +# 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 msrest.serialization import Model + + +class ApplicationDescription(Model): + """Describes a Service Fabric application. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the application, including the + 'fabric:' URI scheme. + :type name: str + :param type_name: Required. The application type name as defined in the + application manifest. + :type type_name: str + :param type_version: Required. The version of the application type as + defined in the application manifest. + :type type_version: str + :param parameter_list: List of application parameters with overridden + values from their default values specified in the application manifest. + :type parameter_list: + list[~azure.servicefabric.models.ApplicationParameter] + :param application_capacity: Describes capacity information for services + of this application. This description can be used for describing the + following. + - Reserving the capacity for the services on the nodes + - Limiting the total number of nodes that services of this application can + run on + - Limiting the custom capacity metrics to limit the total consumption of + this metric by the services of this application + :type application_capacity: + ~azure.servicefabric.models.ApplicationCapacityDescription + :param managed_application_identity: Managed application identity + description. + :type managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + + _validation = { + 'name': {'required': True}, + 'type_name': {'required': True}, + 'type_version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'type_version': {'key': 'TypeVersion', 'type': 'str'}, + 'parameter_list': {'key': 'ParameterList', 'type': '[ApplicationParameter]'}, + 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'ApplicationCapacityDescription'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + } + + def __init__(self, **kwargs): + super(ApplicationDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type_name = kwargs.get('type_name', None) + self.type_version = kwargs.get('type_version', None) + self.parameter_list = kwargs.get('parameter_list', None) + self.application_capacity = kwargs.get('application_capacity', None) + self.managed_application_identity = kwargs.get('managed_application_identity', None) diff --git a/customSDK/servicefabric/models/application_description_py3.py b/customSDK/servicefabric/models/application_description_py3.py new file mode 100644 index 0000000..0633334 --- /dev/null +++ b/customSDK/servicefabric/models/application_description_py3.py @@ -0,0 +1,71 @@ +# 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 msrest.serialization import Model + + +class ApplicationDescription(Model): + """Describes a Service Fabric application. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the application, including the + 'fabric:' URI scheme. + :type name: str + :param type_name: Required. The application type name as defined in the + application manifest. + :type type_name: str + :param type_version: Required. The version of the application type as + defined in the application manifest. + :type type_version: str + :param parameter_list: List of application parameters with overridden + values from their default values specified in the application manifest. + :type parameter_list: + list[~azure.servicefabric.models.ApplicationParameter] + :param application_capacity: Describes capacity information for services + of this application. This description can be used for describing the + following. + - Reserving the capacity for the services on the nodes + - Limiting the total number of nodes that services of this application can + run on + - Limiting the custom capacity metrics to limit the total consumption of + this metric by the services of this application + :type application_capacity: + ~azure.servicefabric.models.ApplicationCapacityDescription + :param managed_application_identity: Managed application identity + description. + :type managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + + _validation = { + 'name': {'required': True}, + 'type_name': {'required': True}, + 'type_version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'type_version': {'key': 'TypeVersion', 'type': 'str'}, + 'parameter_list': {'key': 'ParameterList', 'type': '[ApplicationParameter]'}, + 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'ApplicationCapacityDescription'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + } + + def __init__(self, *, name: str, type_name: str, type_version: str, parameter_list=None, application_capacity=None, managed_application_identity=None, **kwargs) -> None: + super(ApplicationDescription, self).__init__(**kwargs) + self.name = name + self.type_name = type_name + self.type_version = type_version + self.parameter_list = parameter_list + self.application_capacity = application_capacity + self.managed_application_identity = managed_application_identity diff --git a/customSDK/servicefabric/models/application_event.py b/customSDK/servicefabric/models/application_event.py new file mode 100644 index 0000000..d85913a --- /dev/null +++ b/customSDK/servicefabric/models/application_event.py @@ -0,0 +1,78 @@ +# 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 .fabric_event import FabricEvent + + +class ApplicationEvent(FabricEvent): + """Represents the base for all Application Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationCreatedEvent, ApplicationDeletedEvent, + ApplicationNewHealthReportEvent, ApplicationHealthReportExpiredEvent, + ApplicationUpgradeCompletedEvent, ApplicationUpgradeDomainCompletedEvent, + ApplicationUpgradeRollbackCompletedEvent, + ApplicationUpgradeRollbackStartedEvent, ApplicationUpgradeStartedEvent, + DeployedApplicationNewHealthReportEvent, + DeployedApplicationHealthReportExpiredEvent, ApplicationProcessExitedEvent, + ApplicationContainerInstanceExitedEvent, + DeployedServicePackageNewHealthReportEvent, + DeployedServicePackageHealthReportExpiredEvent, + ChaosCodePackageRestartScheduledEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ApplicationCreated': 'ApplicationCreatedEvent', 'ApplicationDeleted': 'ApplicationDeletedEvent', 'ApplicationNewHealthReport': 'ApplicationNewHealthReportEvent', 'ApplicationHealthReportExpired': 'ApplicationHealthReportExpiredEvent', 'ApplicationUpgradeCompleted': 'ApplicationUpgradeCompletedEvent', 'ApplicationUpgradeDomainCompleted': 'ApplicationUpgradeDomainCompletedEvent', 'ApplicationUpgradeRollbackCompleted': 'ApplicationUpgradeRollbackCompletedEvent', 'ApplicationUpgradeRollbackStarted': 'ApplicationUpgradeRollbackStartedEvent', 'ApplicationUpgradeStarted': 'ApplicationUpgradeStartedEvent', 'DeployedApplicationNewHealthReport': 'DeployedApplicationNewHealthReportEvent', 'DeployedApplicationHealthReportExpired': 'DeployedApplicationHealthReportExpiredEvent', 'ApplicationProcessExited': 'ApplicationProcessExitedEvent', 'ApplicationContainerInstanceExited': 'ApplicationContainerInstanceExitedEvent', 'DeployedServicePackageNewHealthReport': 'DeployedServicePackageNewHealthReportEvent', 'DeployedServicePackageHealthReportExpired': 'DeployedServicePackageHealthReportExpiredEvent', 'ChaosCodePackageRestartScheduled': 'ChaosCodePackageRestartScheduledEvent'} + } + + def __init__(self, **kwargs): + super(ApplicationEvent, self).__init__(**kwargs) + self.application_id = kwargs.get('application_id', None) + self.kind = 'ApplicationEvent' diff --git a/customSDK/servicefabric/models/application_event_py3.py b/customSDK/servicefabric/models/application_event_py3.py new file mode 100644 index 0000000..2383eef --- /dev/null +++ b/customSDK/servicefabric/models/application_event_py3.py @@ -0,0 +1,78 @@ +# 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 .fabric_event_py3 import FabricEvent + + +class ApplicationEvent(FabricEvent): + """Represents the base for all Application Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationCreatedEvent, ApplicationDeletedEvent, + ApplicationNewHealthReportEvent, ApplicationHealthReportExpiredEvent, + ApplicationUpgradeCompletedEvent, ApplicationUpgradeDomainCompletedEvent, + ApplicationUpgradeRollbackCompletedEvent, + ApplicationUpgradeRollbackStartedEvent, ApplicationUpgradeStartedEvent, + DeployedApplicationNewHealthReportEvent, + DeployedApplicationHealthReportExpiredEvent, ApplicationProcessExitedEvent, + ApplicationContainerInstanceExitedEvent, + DeployedServicePackageNewHealthReportEvent, + DeployedServicePackageHealthReportExpiredEvent, + ChaosCodePackageRestartScheduledEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ApplicationCreated': 'ApplicationCreatedEvent', 'ApplicationDeleted': 'ApplicationDeletedEvent', 'ApplicationNewHealthReport': 'ApplicationNewHealthReportEvent', 'ApplicationHealthReportExpired': 'ApplicationHealthReportExpiredEvent', 'ApplicationUpgradeCompleted': 'ApplicationUpgradeCompletedEvent', 'ApplicationUpgradeDomainCompleted': 'ApplicationUpgradeDomainCompletedEvent', 'ApplicationUpgradeRollbackCompleted': 'ApplicationUpgradeRollbackCompletedEvent', 'ApplicationUpgradeRollbackStarted': 'ApplicationUpgradeRollbackStartedEvent', 'ApplicationUpgradeStarted': 'ApplicationUpgradeStartedEvent', 'DeployedApplicationNewHealthReport': 'DeployedApplicationNewHealthReportEvent', 'DeployedApplicationHealthReportExpired': 'DeployedApplicationHealthReportExpiredEvent', 'ApplicationProcessExited': 'ApplicationProcessExitedEvent', 'ApplicationContainerInstanceExited': 'ApplicationContainerInstanceExitedEvent', 'DeployedServicePackageNewHealthReport': 'DeployedServicePackageNewHealthReportEvent', 'DeployedServicePackageHealthReportExpired': 'DeployedServicePackageHealthReportExpiredEvent', 'ChaosCodePackageRestartScheduled': 'ChaosCodePackageRestartScheduledEvent'} + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.application_id = application_id + self.kind = 'ApplicationEvent' diff --git a/customSDK/servicefabric/models/application_health.py b/customSDK/servicefabric/models/application_health.py new file mode 100644 index 0000000..f9e1a37 --- /dev/null +++ b/customSDK/servicefabric/models/application_health.py @@ -0,0 +1,64 @@ +# 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 .entity_health import EntityHealth + + +class ApplicationHealth(EntityHealth): + """Represents the health of the application. Contains the application + aggregated health state and the service and deployed application health + states. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + :param service_health_states: Service health states as found in the health + store. + :type service_health_states: + list[~azure.servicefabric.models.ServiceHealthState] + :param deployed_application_health_states: Deployed application health + states as found in the health store. + :type deployed_application_health_states: + list[~azure.servicefabric.models.DeployedApplicationHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'service_health_states': {'key': 'ServiceHealthStates', 'type': '[ServiceHealthState]'}, + 'deployed_application_health_states': {'key': 'DeployedApplicationHealthStates', 'type': '[DeployedApplicationHealthState]'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealth, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.service_health_states = kwargs.get('service_health_states', None) + self.deployed_application_health_states = kwargs.get('deployed_application_health_states', None) diff --git a/customSDK/servicefabric/models/application_health_evaluation.py b/customSDK/servicefabric/models/application_health_evaluation.py new file mode 100644 index 0000000..edaf4aa --- /dev/null +++ b/customSDK/servicefabric/models/application_health_evaluation.py @@ -0,0 +1,60 @@ +# 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 .health_evaluation import HealthEvaluation + + +class ApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for an application, containing information + about the data and the algorithm used by the health store to evaluate + health. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the application. The types of the + unhealthy evaluations can be DeployedApplicationsHealthEvaluation, + ServicesHealthEvaluation or EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthEvaluation, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Application' diff --git a/customSDK/servicefabric/models/application_health_evaluation_py3.py b/customSDK/servicefabric/models/application_health_evaluation_py3.py new file mode 100644 index 0000000..a0abe47 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_evaluation_py3.py @@ -0,0 +1,60 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class ApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for an application, containing information + about the data and the algorithm used by the health store to evaluate + health. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the application. The types of the + unhealthy evaluations can be DeployedApplicationsHealthEvaluation, + ServicesHealthEvaluation or EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, application_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: + super(ApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.application_name = application_name + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Application' diff --git a/customSDK/servicefabric/models/application_health_policies.py b/customSDK/servicefabric/models/application_health_policies.py new file mode 100644 index 0000000..7eb75f4 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_policies.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class ApplicationHealthPolicies(Model): + """Defines the application health policy map used to evaluate the health of an + application or one of its children entities. + + :param application_health_policy_map: The wrapper that contains the map + with application health policies used to evaluate specific applications in + the cluster. + :type application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthPolicies, self).__init__(**kwargs) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) diff --git a/customSDK/servicefabric/models/application_health_policies_py3.py b/customSDK/servicefabric/models/application_health_policies_py3.py new file mode 100644 index 0000000..0487b4c --- /dev/null +++ b/customSDK/servicefabric/models/application_health_policies_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class ApplicationHealthPolicies(Model): + """Defines the application health policy map used to evaluate the health of an + application or one of its children entities. + + :param application_health_policy_map: The wrapper that contains the map + with application health policies used to evaluate specific applications in + the cluster. + :type application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + } + + def __init__(self, *, application_health_policy_map=None, **kwargs) -> None: + super(ApplicationHealthPolicies, self).__init__(**kwargs) + self.application_health_policy_map = application_health_policy_map diff --git a/customSDK/servicefabric/models/application_health_policy.py b/customSDK/servicefabric/models/application_health_policy.py new file mode 100644 index 0000000..bfdbeb6 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_policy.py @@ -0,0 +1,56 @@ +# 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 msrest.serialization import Model + + +class ApplicationHealthPolicy(Model): + """Defines a health policy used to evaluate the health of an application or + one of its children entities. + + :param consider_warning_as_error: Indicates whether warnings are treated + with the same severity as errors. Default value: False . + :type consider_warning_as_error: bool + :param max_percent_unhealthy_deployed_applications: The maximum allowed + percentage of unhealthy deployed applications. Allowed values are Byte + values from zero to 100. + The percentage represents the maximum tolerated percentage of deployed + applications that can be unhealthy before the application is considered in + error. + This is calculated by dividing the number of unhealthy deployed + applications over the number of nodes where the application is currently + deployed on in the cluster. + The computation rounds up to tolerate one failure on small numbers of + nodes. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_deployed_applications: int + :param default_service_type_health_policy: The health policy used by + default to evaluate the health of a service type. + :type default_service_type_health_policy: + ~azure.servicefabric.models.ServiceTypeHealthPolicy + :param service_type_health_policy_map: The map with service type health + policy per service type name. The map is empty by default. + :type service_type_health_policy_map: + list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem] + """ + + _attribute_map = { + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'default_service_type_health_policy': {'key': 'DefaultServiceTypeHealthPolicy', 'type': 'ServiceTypeHealthPolicy'}, + 'service_type_health_policy_map': {'key': 'ServiceTypeHealthPolicyMap', 'type': '[ServiceTypeHealthPolicyMapItem]'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthPolicy, self).__init__(**kwargs) + self.consider_warning_as_error = kwargs.get('consider_warning_as_error', False) + self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', 0) + self.default_service_type_health_policy = kwargs.get('default_service_type_health_policy', None) + self.service_type_health_policy_map = kwargs.get('service_type_health_policy_map', None) diff --git a/customSDK/servicefabric/models/application_health_policy_map_item.py b/customSDK/servicefabric/models/application_health_policy_map_item.py new file mode 100644 index 0000000..3b1cf59 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_policy_map_item.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class ApplicationHealthPolicyMapItem(Model): + """Defines an item in ApplicationHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the application health policy map item. + This is the name of the application. + :type key: str + :param value: Required. The value of the application health policy map + item. This is the ApplicationHealthPolicy for this application. + :type value: ~azure.servicefabric.models.ApplicationHealthPolicy + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ApplicationHealthPolicy'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthPolicyMapItem, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/application_health_policy_map_item_py3.py b/customSDK/servicefabric/models/application_health_policy_map_item_py3.py new file mode 100644 index 0000000..cb7e5c9 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_policy_map_item_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class ApplicationHealthPolicyMapItem(Model): + """Defines an item in ApplicationHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the application health policy map item. + This is the name of the application. + :type key: str + :param value: Required. The value of the application health policy map + item. This is the ApplicationHealthPolicy for this application. + :type value: ~azure.servicefabric.models.ApplicationHealthPolicy + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ApplicationHealthPolicy'}, + } + + def __init__(self, *, key: str, value, **kwargs) -> None: + super(ApplicationHealthPolicyMapItem, self).__init__(**kwargs) + self.key = key + self.value = value diff --git a/customSDK/servicefabric/models/application_health_policy_map_object.py b/customSDK/servicefabric/models/application_health_policy_map_object.py new file mode 100644 index 0000000..8981ebf --- /dev/null +++ b/customSDK/servicefabric/models/application_health_policy_map_object.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class ApplicationHealthPolicyMapObject(Model): + """Represents the map of application health policies for a ServiceFabric + cluster upgrade. + + :param application_health_policy_map: Defines a map that contains specific + application health policies for different applications. + Each entry specifies as key the application name and as value an + ApplicationHealthPolicy used to evaluate the application health. + If an application is not specified in the map, the application health + evaluation uses the ApplicationHealthPolicy found in its application + manifest or the default application health policy (if no health policy is + defined in the manifest). + The map is empty by default. + :type application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthPolicyMapObject, self).__init__(**kwargs) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) diff --git a/customSDK/servicefabric/models/application_health_policy_map_object_py3.py b/customSDK/servicefabric/models/application_health_policy_map_object_py3.py new file mode 100644 index 0000000..96a95a0 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_policy_map_object_py3.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class ApplicationHealthPolicyMapObject(Model): + """Represents the map of application health policies for a ServiceFabric + cluster upgrade. + + :param application_health_policy_map: Defines a map that contains specific + application health policies for different applications. + Each entry specifies as key the application name and as value an + ApplicationHealthPolicy used to evaluate the application health. + If an application is not specified in the map, the application health + evaluation uses the ApplicationHealthPolicy found in its application + manifest or the default application health policy (if no health policy is + defined in the manifest). + The map is empty by default. + :type application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + } + + def __init__(self, *, application_health_policy_map=None, **kwargs) -> None: + super(ApplicationHealthPolicyMapObject, self).__init__(**kwargs) + self.application_health_policy_map = application_health_policy_map diff --git a/customSDK/servicefabric/models/application_health_policy_py3.py b/customSDK/servicefabric/models/application_health_policy_py3.py new file mode 100644 index 0000000..82e2dca --- /dev/null +++ b/customSDK/servicefabric/models/application_health_policy_py3.py @@ -0,0 +1,56 @@ +# 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 msrest.serialization import Model + + +class ApplicationHealthPolicy(Model): + """Defines a health policy used to evaluate the health of an application or + one of its children entities. + + :param consider_warning_as_error: Indicates whether warnings are treated + with the same severity as errors. Default value: False . + :type consider_warning_as_error: bool + :param max_percent_unhealthy_deployed_applications: The maximum allowed + percentage of unhealthy deployed applications. Allowed values are Byte + values from zero to 100. + The percentage represents the maximum tolerated percentage of deployed + applications that can be unhealthy before the application is considered in + error. + This is calculated by dividing the number of unhealthy deployed + applications over the number of nodes where the application is currently + deployed on in the cluster. + The computation rounds up to tolerate one failure on small numbers of + nodes. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_deployed_applications: int + :param default_service_type_health_policy: The health policy used by + default to evaluate the health of a service type. + :type default_service_type_health_policy: + ~azure.servicefabric.models.ServiceTypeHealthPolicy + :param service_type_health_policy_map: The map with service type health + policy per service type name. The map is empty by default. + :type service_type_health_policy_map: + list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem] + """ + + _attribute_map = { + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'default_service_type_health_policy': {'key': 'DefaultServiceTypeHealthPolicy', 'type': 'ServiceTypeHealthPolicy'}, + 'service_type_health_policy_map': {'key': 'ServiceTypeHealthPolicyMap', 'type': '[ServiceTypeHealthPolicyMapItem]'}, + } + + def __init__(self, *, consider_warning_as_error: bool=False, max_percent_unhealthy_deployed_applications: int=0, default_service_type_health_policy=None, service_type_health_policy_map=None, **kwargs) -> None: + super(ApplicationHealthPolicy, self).__init__(**kwargs) + self.consider_warning_as_error = consider_warning_as_error + self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications + self.default_service_type_health_policy = default_service_type_health_policy + self.service_type_health_policy_map = service_type_health_policy_map diff --git a/customSDK/servicefabric/models/application_health_py3.py b/customSDK/servicefabric/models/application_health_py3.py new file mode 100644 index 0000000..8606c2e --- /dev/null +++ b/customSDK/servicefabric/models/application_health_py3.py @@ -0,0 +1,64 @@ +# 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 .entity_health_py3 import EntityHealth + + +class ApplicationHealth(EntityHealth): + """Represents the health of the application. Contains the application + aggregated health state and the service and deployed application health + states. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + :param service_health_states: Service health states as found in the health + store. + :type service_health_states: + list[~azure.servicefabric.models.ServiceHealthState] + :param deployed_application_health_states: Deployed application health + states as found in the health store. + :type deployed_application_health_states: + list[~azure.servicefabric.models.DeployedApplicationHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'service_health_states': {'key': 'ServiceHealthStates', 'type': '[ServiceHealthState]'}, + 'deployed_application_health_states': {'key': 'DeployedApplicationHealthStates', 'type': '[DeployedApplicationHealthState]'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, service_health_states=None, deployed_application_health_states=None, **kwargs) -> None: + super(ApplicationHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.name = name + self.service_health_states = service_health_states + self.deployed_application_health_states = deployed_application_health_states diff --git a/customSDK/servicefabric/models/application_health_report_expired_event.py b/customSDK/servicefabric/models/application_health_report_expired_event.py new file mode 100644 index 0000000..d2771d1 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_report_expired_event.py @@ -0,0 +1,106 @@ +# 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 .application_event import ApplicationEvent + + +class ApplicationHealthReportExpiredEvent(ApplicationEvent): + """Application Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_instance_id: Required. Id of Application instance. + :type application_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthReportExpiredEvent, self).__init__(**kwargs) + self.application_instance_id = kwargs.get('application_instance_id', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'ApplicationHealthReportExpired' diff --git a/customSDK/servicefabric/models/application_health_report_expired_event_py3.py b/customSDK/servicefabric/models/application_health_report_expired_event_py3.py new file mode 100644 index 0000000..f4beb2c --- /dev/null +++ b/customSDK/servicefabric/models/application_health_report_expired_event_py3.py @@ -0,0 +1,106 @@ +# 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 .application_event_py3 import ApplicationEvent + + +class ApplicationHealthReportExpiredEvent(ApplicationEvent): + """Application Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_instance_id: Required. Id of Application instance. + :type application_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_instance_id = application_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'ApplicationHealthReportExpired' diff --git a/customSDK/servicefabric/models/application_health_state.py b/customSDK/servicefabric/models/application_health_state.py new file mode 100644 index 0000000..ecdb9dc --- /dev/null +++ b/customSDK/servicefabric/models/application_health_state.py @@ -0,0 +1,37 @@ +# 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 .entity_health_state import EntityHealthState + + +class ApplicationHealthState(EntityHealthState): + """Represents the health state of an application, which contains the + application identifier and the aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthState, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/application_health_state_chunk.py b/customSDK/servicefabric/models/application_health_state_chunk.py new file mode 100644 index 0000000..891a562 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_state_chunk.py @@ -0,0 +1,56 @@ +# 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 .entity_health_state_chunk import EntityHealthStateChunk + + +class ApplicationHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a application. + The application health state chunk contains the application name, its + aggregated health state and any children services and deployed applications + that respect the filters in cluster health chunk query description. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param application_type_name: The application type name as defined in the + application manifest. + :type application_type_name: str + :param service_health_state_chunks: The list of service health state + chunks in the cluster that respect the filters in the cluster health chunk + query description. + :type service_health_state_chunks: + ~azure.servicefabric.models.ServiceHealthStateChunkList + :param deployed_application_health_state_chunks: The list of deployed + application health state chunks in the cluster that respect the filters in + the cluster health chunk query description. + :type deployed_application_health_state_chunks: + ~azure.servicefabric.models.DeployedApplicationHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_health_state_chunks': {'key': 'ServiceHealthStateChunks', 'type': 'ServiceHealthStateChunkList'}, + 'deployed_application_health_state_chunks': {'key': 'DeployedApplicationHealthStateChunks', 'type': 'DeployedApplicationHealthStateChunkList'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthStateChunk, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.application_type_name = kwargs.get('application_type_name', None) + self.service_health_state_chunks = kwargs.get('service_health_state_chunks', None) + self.deployed_application_health_state_chunks = kwargs.get('deployed_application_health_state_chunks', None) diff --git a/customSDK/servicefabric/models/application_health_state_chunk_list.py b/customSDK/servicefabric/models/application_health_state_chunk_list.py new file mode 100644 index 0000000..fdd1c44 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_state_chunk_list.py @@ -0,0 +1,35 @@ +# 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 .entity_health_state_chunk_list import EntityHealthStateChunkList + + +class ApplicationHealthStateChunkList(EntityHealthStateChunkList): + """The list of application health state chunks in the cluster that respect the + input filters in the chunk query. Returned by get cluster health state + chunks query. + + :param total_count: Total number of entity health state objects that match + the specified filters from the cluster health chunk query description. + :type total_count: long + :param items: The list of application health state chunks that respect the + input filters in the chunk query. + :type items: list[~azure.servicefabric.models.ApplicationHealthStateChunk] + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'items': {'key': 'Items', 'type': '[ApplicationHealthStateChunk]'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/application_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/application_health_state_chunk_list_py3.py new file mode 100644 index 0000000..dc91419 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_state_chunk_list_py3.py @@ -0,0 +1,35 @@ +# 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 .entity_health_state_chunk_list_py3 import EntityHealthStateChunkList + + +class ApplicationHealthStateChunkList(EntityHealthStateChunkList): + """The list of application health state chunks in the cluster that respect the + input filters in the chunk query. Returned by get cluster health state + chunks query. + + :param total_count: Total number of entity health state objects that match + the specified filters from the cluster health chunk query description. + :type total_count: long + :param items: The list of application health state chunks that respect the + input filters in the chunk query. + :type items: list[~azure.servicefabric.models.ApplicationHealthStateChunk] + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'items': {'key': 'Items', 'type': '[ApplicationHealthStateChunk]'}, + } + + def __init__(self, *, total_count: int=None, items=None, **kwargs) -> None: + super(ApplicationHealthStateChunkList, self).__init__(total_count=total_count, **kwargs) + self.items = items diff --git a/customSDK/servicefabric/models/application_health_state_chunk_py3.py b/customSDK/servicefabric/models/application_health_state_chunk_py3.py new file mode 100644 index 0000000..52afcd5 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_state_chunk_py3.py @@ -0,0 +1,56 @@ +# 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 .entity_health_state_chunk_py3 import EntityHealthStateChunk + + +class ApplicationHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a application. + The application health state chunk contains the application name, its + aggregated health state and any children services and deployed applications + that respect the filters in cluster health chunk query description. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param application_type_name: The application type name as defined in the + application manifest. + :type application_type_name: str + :param service_health_state_chunks: The list of service health state + chunks in the cluster that respect the filters in the cluster health chunk + query description. + :type service_health_state_chunks: + ~azure.servicefabric.models.ServiceHealthStateChunkList + :param deployed_application_health_state_chunks: The list of deployed + application health state chunks in the cluster that respect the filters in + the cluster health chunk query description. + :type deployed_application_health_state_chunks: + ~azure.servicefabric.models.DeployedApplicationHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_health_state_chunks': {'key': 'ServiceHealthStateChunks', 'type': 'ServiceHealthStateChunkList'}, + 'deployed_application_health_state_chunks': {'key': 'DeployedApplicationHealthStateChunks', 'type': 'DeployedApplicationHealthStateChunkList'}, + } + + def __init__(self, *, health_state=None, application_name: str=None, application_type_name: str=None, service_health_state_chunks=None, deployed_application_health_state_chunks=None, **kwargs) -> None: + super(ApplicationHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.application_name = application_name + self.application_type_name = application_type_name + self.service_health_state_chunks = service_health_state_chunks + self.deployed_application_health_state_chunks = deployed_application_health_state_chunks diff --git a/customSDK/servicefabric/models/application_health_state_filter.py b/customSDK/servicefabric/models/application_health_state_filter.py new file mode 100644 index 0000000..3bc1bfb --- /dev/null +++ b/customSDK/servicefabric/models/application_health_state_filter.py @@ -0,0 +1,109 @@ +# 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 msrest.serialization import Model + + +class ApplicationHealthStateFilter(Model): + """Defines matching criteria to determine whether a application should be + included in the cluster health chunk. + One filter can match zero, one or multiple applications, depending on its + properties. + + :param application_name_filter: The name of the application that matches + the filter, as a fabric uri. The filter is applied only to the specified + application, if it exists. + If the application doesn't exist, no application is returned in the + cluster health chunk based on this filter. + If the application exists, it is included in the cluster health chunk if + it respects the other filter properties. + If not specified, all applications are matched against the other filter + members, like health state filter. + :type application_name_filter: str + :param application_type_name_filter: The name of the application type that + matches the filter. + If specified, the filter is applied only to applications of the selected + application type, if any exists. + If no applications of the specified application type exists, no + application is returned in the cluster health chunk based on this filter. + Each application of the specified application type is included in the + cluster health chunk if it respects the other filter properties. + If not specified, all applications are matched against the other filter + members, like health state filter. + :type application_type_name_filter: str + :param health_state_filter: The filter for the health state of the + applications. It allows selecting applications if they match the desired + health states. + The possible values are integer value of one of the following health + states. Only applications that match the filter are returned. All + applications are used to evaluate the cluster aggregated health state. + If not specified, default value is None, unless the application name or + the application type name are specified. If the filter has default value + and application name is specified, the matching application is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches applications with + HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + :param service_filters: Defines a list of filters that specify which + services to be included in the returned cluster health chunk as children + of the application. The services are returned only if the parent + application matches a filter. + If the list is empty, no services are returned. All the services are used + to evaluate the parent application aggregated health state, regardless of + the input filters. + The application filter may specify multiple service filters. + For example, it can specify a filter to return all services with health + state Error and another filter to always include a service identified by + its service name. + :type service_filters: + list[~azure.servicefabric.models.ServiceHealthStateFilter] + :param deployed_application_filters: Defines a list of filters that + specify which deployed applications to be included in the returned cluster + health chunk as children of the application. The deployed applications are + returned only if the parent application matches a filter. + If the list is empty, no deployed applications are returned. All the + deployed applications are used to evaluate the parent application + aggregated health state, regardless of the input filters. + The application filter may specify multiple deployed application filters. + For example, it can specify a filter to return all deployed applications + with health state Error and another filter to always include a deployed + application on a specified node. + :type deployed_application_filters: + list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter] + """ + + _attribute_map = { + 'application_name_filter': {'key': 'ApplicationNameFilter', 'type': 'str'}, + 'application_type_name_filter': {'key': 'ApplicationTypeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'service_filters': {'key': 'ServiceFilters', 'type': '[ServiceHealthStateFilter]'}, + 'deployed_application_filters': {'key': 'DeployedApplicationFilters', 'type': '[DeployedApplicationHealthStateFilter]'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthStateFilter, self).__init__(**kwargs) + self.application_name_filter = kwargs.get('application_name_filter', None) + self.application_type_name_filter = kwargs.get('application_type_name_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) + self.service_filters = kwargs.get('service_filters', None) + self.deployed_application_filters = kwargs.get('deployed_application_filters', None) diff --git a/customSDK/servicefabric/models/application_health_state_filter_py3.py b/customSDK/servicefabric/models/application_health_state_filter_py3.py new file mode 100644 index 0000000..609e919 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_state_filter_py3.py @@ -0,0 +1,109 @@ +# 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 msrest.serialization import Model + + +class ApplicationHealthStateFilter(Model): + """Defines matching criteria to determine whether a application should be + included in the cluster health chunk. + One filter can match zero, one or multiple applications, depending on its + properties. + + :param application_name_filter: The name of the application that matches + the filter, as a fabric uri. The filter is applied only to the specified + application, if it exists. + If the application doesn't exist, no application is returned in the + cluster health chunk based on this filter. + If the application exists, it is included in the cluster health chunk if + it respects the other filter properties. + If not specified, all applications are matched against the other filter + members, like health state filter. + :type application_name_filter: str + :param application_type_name_filter: The name of the application type that + matches the filter. + If specified, the filter is applied only to applications of the selected + application type, if any exists. + If no applications of the specified application type exists, no + application is returned in the cluster health chunk based on this filter. + Each application of the specified application type is included in the + cluster health chunk if it respects the other filter properties. + If not specified, all applications are matched against the other filter + members, like health state filter. + :type application_type_name_filter: str + :param health_state_filter: The filter for the health state of the + applications. It allows selecting applications if they match the desired + health states. + The possible values are integer value of one of the following health + states. Only applications that match the filter are returned. All + applications are used to evaluate the cluster aggregated health state. + If not specified, default value is None, unless the application name or + the application type name are specified. If the filter has default value + and application name is specified, the matching application is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches applications with + HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + :param service_filters: Defines a list of filters that specify which + services to be included in the returned cluster health chunk as children + of the application. The services are returned only if the parent + application matches a filter. + If the list is empty, no services are returned. All the services are used + to evaluate the parent application aggregated health state, regardless of + the input filters. + The application filter may specify multiple service filters. + For example, it can specify a filter to return all services with health + state Error and another filter to always include a service identified by + its service name. + :type service_filters: + list[~azure.servicefabric.models.ServiceHealthStateFilter] + :param deployed_application_filters: Defines a list of filters that + specify which deployed applications to be included in the returned cluster + health chunk as children of the application. The deployed applications are + returned only if the parent application matches a filter. + If the list is empty, no deployed applications are returned. All the + deployed applications are used to evaluate the parent application + aggregated health state, regardless of the input filters. + The application filter may specify multiple deployed application filters. + For example, it can specify a filter to return all deployed applications + with health state Error and another filter to always include a deployed + application on a specified node. + :type deployed_application_filters: + list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter] + """ + + _attribute_map = { + 'application_name_filter': {'key': 'ApplicationNameFilter', 'type': 'str'}, + 'application_type_name_filter': {'key': 'ApplicationTypeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'service_filters': {'key': 'ServiceFilters', 'type': '[ServiceHealthStateFilter]'}, + 'deployed_application_filters': {'key': 'DeployedApplicationFilters', 'type': '[DeployedApplicationHealthStateFilter]'}, + } + + def __init__(self, *, application_name_filter: str=None, application_type_name_filter: str=None, health_state_filter: int=0, service_filters=None, deployed_application_filters=None, **kwargs) -> None: + super(ApplicationHealthStateFilter, self).__init__(**kwargs) + self.application_name_filter = application_name_filter + self.application_type_name_filter = application_type_name_filter + self.health_state_filter = health_state_filter + self.service_filters = service_filters + self.deployed_application_filters = deployed_application_filters diff --git a/customSDK/servicefabric/models/application_health_state_py3.py b/customSDK/servicefabric/models/application_health_state_py3.py new file mode 100644 index 0000000..88480b6 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_state_py3.py @@ -0,0 +1,37 @@ +# 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 .entity_health_state_py3 import EntityHealthState + + +class ApplicationHealthState(EntityHealthState): + """Represents the health state of an application, which contains the + application identifier and the aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, name: str=None, **kwargs) -> None: + super(ApplicationHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.name = name diff --git a/customSDK/servicefabric/models/application_info.py b/customSDK/servicefabric/models/application_info.py new file mode 100644 index 0000000..5d878bc --- /dev/null +++ b/customSDK/servicefabric/models/application_info.py @@ -0,0 +1,78 @@ +# 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 msrest.serialization import Model + + +class ApplicationInfo(Model): + """Information about a Service Fabric application. + + :param id: The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to + identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type id: str + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + :param type_name: The application type name as defined in the application + manifest. + :type type_name: str + :param type_version: The version of the application type as defined in the + application manifest. + :type type_version: str + :param status: The status of the application. Possible values include: + 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :type status: str or ~azure.servicefabric.models.ApplicationStatus + :param parameters: List of application parameters with overridden values + from their default values specified in the application manifest. + :type parameters: list[~azure.servicefabric.models.ApplicationParameter] + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param application_definition_kind: The mechanism used to define a Service + Fabric application. Possible values include: 'Invalid', + 'ServiceFabricApplicationDescription', 'Compose' + :type application_definition_kind: str or + ~azure.servicefabric.models.ApplicationDefinitionKind + :param managed_application_identity: Managed application identity + description. + :type managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'type_version': {'key': 'TypeVersion', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + } + + def __init__(self, **kwargs): + super(ApplicationInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_name = kwargs.get('type_name', None) + self.type_version = kwargs.get('type_version', None) + self.status = kwargs.get('status', None) + self.parameters = kwargs.get('parameters', None) + self.health_state = kwargs.get('health_state', None) + self.application_definition_kind = kwargs.get('application_definition_kind', None) + self.managed_application_identity = kwargs.get('managed_application_identity', None) diff --git a/customSDK/servicefabric/models/application_info_py3.py b/customSDK/servicefabric/models/application_info_py3.py new file mode 100644 index 0000000..6d10783 --- /dev/null +++ b/customSDK/servicefabric/models/application_info_py3.py @@ -0,0 +1,78 @@ +# 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 msrest.serialization import Model + + +class ApplicationInfo(Model): + """Information about a Service Fabric application. + + :param id: The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to + identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type id: str + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + :param type_name: The application type name as defined in the application + manifest. + :type type_name: str + :param type_version: The version of the application type as defined in the + application manifest. + :type type_version: str + :param status: The status of the application. Possible values include: + 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :type status: str or ~azure.servicefabric.models.ApplicationStatus + :param parameters: List of application parameters with overridden values + from their default values specified in the application manifest. + :type parameters: list[~azure.servicefabric.models.ApplicationParameter] + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param application_definition_kind: The mechanism used to define a Service + Fabric application. Possible values include: 'Invalid', + 'ServiceFabricApplicationDescription', 'Compose' + :type application_definition_kind: str or + ~azure.servicefabric.models.ApplicationDefinitionKind + :param managed_application_identity: Managed application identity + description. + :type managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'type_version': {'key': 'TypeVersion', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + } + + def __init__(self, *, id: str=None, name: str=None, type_name: str=None, type_version: str=None, status=None, parameters=None, health_state=None, application_definition_kind=None, managed_application_identity=None, **kwargs) -> None: + super(ApplicationInfo, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_name = type_name + self.type_version = type_version + self.status = status + self.parameters = parameters + self.health_state = health_state + self.application_definition_kind = application_definition_kind + self.managed_application_identity = managed_application_identity diff --git a/customSDK/servicefabric/models/application_load_info.py b/customSDK/servicefabric/models/application_load_info.py new file mode 100644 index 0000000..1df604c --- /dev/null +++ b/customSDK/servicefabric/models/application_load_info.py @@ -0,0 +1,64 @@ +# 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 msrest.serialization import Model + + +class ApplicationLoadInfo(Model): + """Load Information about a Service Fabric application. + + :param id: The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to + identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type id: str + :param minimum_nodes: The minimum number of nodes for this application. + It is the number of nodes where Service Fabric will reserve Capacity in + the cluster which equals to ReservedLoad * MinimumNodes for this + Application instance. + For applications that do not have application capacity defined this value + will be zero. + :type minimum_nodes: long + :param maximum_nodes: The maximum number of nodes where this application + can be instantiated. + It is the number of nodes this application is allowed to span. + For applications that do not have application capacity defined this value + will be zero. + :type maximum_nodes: long + :param node_count: The number of nodes on which this application is + instantiated. + For applications that do not have application capacity defined this value + will be zero. + :type node_count: long + :param application_load_metric_information: List of application load + metric information. + :type application_load_metric_information: + list[~azure.servicefabric.models.ApplicationLoadMetricInformation] + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'node_count': {'key': 'NodeCount', 'type': 'long'}, + 'application_load_metric_information': {'key': 'ApplicationLoadMetricInformation', 'type': '[ApplicationLoadMetricInformation]'}, + } + + def __init__(self, **kwargs): + super(ApplicationLoadInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.minimum_nodes = kwargs.get('minimum_nodes', None) + self.maximum_nodes = kwargs.get('maximum_nodes', None) + self.node_count = kwargs.get('node_count', None) + self.application_load_metric_information = kwargs.get('application_load_metric_information', None) diff --git a/customSDK/servicefabric/models/application_load_info_py3.py b/customSDK/servicefabric/models/application_load_info_py3.py new file mode 100644 index 0000000..25d008d --- /dev/null +++ b/customSDK/servicefabric/models/application_load_info_py3.py @@ -0,0 +1,64 @@ +# 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 msrest.serialization import Model + + +class ApplicationLoadInfo(Model): + """Load Information about a Service Fabric application. + + :param id: The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to + identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type id: str + :param minimum_nodes: The minimum number of nodes for this application. + It is the number of nodes where Service Fabric will reserve Capacity in + the cluster which equals to ReservedLoad * MinimumNodes for this + Application instance. + For applications that do not have application capacity defined this value + will be zero. + :type minimum_nodes: long + :param maximum_nodes: The maximum number of nodes where this application + can be instantiated. + It is the number of nodes this application is allowed to span. + For applications that do not have application capacity defined this value + will be zero. + :type maximum_nodes: long + :param node_count: The number of nodes on which this application is + instantiated. + For applications that do not have application capacity defined this value + will be zero. + :type node_count: long + :param application_load_metric_information: List of application load + metric information. + :type application_load_metric_information: + list[~azure.servicefabric.models.ApplicationLoadMetricInformation] + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'node_count': {'key': 'NodeCount', 'type': 'long'}, + 'application_load_metric_information': {'key': 'ApplicationLoadMetricInformation', 'type': '[ApplicationLoadMetricInformation]'}, + } + + def __init__(self, *, id: str=None, minimum_nodes: int=None, maximum_nodes: int=None, node_count: int=None, application_load_metric_information=None, **kwargs) -> None: + super(ApplicationLoadInfo, self).__init__(**kwargs) + self.id = id + self.minimum_nodes = minimum_nodes + self.maximum_nodes = maximum_nodes + self.node_count = node_count + self.application_load_metric_information = application_load_metric_information diff --git a/customSDK/servicefabric/models/application_load_metric_information.py b/customSDK/servicefabric/models/application_load_metric_information.py new file mode 100644 index 0000000..4ddf4b2 --- /dev/null +++ b/customSDK/servicefabric/models/application_load_metric_information.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class ApplicationLoadMetricInformation(Model): + """Describes load information for a custom resource balancing metric. This can + be used to limit the total consumption of this metric by the services of + this application. + + :param name: The name of the metric. + :type name: str + :param reservation_capacity: This is the capacity reserved in the cluster + for the application. + It's the product of NodeReservationCapacity and MinimumNodes. + If set to zero, no capacity is reserved for this metric. + When setting application capacity or when updating application capacity + this value must be smaller than or equal to MaximumCapacity for each + metric. + :type reservation_capacity: long + :param application_capacity: Total capacity for this metric in this + application instance. + :type application_capacity: long + :param application_load: Current load for this metric in this application + instance. + :type application_load: long + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, + 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'long'}, + 'application_load': {'key': 'ApplicationLoad', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(ApplicationLoadMetricInformation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.reservation_capacity = kwargs.get('reservation_capacity', None) + self.application_capacity = kwargs.get('application_capacity', None) + self.application_load = kwargs.get('application_load', None) diff --git a/customSDK/servicefabric/models/application_load_metric_information_py3.py b/customSDK/servicefabric/models/application_load_metric_information_py3.py new file mode 100644 index 0000000..3214985 --- /dev/null +++ b/customSDK/servicefabric/models/application_load_metric_information_py3.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class ApplicationLoadMetricInformation(Model): + """Describes load information for a custom resource balancing metric. This can + be used to limit the total consumption of this metric by the services of + this application. + + :param name: The name of the metric. + :type name: str + :param reservation_capacity: This is the capacity reserved in the cluster + for the application. + It's the product of NodeReservationCapacity and MinimumNodes. + If set to zero, no capacity is reserved for this metric. + When setting application capacity or when updating application capacity + this value must be smaller than or equal to MaximumCapacity for each + metric. + :type reservation_capacity: long + :param application_capacity: Total capacity for this metric in this + application instance. + :type application_capacity: long + :param application_load: Current load for this metric in this application + instance. + :type application_load: long + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, + 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'long'}, + 'application_load': {'key': 'ApplicationLoad', 'type': 'long'}, + } + + def __init__(self, *, name: str=None, reservation_capacity: int=None, application_capacity: int=None, application_load: int=None, **kwargs) -> None: + super(ApplicationLoadMetricInformation, self).__init__(**kwargs) + self.name = name + self.reservation_capacity = reservation_capacity + self.application_capacity = application_capacity + self.application_load = application_load diff --git a/customSDK/servicefabric/models/application_metric_description.py b/customSDK/servicefabric/models/application_metric_description.py new file mode 100644 index 0000000..314e482 --- /dev/null +++ b/customSDK/servicefabric/models/application_metric_description.py @@ -0,0 +1,70 @@ +# 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 msrest.serialization import Model + + +class ApplicationMetricDescription(Model): + """Describes capacity information for a custom resource balancing metric. This + can be used to limit the total consumption of this metric by the services + of this application. + + :param name: The name of the metric. + :type name: str + :param maximum_capacity: The maximum node capacity for Service Fabric + application. + This is the maximum Load for an instance of this application on a single + node. Even if the capacity of node is greater than this value, Service + Fabric will limit the total load of services within the application on + each node to this value. + If set to zero, capacity for this metric is unlimited on each node. + When creating a new application with application capacity defined, the + product of MaximumNodes and this value must always be smaller than or + equal to TotalApplicationCapacity. + When updating existing application with application capacity, the product + of MaximumNodes and this value must always be smaller than or equal to + TotalApplicationCapacity. + :type maximum_capacity: long + :param reservation_capacity: The node reservation capacity for Service + Fabric application. + This is the amount of load which is reserved on nodes which have instances + of this application. + If MinimumNodes is specified, then the product of these values will be the + capacity reserved in the cluster for the application. + If set to zero, no capacity is reserved for this metric. + When setting application capacity or when updating application capacity; + this value must be smaller than or equal to MaximumCapacity for each + metric. + :type reservation_capacity: long + :param total_application_capacity: The total metric capacity for Service + Fabric application. + This is the total metric capacity for this application in the cluster. + Service Fabric will try to limit the sum of loads of services within the + application to this value. + When creating a new application with application capacity defined, the + product of MaximumNodes and MaximumCapacity must always be smaller than or + equal to this value. + :type total_application_capacity: long + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'maximum_capacity': {'key': 'MaximumCapacity', 'type': 'long'}, + 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, + 'total_application_capacity': {'key': 'TotalApplicationCapacity', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(ApplicationMetricDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.maximum_capacity = kwargs.get('maximum_capacity', None) + self.reservation_capacity = kwargs.get('reservation_capacity', None) + self.total_application_capacity = kwargs.get('total_application_capacity', None) diff --git a/customSDK/servicefabric/models/application_metric_description_py3.py b/customSDK/servicefabric/models/application_metric_description_py3.py new file mode 100644 index 0000000..eb1b103 --- /dev/null +++ b/customSDK/servicefabric/models/application_metric_description_py3.py @@ -0,0 +1,70 @@ +# 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 msrest.serialization import Model + + +class ApplicationMetricDescription(Model): + """Describes capacity information for a custom resource balancing metric. This + can be used to limit the total consumption of this metric by the services + of this application. + + :param name: The name of the metric. + :type name: str + :param maximum_capacity: The maximum node capacity for Service Fabric + application. + This is the maximum Load for an instance of this application on a single + node. Even if the capacity of node is greater than this value, Service + Fabric will limit the total load of services within the application on + each node to this value. + If set to zero, capacity for this metric is unlimited on each node. + When creating a new application with application capacity defined, the + product of MaximumNodes and this value must always be smaller than or + equal to TotalApplicationCapacity. + When updating existing application with application capacity, the product + of MaximumNodes and this value must always be smaller than or equal to + TotalApplicationCapacity. + :type maximum_capacity: long + :param reservation_capacity: The node reservation capacity for Service + Fabric application. + This is the amount of load which is reserved on nodes which have instances + of this application. + If MinimumNodes is specified, then the product of these values will be the + capacity reserved in the cluster for the application. + If set to zero, no capacity is reserved for this metric. + When setting application capacity or when updating application capacity; + this value must be smaller than or equal to MaximumCapacity for each + metric. + :type reservation_capacity: long + :param total_application_capacity: The total metric capacity for Service + Fabric application. + This is the total metric capacity for this application in the cluster. + Service Fabric will try to limit the sum of loads of services within the + application to this value. + When creating a new application with application capacity defined, the + product of MaximumNodes and MaximumCapacity must always be smaller than or + equal to this value. + :type total_application_capacity: long + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'maximum_capacity': {'key': 'MaximumCapacity', 'type': 'long'}, + 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, + 'total_application_capacity': {'key': 'TotalApplicationCapacity', 'type': 'long'}, + } + + def __init__(self, *, name: str=None, maximum_capacity: int=None, reservation_capacity: int=None, total_application_capacity: int=None, **kwargs) -> None: + super(ApplicationMetricDescription, self).__init__(**kwargs) + self.name = name + self.maximum_capacity = maximum_capacity + self.reservation_capacity = reservation_capacity + self.total_application_capacity = total_application_capacity diff --git a/customSDK/servicefabric/models/application_name_info.py b/customSDK/servicefabric/models/application_name_info.py new file mode 100644 index 0000000..072f51f --- /dev/null +++ b/customSDK/servicefabric/models/application_name_info.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class ApplicationNameInfo(Model): + """Information about the application name. + + :param id: The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to + identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type id: str + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationNameInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/application_name_info_py3.py b/customSDK/servicefabric/models/application_name_info_py3.py new file mode 100644 index 0000000..c259456 --- /dev/null +++ b/customSDK/servicefabric/models/application_name_info_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class ApplicationNameInfo(Model): + """Information about the application name. + + :param id: The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to + identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type id: str + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(ApplicationNameInfo, self).__init__(**kwargs) + self.id = id + self.name = name diff --git a/customSDK/servicefabric/models/application_new_health_report_event.py b/customSDK/servicefabric/models/application_new_health_report_event.py new file mode 100644 index 0000000..e45d2b4 --- /dev/null +++ b/customSDK/servicefabric/models/application_new_health_report_event.py @@ -0,0 +1,106 @@ +# 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 .application_event import ApplicationEvent + + +class ApplicationNewHealthReportEvent(ApplicationEvent): + """Application Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_instance_id: Required. Id of Application instance. + :type application_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ApplicationNewHealthReportEvent, self).__init__(**kwargs) + self.application_instance_id = kwargs.get('application_instance_id', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'ApplicationNewHealthReport' diff --git a/customSDK/servicefabric/models/application_new_health_report_event_py3.py b/customSDK/servicefabric/models/application_new_health_report_event_py3.py new file mode 100644 index 0000000..912b7d4 --- /dev/null +++ b/customSDK/servicefabric/models/application_new_health_report_event_py3.py @@ -0,0 +1,106 @@ +# 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 .application_event_py3 import ApplicationEvent + + +class ApplicationNewHealthReportEvent(ApplicationEvent): + """Application Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_instance_id: Required. Id of Application instance. + :type application_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_instance_id = application_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'ApplicationNewHealthReport' diff --git a/customSDK/servicefabric/models/application_parameter.py b/customSDK/servicefabric/models/application_parameter.py new file mode 100644 index 0000000..602c2e6 --- /dev/null +++ b/customSDK/servicefabric/models/application_parameter.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class ApplicationParameter(Model): + """Describes an application parameter override to be applied when creating or + upgrading an application. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The name of the parameter. + :type key: str + :param value: Required. The value of the parameter. + :type value: str + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationParameter, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/application_parameter_py3.py b/customSDK/servicefabric/models/application_parameter_py3.py new file mode 100644 index 0000000..d6d910d --- /dev/null +++ b/customSDK/servicefabric/models/application_parameter_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class ApplicationParameter(Model): + """Describes an application parameter override to be applied when creating or + upgrading an application. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The name of the parameter. + :type key: str + :param value: Required. The value of the parameter. + :type value: str + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + } + + def __init__(self, *, key: str, value: str, **kwargs) -> None: + super(ApplicationParameter, self).__init__(**kwargs) + self.key = key + self.value = value diff --git a/customSDK/servicefabric/models/application_process_exited_event.py b/customSDK/servicefabric/models/application_process_exited_event.py new file mode 100644 index 0000000..56578ff --- /dev/null +++ b/customSDK/servicefabric/models/application_process_exited_event.py @@ -0,0 +1,122 @@ +# 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 .application_event import ApplicationEvent + + +class ApplicationProcessExitedEvent(ApplicationEvent): + """Process Exited event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param service_name: Required. Name of Service. + :type service_name: str + :param service_package_name: Required. Name of Service package. + :type service_package_name: str + :param service_package_activation_id: Required. Activation Id of Service + package. + :type service_package_activation_id: str + :param is_exclusive: Required. Indicates IsExclusive flag. + :type is_exclusive: bool + :param code_package_name: Required. Name of Code package. + :type code_package_name: str + :param entry_point_type: Required. Type of EntryPoint. + :type entry_point_type: str + :param exe_name: Required. Name of executable. + :type exe_name: str + :param process_id: Required. Process Id. + :type process_id: long + :param host_id: Required. Host Id. + :type host_id: str + :param exit_code: Required. Exit code of process. + :type exit_code: long + :param unexpected_termination: Required. Indicates if termination is + unexpected. + :type unexpected_termination: bool + :param start_time: Required. Start time of process. + :type start_time: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'service_name': {'required': True}, + 'service_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'is_exclusive': {'required': True}, + 'code_package_name': {'required': True}, + 'entry_point_type': {'required': True}, + 'exe_name': {'required': True}, + 'process_id': {'required': True}, + 'host_id': {'required': True}, + 'exit_code': {'required': True}, + 'unexpected_termination': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, + 'exe_name': {'key': 'ExeName', 'type': 'str'}, + 'process_id': {'key': 'ProcessId', 'type': 'long'}, + 'host_id': {'key': 'HostId', 'type': 'str'}, + 'exit_code': {'key': 'ExitCode', 'type': 'long'}, + 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ApplicationProcessExitedEvent, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.service_package_name = kwargs.get('service_package_name', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.is_exclusive = kwargs.get('is_exclusive', None) + self.code_package_name = kwargs.get('code_package_name', None) + self.entry_point_type = kwargs.get('entry_point_type', None) + self.exe_name = kwargs.get('exe_name', None) + self.process_id = kwargs.get('process_id', None) + self.host_id = kwargs.get('host_id', None) + self.exit_code = kwargs.get('exit_code', None) + self.unexpected_termination = kwargs.get('unexpected_termination', None) + self.start_time = kwargs.get('start_time', None) + self.kind = 'ApplicationProcessExited' diff --git a/customSDK/servicefabric/models/application_process_exited_event_py3.py b/customSDK/servicefabric/models/application_process_exited_event_py3.py new file mode 100644 index 0000000..26e7215 --- /dev/null +++ b/customSDK/servicefabric/models/application_process_exited_event_py3.py @@ -0,0 +1,122 @@ +# 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 .application_event_py3 import ApplicationEvent + + +class ApplicationProcessExitedEvent(ApplicationEvent): + """Process Exited event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param service_name: Required. Name of Service. + :type service_name: str + :param service_package_name: Required. Name of Service package. + :type service_package_name: str + :param service_package_activation_id: Required. Activation Id of Service + package. + :type service_package_activation_id: str + :param is_exclusive: Required. Indicates IsExclusive flag. + :type is_exclusive: bool + :param code_package_name: Required. Name of Code package. + :type code_package_name: str + :param entry_point_type: Required. Type of EntryPoint. + :type entry_point_type: str + :param exe_name: Required. Name of executable. + :type exe_name: str + :param process_id: Required. Process Id. + :type process_id: long + :param host_id: Required. Host Id. + :type host_id: str + :param exit_code: Required. Exit code of process. + :type exit_code: long + :param unexpected_termination: Required. Indicates if termination is + unexpected. + :type unexpected_termination: bool + :param start_time: Required. Start time of process. + :type start_time: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'service_name': {'required': True}, + 'service_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'is_exclusive': {'required': True}, + 'code_package_name': {'required': True}, + 'entry_point_type': {'required': True}, + 'exe_name': {'required': True}, + 'process_id': {'required': True}, + 'host_id': {'required': True}, + 'exit_code': {'required': True}, + 'unexpected_termination': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, + 'exe_name': {'key': 'ExeName', 'type': 'str'}, + 'process_id': {'key': 'ProcessId', 'type': 'long'}, + 'host_id': {'key': 'HostId', 'type': 'str'}, + 'exit_code': {'key': 'ExitCode', 'type': 'long'}, + 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_name: str, service_package_name: str, service_package_activation_id: str, is_exclusive: bool, code_package_name: str, entry_point_type: str, exe_name: str, process_id: int, host_id: str, exit_code: int, unexpected_termination: bool, start_time, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationProcessExitedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.service_name = service_name + self.service_package_name = service_package_name + self.service_package_activation_id = service_package_activation_id + self.is_exclusive = is_exclusive + self.code_package_name = code_package_name + self.entry_point_type = entry_point_type + self.exe_name = exe_name + self.process_id = process_id + self.host_id = host_id + self.exit_code = exit_code + self.unexpected_termination = unexpected_termination + self.start_time = start_time + self.kind = 'ApplicationProcessExited' diff --git a/customSDK/servicefabric/models/application_resource_description.py b/customSDK/servicefabric/models/application_resource_description.py new file mode 100644 index 0000000..c2d82ac --- /dev/null +++ b/customSDK/servicefabric/models/application_resource_description.py @@ -0,0 +1,93 @@ +# 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 msrest.serialization import Model + + +class ApplicationResourceDescription(Model): + """This type describes a application resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Application resource. + :type name: str + :param description: User readable description of the application. + :type description: str + :param services: Describes the services in the application. This property + is used to create or modify services of the application. On get only the + name of the service is returned. The service description can be obtained + by querying for the service resource. + :type services: + list[~azure.servicefabric.models.ServiceResourceDescription] + :param diagnostics: Describes the diagnostics definition and usage for an + application resource. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsDescription + :param debug_params: Internal - used by Visual Studio to setup the + debugging session on the local development environment. + :type debug_params: str + :ivar service_names: Names of the services in the application. + :vartype service_names: list[str] + :ivar status: Status of the application. Possible values include: + 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the application. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the application's health state is not + 'Ok', this additional details from service fabric Health Manager for the + user to know why the application is marked unhealthy. + :vartype unhealthy_evaluation: str + :param identity: Describes the identity of the application. + :type identity: ~azure.servicefabric.models.IdentityDescription + """ + + _validation = { + 'name': {'required': True}, + 'service_names': {'readonly': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, + 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, + 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityDescription'}, + } + + def __init__(self, **kwargs): + super(ApplicationResourceDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.services = kwargs.get('services', None) + self.diagnostics = kwargs.get('diagnostics', None) + self.debug_params = kwargs.get('debug_params', None) + self.service_names = None + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity = kwargs.get('identity', None) diff --git a/customSDK/servicefabric/models/application_resource_description_py3.py b/customSDK/servicefabric/models/application_resource_description_py3.py new file mode 100644 index 0000000..5ff296a --- /dev/null +++ b/customSDK/servicefabric/models/application_resource_description_py3.py @@ -0,0 +1,93 @@ +# 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 msrest.serialization import Model + + +class ApplicationResourceDescription(Model): + """This type describes a application resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Application resource. + :type name: str + :param description: User readable description of the application. + :type description: str + :param services: Describes the services in the application. This property + is used to create or modify services of the application. On get only the + name of the service is returned. The service description can be obtained + by querying for the service resource. + :type services: + list[~azure.servicefabric.models.ServiceResourceDescription] + :param diagnostics: Describes the diagnostics definition and usage for an + application resource. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsDescription + :param debug_params: Internal - used by Visual Studio to setup the + debugging session on the local development environment. + :type debug_params: str + :ivar service_names: Names of the services in the application. + :vartype service_names: list[str] + :ivar status: Status of the application. Possible values include: + 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the application. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the application's health state is not + 'Ok', this additional details from service fabric Health Manager for the + user to know why the application is marked unhealthy. + :vartype unhealthy_evaluation: str + :param identity: Describes the identity of the application. + :type identity: ~azure.servicefabric.models.IdentityDescription + """ + + _validation = { + 'name': {'required': True}, + 'service_names': {'readonly': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, + 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, + 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityDescription'}, + } + + def __init__(self, *, name: str, description: str=None, services=None, diagnostics=None, debug_params: str=None, identity=None, **kwargs) -> None: + super(ApplicationResourceDescription, self).__init__(**kwargs) + self.name = name + self.description = description + self.services = services + self.diagnostics = diagnostics + self.debug_params = debug_params + self.service_names = None + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity = identity diff --git a/customSDK/servicefabric/models/application_resource_upgrade_progress_info.py b/customSDK/servicefabric/models/application_resource_upgrade_progress_info.py new file mode 100644 index 0000000..5378292 --- /dev/null +++ b/customSDK/servicefabric/models/application_resource_upgrade_progress_info.py @@ -0,0 +1,91 @@ +# 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 msrest.serialization import Model + + +class ApplicationResourceUpgradeProgressInfo(Model): + """This type describes an application resource upgrade. + + :param name: Name of the Application resource. + :type name: str + :param target_application_type_version: The target application version for + the application upgrade. + :type target_application_type_version: str + :param start_timestamp_utc: The estimated UTC datetime when the upgrade + started. + :type start_timestamp_utc: str + :param upgrade_state: The state of the application resource upgrade. + Possible values include: 'Invalid', 'ProvisioningTarget', + 'RollingForward', 'UnprovisioningCurrent', 'CompletedRollforward', + 'RollingBack', 'UnprovisioningTarget', 'CompletedRollback', 'Failed' + :type upgrade_state: str or + ~azure.servicefabric.models.ApplicationResourceUpgradeState + :param percent_completed: The estimated percent of replicas are completed + in the upgrade. + :type percent_completed: str + :param service_upgrade_progress: List of service upgrade progresses. + :type service_upgrade_progress: + list[~azure.servicefabric.models.ServiceUpgradeProgress] + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "Monitored" . + :type rolling_upgrade_mode: str or + ~azure.servicefabric.models.RollingUpgradeMode + :param upgrade_duration: The estimated amount of time that the overall + upgrade elapsed. It is first interpreted as a string representing an ISO + 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. Default value: "PT0H2M0S" . + :type upgrade_duration: str + :param application_upgrade_status_details: Additional detailed information + about the status of the pending upgrade. + :type application_upgrade_status_details: str + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). Default value: 42949672925 . + :type upgrade_replica_set_check_timeout_in_seconds: long + :param failure_timestamp_utc: The estimated UTC datetime when the upgrade + failed and FailureAction was executed. + :type failure_timestamp_utc: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'percent_completed': {'key': 'PercentCompleted', 'type': 'str'}, + 'service_upgrade_progress': {'key': 'ServiceUpgradeProgress', 'type': '[ServiceUpgradeProgress]'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationResourceUpgradeProgressInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.target_application_type_version = kwargs.get('target_application_type_version', None) + self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.percent_completed = kwargs.get('percent_completed', None) + self.service_upgrade_progress = kwargs.get('service_upgrade_progress', None) + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "Monitored") + self.upgrade_duration = kwargs.get('upgrade_duration', "PT0H2M0S") + self.application_upgrade_status_details = kwargs.get('application_upgrade_status_details', None) + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925) + self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) diff --git a/customSDK/servicefabric/models/application_resource_upgrade_progress_info_py3.py b/customSDK/servicefabric/models/application_resource_upgrade_progress_info_py3.py new file mode 100644 index 0000000..8741db8 --- /dev/null +++ b/customSDK/servicefabric/models/application_resource_upgrade_progress_info_py3.py @@ -0,0 +1,91 @@ +# 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 msrest.serialization import Model + + +class ApplicationResourceUpgradeProgressInfo(Model): + """This type describes an application resource upgrade. + + :param name: Name of the Application resource. + :type name: str + :param target_application_type_version: The target application version for + the application upgrade. + :type target_application_type_version: str + :param start_timestamp_utc: The estimated UTC datetime when the upgrade + started. + :type start_timestamp_utc: str + :param upgrade_state: The state of the application resource upgrade. + Possible values include: 'Invalid', 'ProvisioningTarget', + 'RollingForward', 'UnprovisioningCurrent', 'CompletedRollforward', + 'RollingBack', 'UnprovisioningTarget', 'CompletedRollback', 'Failed' + :type upgrade_state: str or + ~azure.servicefabric.models.ApplicationResourceUpgradeState + :param percent_completed: The estimated percent of replicas are completed + in the upgrade. + :type percent_completed: str + :param service_upgrade_progress: List of service upgrade progresses. + :type service_upgrade_progress: + list[~azure.servicefabric.models.ServiceUpgradeProgress] + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "Monitored" . + :type rolling_upgrade_mode: str or + ~azure.servicefabric.models.RollingUpgradeMode + :param upgrade_duration: The estimated amount of time that the overall + upgrade elapsed. It is first interpreted as a string representing an ISO + 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. Default value: "PT0H2M0S" . + :type upgrade_duration: str + :param application_upgrade_status_details: Additional detailed information + about the status of the pending upgrade. + :type application_upgrade_status_details: str + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). Default value: 42949672925 . + :type upgrade_replica_set_check_timeout_in_seconds: long + :param failure_timestamp_utc: The estimated UTC datetime when the upgrade + failed and FailureAction was executed. + :type failure_timestamp_utc: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'percent_completed': {'key': 'PercentCompleted', 'type': 'str'}, + 'service_upgrade_progress': {'key': 'ServiceUpgradeProgress', 'type': '[ServiceUpgradeProgress]'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, target_application_type_version: str=None, start_timestamp_utc: str=None, upgrade_state=None, percent_completed: str=None, service_upgrade_progress=None, rolling_upgrade_mode="Monitored", upgrade_duration: str="PT0H2M0S", application_upgrade_status_details: str=None, upgrade_replica_set_check_timeout_in_seconds: int=42949672925, failure_timestamp_utc: str=None, **kwargs) -> None: + super(ApplicationResourceUpgradeProgressInfo, self).__init__(**kwargs) + self.name = name + self.target_application_type_version = target_application_type_version + self.start_timestamp_utc = start_timestamp_utc + self.upgrade_state = upgrade_state + self.percent_completed = percent_completed + self.service_upgrade_progress = service_upgrade_progress + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_duration = upgrade_duration + self.application_upgrade_status_details = application_upgrade_status_details + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.failure_timestamp_utc = failure_timestamp_utc diff --git a/customSDK/servicefabric/models/application_scoped_volume.py b/customSDK/servicefabric/models/application_scoped_volume.py new file mode 100644 index 0000000..267c4a0 --- /dev/null +++ b/customSDK/servicefabric/models/application_scoped_volume.py @@ -0,0 +1,49 @@ +# 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 .volume_reference import VolumeReference + + +class ApplicationScopedVolume(VolumeReference): + """Describes a volume whose lifetime is scoped to the application's lifetime. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the volume being referenced. + :type name: str + :param read_only: The flag indicating whether the volume is read only. + Default is 'false'. + :type read_only: bool + :param destination_path: Required. The path within the container at which + the volume should be mounted. Only valid path characters are allowed. + :type destination_path: str + :param creation_parameters: Required. Describes parameters for creating + application-scoped volumes. + :type creation_parameters: + ~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters + """ + + _validation = { + 'name': {'required': True}, + 'destination_path': {'required': True}, + 'creation_parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'destination_path': {'key': 'destinationPath', 'type': 'str'}, + 'creation_parameters': {'key': 'creationParameters', 'type': 'ApplicationScopedVolumeCreationParameters'}, + } + + def __init__(self, **kwargs): + super(ApplicationScopedVolume, self).__init__(**kwargs) + self.creation_parameters = kwargs.get('creation_parameters', None) diff --git a/customSDK/servicefabric/models/application_scoped_volume_creation_parameters.py b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters.py new file mode 100644 index 0000000..b55aeb7 --- /dev/null +++ b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class ApplicationScopedVolumeCreationParameters(Model): + """Describes parameters for creating application-scoped volumes. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: + ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk + + All required parameters must be populated in order to send to Azure. + + :param description: User readable description of the volume. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ServiceFabricVolumeDisk': 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk'} + } + + def __init__(self, **kwargs): + super(ApplicationScopedVolumeCreationParameters, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.kind = None diff --git a/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_py3.py b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_py3.py new file mode 100644 index 0000000..27c8018 --- /dev/null +++ b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_py3.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class ApplicationScopedVolumeCreationParameters(Model): + """Describes parameters for creating application-scoped volumes. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: + ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk + + All required parameters must be populated in order to send to Azure. + + :param description: User readable description of the volume. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ServiceFabricVolumeDisk': 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk'} + } + + def __init__(self, *, description: str=None, **kwargs) -> None: + super(ApplicationScopedVolumeCreationParameters, self).__init__(**kwargs) + self.description = description + self.kind = None diff --git a/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk.py b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk.py new file mode 100644 index 0000000..945d283 --- /dev/null +++ b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk.py @@ -0,0 +1,44 @@ +# 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 .application_scoped_volume_creation_parameters import ApplicationScopedVolumeCreationParameters + + +class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk(ApplicationScopedVolumeCreationParameters): + """Describes parameters for creating application-scoped volumes provided by + Service Fabric Volume Disks. + + All required parameters must be populated in order to send to Azure. + + :param description: User readable description of the volume. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param size_disk: Required. Volume size. Possible values include: 'Small', + 'Medium', 'Large' + :type size_disk: str or ~azure.servicefabric.models.SizeTypes + """ + + _validation = { + 'kind': {'required': True}, + 'size_disk': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'size_disk': {'key': 'sizeDisk', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__(**kwargs) + self.size_disk = kwargs.get('size_disk', None) + self.kind = 'ServiceFabricVolumeDisk' diff --git a/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk_py3.py b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk_py3.py new file mode 100644 index 0000000..279e036 --- /dev/null +++ b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk_py3.py @@ -0,0 +1,44 @@ +# 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 .application_scoped_volume_creation_parameters_py3 import ApplicationScopedVolumeCreationParameters + + +class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk(ApplicationScopedVolumeCreationParameters): + """Describes parameters for creating application-scoped volumes provided by + Service Fabric Volume Disks. + + All required parameters must be populated in order to send to Azure. + + :param description: User readable description of the volume. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param size_disk: Required. Volume size. Possible values include: 'Small', + 'Medium', 'Large' + :type size_disk: str or ~azure.servicefabric.models.SizeTypes + """ + + _validation = { + 'kind': {'required': True}, + 'size_disk': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'size_disk': {'key': 'sizeDisk', 'type': 'str'}, + } + + def __init__(self, *, size_disk, description: str=None, **kwargs) -> None: + super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__(description=description, **kwargs) + self.size_disk = size_disk + self.kind = 'ServiceFabricVolumeDisk' diff --git a/customSDK/servicefabric/models/application_scoped_volume_py3.py b/customSDK/servicefabric/models/application_scoped_volume_py3.py new file mode 100644 index 0000000..0c07eaf --- /dev/null +++ b/customSDK/servicefabric/models/application_scoped_volume_py3.py @@ -0,0 +1,49 @@ +# 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 .volume_reference_py3 import VolumeReference + + +class ApplicationScopedVolume(VolumeReference): + """Describes a volume whose lifetime is scoped to the application's lifetime. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the volume being referenced. + :type name: str + :param read_only: The flag indicating whether the volume is read only. + Default is 'false'. + :type read_only: bool + :param destination_path: Required. The path within the container at which + the volume should be mounted. Only valid path characters are allowed. + :type destination_path: str + :param creation_parameters: Required. Describes parameters for creating + application-scoped volumes. + :type creation_parameters: + ~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters + """ + + _validation = { + 'name': {'required': True}, + 'destination_path': {'required': True}, + 'creation_parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'destination_path': {'key': 'destinationPath', 'type': 'str'}, + 'creation_parameters': {'key': 'creationParameters', 'type': 'ApplicationScopedVolumeCreationParameters'}, + } + + def __init__(self, *, name: str, destination_path: str, creation_parameters, read_only: bool=None, **kwargs) -> None: + super(ApplicationScopedVolume, self).__init__(name=name, read_only=read_only, destination_path=destination_path, **kwargs) + self.creation_parameters = creation_parameters diff --git a/customSDK/servicefabric/models/application_type_applications_health_evaluation.py b/customSDK/servicefabric/models/application_type_applications_health_evaluation.py new file mode 100644 index 0000000..7d2f5d2 --- /dev/null +++ b/customSDK/servicefabric/models/application_type_applications_health_evaluation.py @@ -0,0 +1,74 @@ +# 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 .health_evaluation import HealthEvaluation + + +class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for applications of a particular application + type. The application type applications evaluation can be returned when + cluster health evaluation returns unhealthy aggregated health state, either + Error or Warning. It contains health evaluations for each unhealthy + application of the included application type that impacted current + aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param application_type_name: The application type name as defined in the + application manifest. + :type application_type_name: str + :param max_percent_unhealthy_applications: Maximum allowed percentage of + unhealthy applications for the application type, specified as an entry in + ApplicationTypeHealthPolicyMap. + :type max_percent_unhealthy_applications: int + :param total_count: Total number of applications of the application type + found in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + ApplicationHealthEvaluation of this application type that impacted the + aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(ApplicationTypeApplicationsHealthEvaluation, self).__init__(**kwargs) + self.application_type_name = kwargs.get('application_type_name', None) + self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'ApplicationTypeApplications' diff --git a/customSDK/servicefabric/models/application_type_applications_health_evaluation_py3.py b/customSDK/servicefabric/models/application_type_applications_health_evaluation_py3.py new file mode 100644 index 0000000..44ff457 --- /dev/null +++ b/customSDK/servicefabric/models/application_type_applications_health_evaluation_py3.py @@ -0,0 +1,74 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for applications of a particular application + type. The application type applications evaluation can be returned when + cluster health evaluation returns unhealthy aggregated health state, either + Error or Warning. It contains health evaluations for each unhealthy + application of the included application type that impacted current + aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param application_type_name: The application type name as defined in the + application manifest. + :type application_type_name: str + :param max_percent_unhealthy_applications: Maximum allowed percentage of + unhealthy applications for the application type, specified as an entry in + ApplicationTypeHealthPolicyMap. + :type max_percent_unhealthy_applications: int + :param total_count: Total number of applications of the application type + found in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + ApplicationHealthEvaluation of this application type that impacted the + aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, application_type_name: str=None, max_percent_unhealthy_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(ApplicationTypeApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.application_type_name = application_type_name + self.max_percent_unhealthy_applications = max_percent_unhealthy_applications + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'ApplicationTypeApplications' diff --git a/customSDK/servicefabric/models/application_type_health_policy_map_item.py b/customSDK/servicefabric/models/application_type_health_policy_map_item.py new file mode 100644 index 0000000..29b8c66 --- /dev/null +++ b/customSDK/servicefabric/models/application_type_health_policy_map_item.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class ApplicationTypeHealthPolicyMapItem(Model): + """Defines an item in ApplicationTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the application type health policy map + item. This is the name of the application type. + :type key: str + :param value: Required. The value of the application type health policy + map item. + The max percent unhealthy applications allowed for the application type. + Must be between zero and 100. + :type value: int + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ApplicationTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/application_type_health_policy_map_item_py3.py b/customSDK/servicefabric/models/application_type_health_policy_map_item_py3.py new file mode 100644 index 0000000..a964308 --- /dev/null +++ b/customSDK/servicefabric/models/application_type_health_policy_map_item_py3.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class ApplicationTypeHealthPolicyMapItem(Model): + """Defines an item in ApplicationTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the application type health policy map + item. This is the name of the application type. + :type key: str + :param value: Required. The value of the application type health policy + map item. + The max percent unhealthy applications allowed for the application type. + Must be between zero and 100. + :type value: int + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + } + + def __init__(self, *, key: str, value: int, **kwargs) -> None: + super(ApplicationTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = key + self.value = value diff --git a/customSDK/servicefabric/models/application_type_image_store_path.py b/customSDK/servicefabric/models/application_type_image_store_path.py new file mode 100644 index 0000000..8963512 --- /dev/null +++ b/customSDK/servicefabric/models/application_type_image_store_path.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class ApplicationTypeImageStorePath(Model): + """Path description for the application package in the image store specified + during the prior copy operation. + + All required parameters must be populated in order to send to Azure. + + :param application_type_build_path: Required. The relative image store + path to the application package. + :type application_type_build_path: str + """ + + _validation = { + 'application_type_build_path': {'required': True}, + } + + _attribute_map = { + 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationTypeImageStorePath, self).__init__(**kwargs) + self.application_type_build_path = kwargs.get('application_type_build_path', None) diff --git a/customSDK/servicefabric/models/application_type_image_store_path_py3.py b/customSDK/servicefabric/models/application_type_image_store_path_py3.py new file mode 100644 index 0000000..750c366 --- /dev/null +++ b/customSDK/servicefabric/models/application_type_image_store_path_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class ApplicationTypeImageStorePath(Model): + """Path description for the application package in the image store specified + during the prior copy operation. + + All required parameters must be populated in order to send to Azure. + + :param application_type_build_path: Required. The relative image store + path to the application package. + :type application_type_build_path: str + """ + + _validation = { + 'application_type_build_path': {'required': True}, + } + + _attribute_map = { + 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, + } + + def __init__(self, *, application_type_build_path: str, **kwargs) -> None: + super(ApplicationTypeImageStorePath, self).__init__(**kwargs) + self.application_type_build_path = application_type_build_path diff --git a/customSDK/servicefabric/models/application_type_info.py b/customSDK/servicefabric/models/application_type_info.py new file mode 100644 index 0000000..6da4e92 --- /dev/null +++ b/customSDK/servicefabric/models/application_type_info.py @@ -0,0 +1,58 @@ +# 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 msrest.serialization import Model + + +class ApplicationTypeInfo(Model): + """Information about an application type. + + :param name: The application type name as defined in the application + manifest. + :type name: str + :param version: The version of the application type as defined in the + application manifest. + :type version: str + :param default_parameter_list: List of application type parameters that + can be overridden when creating or updating the application. + :type default_parameter_list: + list[~azure.servicefabric.models.ApplicationParameter] + :param status: The status of the application type. Possible values + include: 'Invalid', 'Provisioning', 'Available', 'Unprovisioning', + 'Failed' + :type status: str or ~azure.servicefabric.models.ApplicationTypeStatus + :param status_details: Additional detailed information about the status of + the application type. + :type status_details: str + :param application_type_definition_kind: The mechanism used to define a + Service Fabric application type. Possible values include: 'Invalid', + 'ServiceFabricApplicationPackage', 'Compose' + :type application_type_definition_kind: str or + ~azure.servicefabric.models.ApplicationTypeDefinitionKind + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'default_parameter_list': {'key': 'DefaultParameterList', 'type': '[ApplicationParameter]'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + 'application_type_definition_kind': {'key': 'ApplicationTypeDefinitionKind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationTypeInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + self.default_parameter_list = kwargs.get('default_parameter_list', None) + self.status = kwargs.get('status', None) + self.status_details = kwargs.get('status_details', None) + self.application_type_definition_kind = kwargs.get('application_type_definition_kind', None) diff --git a/customSDK/servicefabric/models/application_type_info_py3.py b/customSDK/servicefabric/models/application_type_info_py3.py new file mode 100644 index 0000000..94b8e1b --- /dev/null +++ b/customSDK/servicefabric/models/application_type_info_py3.py @@ -0,0 +1,58 @@ +# 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 msrest.serialization import Model + + +class ApplicationTypeInfo(Model): + """Information about an application type. + + :param name: The application type name as defined in the application + manifest. + :type name: str + :param version: The version of the application type as defined in the + application manifest. + :type version: str + :param default_parameter_list: List of application type parameters that + can be overridden when creating or updating the application. + :type default_parameter_list: + list[~azure.servicefabric.models.ApplicationParameter] + :param status: The status of the application type. Possible values + include: 'Invalid', 'Provisioning', 'Available', 'Unprovisioning', + 'Failed' + :type status: str or ~azure.servicefabric.models.ApplicationTypeStatus + :param status_details: Additional detailed information about the status of + the application type. + :type status_details: str + :param application_type_definition_kind: The mechanism used to define a + Service Fabric application type. Possible values include: 'Invalid', + 'ServiceFabricApplicationPackage', 'Compose' + :type application_type_definition_kind: str or + ~azure.servicefabric.models.ApplicationTypeDefinitionKind + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'default_parameter_list': {'key': 'DefaultParameterList', 'type': '[ApplicationParameter]'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + 'application_type_definition_kind': {'key': 'ApplicationTypeDefinitionKind', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, version: str=None, default_parameter_list=None, status=None, status_details: str=None, application_type_definition_kind=None, **kwargs) -> None: + super(ApplicationTypeInfo, self).__init__(**kwargs) + self.name = name + self.version = version + self.default_parameter_list = default_parameter_list + self.status = status + self.status_details = status_details + self.application_type_definition_kind = application_type_definition_kind diff --git a/customSDK/servicefabric/models/application_type_manifest.py b/customSDK/servicefabric/models/application_type_manifest.py new file mode 100644 index 0000000..4d55771 --- /dev/null +++ b/customSDK/servicefabric/models/application_type_manifest.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class ApplicationTypeManifest(Model): + """Contains the manifest describing an application type registered in a + Service Fabric cluster. + + :param manifest: The XML manifest as a string. + :type manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationTypeManifest, self).__init__(**kwargs) + self.manifest = kwargs.get('manifest', None) diff --git a/customSDK/servicefabric/models/application_type_manifest_py3.py b/customSDK/servicefabric/models/application_type_manifest_py3.py new file mode 100644 index 0000000..befbb39 --- /dev/null +++ b/customSDK/servicefabric/models/application_type_manifest_py3.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class ApplicationTypeManifest(Model): + """Contains the manifest describing an application type registered in a + Service Fabric cluster. + + :param manifest: The XML manifest as a string. + :type manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__(self, *, manifest: str=None, **kwargs) -> None: + super(ApplicationTypeManifest, self).__init__(**kwargs) + self.manifest = manifest diff --git a/customSDK/servicefabric/models/application_upgrade_completed_event.py b/customSDK/servicefabric/models/application_upgrade_completed_event.py new file mode 100644 index 0000000..ed48f2f --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_completed_event.py @@ -0,0 +1,76 @@ +# 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 .application_event import ApplicationEvent + + +class ApplicationUpgradeCompletedEvent(ApplicationEvent): + """Application Upgrade Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param application_type_version: Required. Application type version. + :type application_type_version: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time + in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpgradeCompletedEvent, self).__init__(**kwargs) + self.application_type_name = kwargs.get('application_type_name', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) + self.kind = 'ApplicationUpgradeCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_completed_event_py3.py b/customSDK/servicefabric/models/application_upgrade_completed_event_py3.py new file mode 100644 index 0000000..d3a3f0a --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_completed_event_py3.py @@ -0,0 +1,76 @@ +# 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 .application_event_py3 import ApplicationEvent + + +class ApplicationUpgradeCompletedEvent(ApplicationEvent): + """Application Upgrade Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param application_type_version: Required. Application type version. + :type application_type_version: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time + in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationUpgradeCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_type_name = application_type_name + self.application_type_version = application_type_version + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + self.kind = 'ApplicationUpgradeCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_description.py b/customSDK/servicefabric/models/application_upgrade_description.py new file mode 100644 index 0000000..d31606c --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_description.py @@ -0,0 +1,124 @@ +# 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 msrest.serialization import Model + + +class ApplicationUpgradeDescription(Model): + """Describes the parameters for an application upgrade. Note that upgrade + description replaces the existing application description. This means that + if the parameters are not specified, the existing parameters on the + applications will be overwritten with the empty parameters list. This would + result in the application using the default value of the parameters from + the application manifest. If you do not want to change any existing + parameter values, please get the application parameters first using the + GetApplicationInfo query and then supply those values as Parameters in this + ApplicationUpgradeDescription. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the target application, including the + 'fabric:' URI scheme. + :type name: str + :param target_application_type_version: Required. The target application + type version (found in the application manifest) for the application + upgrade. + :type target_application_type_version: str + :param parameters: List of application parameters with overridden values + from their default values specified in the application manifest. + :type parameters: list[~azure.servicefabric.models.ApplicationParameter] + :param upgrade_kind: Required. The kind of upgrade out of the following + possible values. Possible values include: 'Invalid', 'Rolling'. Default + value: "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param sort_order: Defines the order in which an upgrade proceeds through + the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', + 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default + value: "Default" . + :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param application_health_policy: Defines a health policy used to evaluate + the health of an application or one of its children entities. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param instance_close_delay_duration_in_seconds: Duration in seconds, to + wait before a stateless instance is closed, to allow the active requests + to drain gracefully. This would be effective when the instance is closing + during the application/cluster + upgrade, only for those instances which have a non-zero delay duration + configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is + 4294967295, which indicates that the behavior will entirely depend on the + delay configured in the stateless service description. + :type instance_close_delay_duration_in_seconds: long + :param managed_application_identity: Managed application identity + description. + :type managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + + _validation = { + 'name': {'required': True}, + 'target_application_type_version': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpgradeDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.target_application_type_version = kwargs.get('target_application_type_version', None) + self.parameters = kwargs.get('parameters', None) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) + self.force_restart = kwargs.get('force_restart', None) + self.sort_order = kwargs.get('sort_order', "Default") + self.monitoring_policy = kwargs.get('monitoring_policy', None) + self.application_health_policy = kwargs.get('application_health_policy', None) + self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', None) + self.managed_application_identity = kwargs.get('managed_application_identity', None) diff --git a/customSDK/servicefabric/models/application_upgrade_description_py3.py b/customSDK/servicefabric/models/application_upgrade_description_py3.py new file mode 100644 index 0000000..93df9f4 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_description_py3.py @@ -0,0 +1,124 @@ +# 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 msrest.serialization import Model + + +class ApplicationUpgradeDescription(Model): + """Describes the parameters for an application upgrade. Note that upgrade + description replaces the existing application description. This means that + if the parameters are not specified, the existing parameters on the + applications will be overwritten with the empty parameters list. This would + result in the application using the default value of the parameters from + the application manifest. If you do not want to change any existing + parameter values, please get the application parameters first using the + GetApplicationInfo query and then supply those values as Parameters in this + ApplicationUpgradeDescription. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the target application, including the + 'fabric:' URI scheme. + :type name: str + :param target_application_type_version: Required. The target application + type version (found in the application manifest) for the application + upgrade. + :type target_application_type_version: str + :param parameters: List of application parameters with overridden values + from their default values specified in the application manifest. + :type parameters: list[~azure.servicefabric.models.ApplicationParameter] + :param upgrade_kind: Required. The kind of upgrade out of the following + possible values. Possible values include: 'Invalid', 'Rolling'. Default + value: "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param sort_order: Defines the order in which an upgrade proceeds through + the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', + 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default + value: "Default" . + :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param application_health_policy: Defines a health policy used to evaluate + the health of an application or one of its children entities. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param instance_close_delay_duration_in_seconds: Duration in seconds, to + wait before a stateless instance is closed, to allow the active requests + to drain gracefully. This would be effective when the instance is closing + during the application/cluster + upgrade, only for those instances which have a non-zero delay duration + configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is + 4294967295, which indicates that the behavior will entirely depend on the + delay configured in the stateless service description. + :type instance_close_delay_duration_in_seconds: long + :param managed_application_identity: Managed application identity + description. + :type managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + + _validation = { + 'name': {'required': True}, + 'target_application_type_version': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + } + + def __init__(self, *, name: str, target_application_type_version: str, parameters=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", monitoring_policy=None, application_health_policy=None, instance_close_delay_duration_in_seconds: int=None, managed_application_identity=None, **kwargs) -> None: + super(ApplicationUpgradeDescription, self).__init__(**kwargs) + self.name = name + self.target_application_type_version = target_application_type_version + self.parameters = parameters + self.upgrade_kind = upgrade_kind + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.force_restart = force_restart + self.sort_order = sort_order + self.monitoring_policy = monitoring_policy + self.application_health_policy = application_health_policy + self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds + self.managed_application_identity = managed_application_identity diff --git a/customSDK/servicefabric/models/application_upgrade_domain_completed_event.py b/customSDK/servicefabric/models/application_upgrade_domain_completed_event.py new file mode 100644 index 0000000..292ec1c --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_domain_completed_event.py @@ -0,0 +1,93 @@ +# 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 .application_event import ApplicationEvent + + +class ApplicationUpgradeDomainCompletedEvent(ApplicationEvent): + """Application Upgrade Domain Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param current_application_type_version: Required. Current Application + type version. + :type current_application_type_version: str + :param application_type_version: Required. Target Application type + version. + :type application_type_version: str + :param upgrade_state: Required. State of upgrade. + :type upgrade_state: str + :param upgrade_domains: Required. Upgrade domains. + :type upgrade_domains: str + :param upgrade_domain_elapsed_time_in_ms: Required. Upgrade time of domain + in milli-seconds. + :type upgrade_domain_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'upgrade_state': {'required': True}, + 'upgrade_domains': {'required': True}, + 'upgrade_domain_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, + 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpgradeDomainCompletedEvent, self).__init__(**kwargs) + self.application_type_name = kwargs.get('application_type_name', None) + self.current_application_type_version = kwargs.get('current_application_type_version', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.upgrade_domains = kwargs.get('upgrade_domains', None) + self.upgrade_domain_elapsed_time_in_ms = kwargs.get('upgrade_domain_elapsed_time_in_ms', None) + self.kind = 'ApplicationUpgradeDomainCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_domain_completed_event_py3.py b/customSDK/servicefabric/models/application_upgrade_domain_completed_event_py3.py new file mode 100644 index 0000000..eb424ea --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_domain_completed_event_py3.py @@ -0,0 +1,93 @@ +# 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 .application_event_py3 import ApplicationEvent + + +class ApplicationUpgradeDomainCompletedEvent(ApplicationEvent): + """Application Upgrade Domain Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param current_application_type_version: Required. Current Application + type version. + :type current_application_type_version: str + :param application_type_version: Required. Target Application type + version. + :type application_type_version: str + :param upgrade_state: Required. State of upgrade. + :type upgrade_state: str + :param upgrade_domains: Required. Upgrade domains. + :type upgrade_domains: str + :param upgrade_domain_elapsed_time_in_ms: Required. Upgrade time of domain + in milli-seconds. + :type upgrade_domain_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'upgrade_state': {'required': True}, + 'upgrade_domains': {'required': True}, + 'upgrade_domain_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, + 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, current_application_type_version: str, application_type_version: str, upgrade_state: str, upgrade_domains: str, upgrade_domain_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationUpgradeDomainCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_type_name = application_type_name + self.current_application_type_version = current_application_type_version + self.application_type_version = application_type_version + self.upgrade_state = upgrade_state + self.upgrade_domains = upgrade_domains + self.upgrade_domain_elapsed_time_in_ms = upgrade_domain_elapsed_time_in_ms + self.kind = 'ApplicationUpgradeDomainCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_progress_info.py b/customSDK/servicefabric/models/application_upgrade_progress_info.py new file mode 100644 index 0000000..4246e25 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_progress_info.py @@ -0,0 +1,125 @@ +# 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 msrest.serialization import Model + + +class ApplicationUpgradeProgressInfo(Model): + """Describes the parameters for an application upgrade. + + :param name: The name of the target application, including the 'fabric:' + URI scheme. + :type name: str + :param type_name: The application type name as defined in the application + manifest. + :type type_name: str + :param target_application_type_version: The target application type + version (found in the application manifest) for the application upgrade. + :type target_application_type_version: str + :param upgrade_domains: List of upgrade domains and their statuses. + :type upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] + :param upgrade_state: The state of the upgrade domain. Possible values + include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', + 'RollingForwardPending', 'RollingForwardInProgress', + 'RollingForwardCompleted', 'Failed' + :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :param next_upgrade_domain: The name of the next upgrade domain to be + processed. + :type next_upgrade_domain: str + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_description: Describes the parameters for an application + upgrade. Note that upgrade description replaces the existing application + description. This means that if the parameters are not specified, the + existing parameters on the applications will be overwritten with the empty + parameters list. This would result in the application using the default + value of the parameters from the application manifest. If you do not want + to change any existing parameter values, please get the application + parameters first using the GetApplicationInfo query and then supply those + values as Parameters in this ApplicationUpgradeDescription. + :type upgrade_description: + ~azure.servicefabric.models.ApplicationUpgradeDescription + :param upgrade_duration_in_milliseconds: The estimated total amount of + time spent processing the overall upgrade. + :type upgrade_duration_in_milliseconds: str + :param upgrade_domain_duration_in_milliseconds: The estimated total amount + of time spent processing the current upgrade domain. + :type upgrade_domain_duration_in_milliseconds: str + :param unhealthy_evaluations: List of health evaluations that resulted in + the current aggregated health state. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param current_upgrade_domain_progress: Information about the current + in-progress upgrade domain. + :type current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :param start_timestamp_utc: The estimated UTC datetime when the upgrade + started. + :type start_timestamp_utc: str + :param failure_timestamp_utc: The estimated UTC datetime when the upgrade + failed and FailureAction was executed. + :type failure_timestamp_utc: str + :param failure_reason: The cause of an upgrade failure that resulted in + FailureAction being executed. Possible values include: 'None', + 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + 'OverallUpgradeTimeout' + :type failure_reason: str or ~azure.servicefabric.models.FailureReason + :param upgrade_domain_progress_at_failure: Information about the upgrade + domain progress at the time of upgrade failure. + :type upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo + :param upgrade_status_details: Additional detailed information about the + status of the pending upgrade. + :type upgrade_status_details: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ApplicationUpgradeDescription'}, + 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, + 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, + 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpgradeProgressInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type_name = kwargs.get('type_name', None) + self.target_application_type_version = kwargs.get('target_application_type_version', None) + self.upgrade_domains = kwargs.get('upgrade_domains', None) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.next_upgrade_domain = kwargs.get('next_upgrade_domain', None) + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_description = kwargs.get('upgrade_description', None) + self.upgrade_duration_in_milliseconds = kwargs.get('upgrade_duration_in_milliseconds', None) + self.upgrade_domain_duration_in_milliseconds = kwargs.get('upgrade_domain_duration_in_milliseconds', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) + self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) + self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) + self.upgrade_status_details = kwargs.get('upgrade_status_details', None) diff --git a/customSDK/servicefabric/models/application_upgrade_progress_info_py3.py b/customSDK/servicefabric/models/application_upgrade_progress_info_py3.py new file mode 100644 index 0000000..eb71121 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_progress_info_py3.py @@ -0,0 +1,125 @@ +# 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 msrest.serialization import Model + + +class ApplicationUpgradeProgressInfo(Model): + """Describes the parameters for an application upgrade. + + :param name: The name of the target application, including the 'fabric:' + URI scheme. + :type name: str + :param type_name: The application type name as defined in the application + manifest. + :type type_name: str + :param target_application_type_version: The target application type + version (found in the application manifest) for the application upgrade. + :type target_application_type_version: str + :param upgrade_domains: List of upgrade domains and their statuses. + :type upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] + :param upgrade_state: The state of the upgrade domain. Possible values + include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', + 'RollingForwardPending', 'RollingForwardInProgress', + 'RollingForwardCompleted', 'Failed' + :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :param next_upgrade_domain: The name of the next upgrade domain to be + processed. + :type next_upgrade_domain: str + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_description: Describes the parameters for an application + upgrade. Note that upgrade description replaces the existing application + description. This means that if the parameters are not specified, the + existing parameters on the applications will be overwritten with the empty + parameters list. This would result in the application using the default + value of the parameters from the application manifest. If you do not want + to change any existing parameter values, please get the application + parameters first using the GetApplicationInfo query and then supply those + values as Parameters in this ApplicationUpgradeDescription. + :type upgrade_description: + ~azure.servicefabric.models.ApplicationUpgradeDescription + :param upgrade_duration_in_milliseconds: The estimated total amount of + time spent processing the overall upgrade. + :type upgrade_duration_in_milliseconds: str + :param upgrade_domain_duration_in_milliseconds: The estimated total amount + of time spent processing the current upgrade domain. + :type upgrade_domain_duration_in_milliseconds: str + :param unhealthy_evaluations: List of health evaluations that resulted in + the current aggregated health state. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param current_upgrade_domain_progress: Information about the current + in-progress upgrade domain. + :type current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :param start_timestamp_utc: The estimated UTC datetime when the upgrade + started. + :type start_timestamp_utc: str + :param failure_timestamp_utc: The estimated UTC datetime when the upgrade + failed and FailureAction was executed. + :type failure_timestamp_utc: str + :param failure_reason: The cause of an upgrade failure that resulted in + FailureAction being executed. Possible values include: 'None', + 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + 'OverallUpgradeTimeout' + :type failure_reason: str or ~azure.servicefabric.models.FailureReason + :param upgrade_domain_progress_at_failure: Information about the upgrade + domain progress at the time of upgrade failure. + :type upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo + :param upgrade_status_details: Additional detailed information about the + status of the pending upgrade. + :type upgrade_status_details: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ApplicationUpgradeDescription'}, + 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, + 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, + 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, type_name: str=None, target_application_type_version: str=None, upgrade_domains=None, upgrade_state=None, next_upgrade_domain: str=None, rolling_upgrade_mode="UnmonitoredAuto", upgrade_description=None, upgrade_duration_in_milliseconds: str=None, upgrade_domain_duration_in_milliseconds: str=None, unhealthy_evaluations=None, current_upgrade_domain_progress=None, start_timestamp_utc: str=None, failure_timestamp_utc: str=None, failure_reason=None, upgrade_domain_progress_at_failure=None, upgrade_status_details: str=None, **kwargs) -> None: + super(ApplicationUpgradeProgressInfo, self).__init__(**kwargs) + self.name = name + self.type_name = type_name + self.target_application_type_version = target_application_type_version + self.upgrade_domains = upgrade_domains + self.upgrade_state = upgrade_state + self.next_upgrade_domain = next_upgrade_domain + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_description = upgrade_description + self.upgrade_duration_in_milliseconds = upgrade_duration_in_milliseconds + self.upgrade_domain_duration_in_milliseconds = upgrade_domain_duration_in_milliseconds + self.unhealthy_evaluations = unhealthy_evaluations + self.current_upgrade_domain_progress = current_upgrade_domain_progress + self.start_timestamp_utc = start_timestamp_utc + self.failure_timestamp_utc = failure_timestamp_utc + self.failure_reason = failure_reason + self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure + self.upgrade_status_details = upgrade_status_details diff --git a/customSDK/servicefabric/models/application_upgrade_rollback_completed_event.py b/customSDK/servicefabric/models/application_upgrade_rollback_completed_event.py new file mode 100644 index 0000000..a28a48a --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_rollback_completed_event.py @@ -0,0 +1,81 @@ +# 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 .application_event import ApplicationEvent + + +class ApplicationUpgradeRollbackCompletedEvent(ApplicationEvent): + """Application Upgrade Rollback Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param application_type_version: Required. Application type version. + :type application_type_version: str + :param failure_reason: Required. Describes reason of failure. + :type failure_reason: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time + in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpgradeRollbackCompletedEvent, self).__init__(**kwargs) + self.application_type_name = kwargs.get('application_type_name', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) + self.kind = 'ApplicationUpgradeRollbackCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_rollback_completed_event_py3.py b/customSDK/servicefabric/models/application_upgrade_rollback_completed_event_py3.py new file mode 100644 index 0000000..2cb37f7 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_rollback_completed_event_py3.py @@ -0,0 +1,81 @@ +# 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 .application_event_py3 import ApplicationEvent + + +class ApplicationUpgradeRollbackCompletedEvent(ApplicationEvent): + """Application Upgrade Rollback Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param application_type_version: Required. Application type version. + :type application_type_version: str + :param failure_reason: Required. Describes reason of failure. + :type failure_reason: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time + in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationUpgradeRollbackCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_type_name = application_type_name + self.application_type_version = application_type_version + self.failure_reason = failure_reason + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + self.kind = 'ApplicationUpgradeRollbackCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_rollback_started_event.py b/customSDK/servicefabric/models/application_upgrade_rollback_started_event.py new file mode 100644 index 0000000..23887af --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_rollback_started_event.py @@ -0,0 +1,88 @@ +# 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 .application_event import ApplicationEvent + + +class ApplicationUpgradeRollbackStartedEvent(ApplicationEvent): + """Application Upgrade Rollback Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param current_application_type_version: Required. Current Application + type version. + :type current_application_type_version: str + :param application_type_version: Required. Target Application type + version. + :type application_type_version: str + :param failure_reason: Required. Describes reason of failure. + :type failure_reason: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time + in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpgradeRollbackStartedEvent, self).__init__(**kwargs) + self.application_type_name = kwargs.get('application_type_name', None) + self.current_application_type_version = kwargs.get('current_application_type_version', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) + self.kind = 'ApplicationUpgradeRollbackStarted' diff --git a/customSDK/servicefabric/models/application_upgrade_rollback_started_event_py3.py b/customSDK/servicefabric/models/application_upgrade_rollback_started_event_py3.py new file mode 100644 index 0000000..95488c5 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_rollback_started_event_py3.py @@ -0,0 +1,88 @@ +# 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 .application_event_py3 import ApplicationEvent + + +class ApplicationUpgradeRollbackStartedEvent(ApplicationEvent): + """Application Upgrade Rollback Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param current_application_type_version: Required. Current Application + type version. + :type current_application_type_version: str + :param application_type_version: Required. Target Application type + version. + :type application_type_version: str + :param failure_reason: Required. Describes reason of failure. + :type failure_reason: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time + in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, current_application_type_version: str, application_type_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationUpgradeRollbackStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_type_name = application_type_name + self.current_application_type_version = current_application_type_version + self.application_type_version = application_type_version + self.failure_reason = failure_reason + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + self.kind = 'ApplicationUpgradeRollbackStarted' diff --git a/customSDK/servicefabric/models/application_upgrade_started_event.py b/customSDK/servicefabric/models/application_upgrade_started_event.py new file mode 100644 index 0000000..4b8254f --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_started_event.py @@ -0,0 +1,92 @@ +# 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 .application_event import ApplicationEvent + + +class ApplicationUpgradeStartedEvent(ApplicationEvent): + """Application Upgrade Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param current_application_type_version: Required. Current Application + type version. + :type current_application_type_version: str + :param application_type_version: Required. Target Application type + version. + :type application_type_version: str + :param upgrade_type: Required. Type of upgrade. + :type upgrade_type: str + :param rolling_upgrade_mode: Required. Mode of upgrade. + :type rolling_upgrade_mode: str + :param failure_action: Required. Action if failed. + :type failure_action: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'upgrade_type': {'required': True}, + 'rolling_upgrade_mode': {'required': True}, + 'failure_action': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpgradeStartedEvent, self).__init__(**kwargs) + self.application_type_name = kwargs.get('application_type_name', None) + self.current_application_type_version = kwargs.get('current_application_type_version', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.upgrade_type = kwargs.get('upgrade_type', None) + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', None) + self.failure_action = kwargs.get('failure_action', None) + self.kind = 'ApplicationUpgradeStarted' diff --git a/customSDK/servicefabric/models/application_upgrade_started_event_py3.py b/customSDK/servicefabric/models/application_upgrade_started_event_py3.py new file mode 100644 index 0000000..aaf80f7 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_started_event_py3.py @@ -0,0 +1,92 @@ +# 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 .application_event_py3 import ApplicationEvent + + +class ApplicationUpgradeStartedEvent(ApplicationEvent): + """Application Upgrade Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param current_application_type_version: Required. Current Application + type version. + :type current_application_type_version: str + :param application_type_version: Required. Target Application type + version. + :type application_type_version: str + :param upgrade_type: Required. Type of upgrade. + :type upgrade_type: str + :param rolling_upgrade_mode: Required. Mode of upgrade. + :type rolling_upgrade_mode: str + :param failure_action: Required. Action if failed. + :type failure_action: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'upgrade_type': {'required': True}, + 'rolling_upgrade_mode': {'required': True}, + 'failure_action': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, current_application_type_version: str, application_type_version: str, upgrade_type: str, rolling_upgrade_mode: str, failure_action: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationUpgradeStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_type_name = application_type_name + self.current_application_type_version = current_application_type_version + self.application_type_version = application_type_version + self.upgrade_type = upgrade_type + self.rolling_upgrade_mode = rolling_upgrade_mode + self.failure_action = failure_action + self.kind = 'ApplicationUpgradeStarted' diff --git a/customSDK/servicefabric/models/application_upgrade_update_description.py b/customSDK/servicefabric/models/application_upgrade_update_description.py new file mode 100644 index 0000000..b3944cc --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_update_description.py @@ -0,0 +1,54 @@ +# 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 msrest.serialization import Model + + +class ApplicationUpgradeUpdateDescription(Model): + """Describes the parameters for updating an ongoing application upgrade. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the application, including the + 'fabric:' URI scheme. + :type name: str + :param upgrade_kind: Required. The kind of upgrade out of the following + possible values. Possible values include: 'Invalid', 'Rolling'. Default + value: "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param application_health_policy: Defines a health policy used to evaluate + the health of an application or one of its children entities. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param update_description: Describes the parameters for updating a rolling + upgrade of application or cluster. + :type update_description: + ~azure.servicefabric.models.RollingUpgradeUpdateDescription + """ + + _validation = { + 'name': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpgradeUpdateDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.application_health_policy = kwargs.get('application_health_policy', None) + self.update_description = kwargs.get('update_description', None) diff --git a/customSDK/servicefabric/models/application_upgrade_update_description_py3.py b/customSDK/servicefabric/models/application_upgrade_update_description_py3.py new file mode 100644 index 0000000..9eb3ae5 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_update_description_py3.py @@ -0,0 +1,54 @@ +# 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 msrest.serialization import Model + + +class ApplicationUpgradeUpdateDescription(Model): + """Describes the parameters for updating an ongoing application upgrade. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the application, including the + 'fabric:' URI scheme. + :type name: str + :param upgrade_kind: Required. The kind of upgrade out of the following + possible values. Possible values include: 'Invalid', 'Rolling'. Default + value: "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param application_health_policy: Defines a health policy used to evaluate + the health of an application or one of its children entities. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param update_description: Describes the parameters for updating a rolling + upgrade of application or cluster. + :type update_description: + ~azure.servicefabric.models.RollingUpgradeUpdateDescription + """ + + _validation = { + 'name': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, + } + + def __init__(self, *, name: str, upgrade_kind="Rolling", application_health_policy=None, update_description=None, **kwargs) -> None: + super(ApplicationUpgradeUpdateDescription, self).__init__(**kwargs) + self.name = name + self.upgrade_kind = upgrade_kind + self.application_health_policy = application_health_policy + self.update_description = update_description diff --git a/customSDK/servicefabric/models/applications_health_evaluation.py b/customSDK/servicefabric/models/applications_health_evaluation.py new file mode 100644 index 0000000..65b925b --- /dev/null +++ b/customSDK/servicefabric/models/applications_health_evaluation.py @@ -0,0 +1,63 @@ +# 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 .health_evaluation import HealthEvaluation + + +class ApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for applications, containing health + evaluations for each unhealthy application that impacted current aggregated + health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_applications: Maximum allowed percentage of + unhealthy applications from the ClusterHealthPolicy. + :type max_percent_unhealthy_applications: int + :param total_count: Total number of applications from the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + ApplicationHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(ApplicationsHealthEvaluation, self).__init__(**kwargs) + self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Applications' diff --git a/customSDK/servicefabric/models/applications_health_evaluation_py3.py b/customSDK/servicefabric/models/applications_health_evaluation_py3.py new file mode 100644 index 0000000..26ab144 --- /dev/null +++ b/customSDK/servicefabric/models/applications_health_evaluation_py3.py @@ -0,0 +1,63 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class ApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for applications, containing health + evaluations for each unhealthy application that impacted current aggregated + health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_applications: Maximum allowed percentage of + unhealthy applications from the ClusterHealthPolicy. + :type max_percent_unhealthy_applications: int + :param total_count: Total number of applications from the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + ApplicationHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(ApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.max_percent_unhealthy_applications = max_percent_unhealthy_applications + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Applications' diff --git a/customSDK/servicefabric/models/auto_scaling_mechanism.py b/customSDK/servicefabric/models/auto_scaling_mechanism.py new file mode 100644 index 0000000..474bcd9 --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_mechanism.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class AutoScalingMechanism(Model): + """Describes the mechanism for performing auto scaling operation. Derived + classes will describe the actual mechanism. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddRemoveReplicaScalingMechanism + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AddRemoveReplica': 'AddRemoveReplicaScalingMechanism'} + } + + def __init__(self, **kwargs): + super(AutoScalingMechanism, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/auto_scaling_mechanism_py3.py b/customSDK/servicefabric/models/auto_scaling_mechanism_py3.py new file mode 100644 index 0000000..69129cb --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_mechanism_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class AutoScalingMechanism(Model): + """Describes the mechanism for performing auto scaling operation. Derived + classes will describe the actual mechanism. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddRemoveReplicaScalingMechanism + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AddRemoveReplica': 'AddRemoveReplicaScalingMechanism'} + } + + def __init__(self, **kwargs) -> None: + super(AutoScalingMechanism, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/auto_scaling_metric.py b/customSDK/servicefabric/models/auto_scaling_metric.py new file mode 100644 index 0000000..c100d3c --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_metric.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class AutoScalingMetric(Model): + """Describes the metric that is used for triggering auto scaling operation. + Derived classes will describe resources or metrics. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AutoScalingResourceMetric + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Resource': 'AutoScalingResourceMetric'} + } + + def __init__(self, **kwargs): + super(AutoScalingMetric, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/auto_scaling_metric_py3.py b/customSDK/servicefabric/models/auto_scaling_metric_py3.py new file mode 100644 index 0000000..dd68e4e --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_metric_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class AutoScalingMetric(Model): + """Describes the metric that is used for triggering auto scaling operation. + Derived classes will describe resources or metrics. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AutoScalingResourceMetric + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Resource': 'AutoScalingResourceMetric'} + } + + def __init__(self, **kwargs) -> None: + super(AutoScalingMetric, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/auto_scaling_policy.py b/customSDK/servicefabric/models/auto_scaling_policy.py new file mode 100644 index 0000000..764f790 --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_policy.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class AutoScalingPolicy(Model): + """Describes the auto scaling policy. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the auto scaling policy. + :type name: str + :param trigger: Required. Determines when auto scaling operation will be + invoked. + :type trigger: ~azure.servicefabric.models.AutoScalingTrigger + :param mechanism: Required. The mechanism that is used to scale when auto + scaling operation is invoked. + :type mechanism: ~azure.servicefabric.models.AutoScalingMechanism + """ + + _validation = { + 'name': {'required': True}, + 'trigger': {'required': True}, + 'mechanism': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'trigger': {'key': 'trigger', 'type': 'AutoScalingTrigger'}, + 'mechanism': {'key': 'mechanism', 'type': 'AutoScalingMechanism'}, + } + + def __init__(self, **kwargs): + super(AutoScalingPolicy, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.trigger = kwargs.get('trigger', None) + self.mechanism = kwargs.get('mechanism', None) diff --git a/customSDK/servicefabric/models/auto_scaling_policy_py3.py b/customSDK/servicefabric/models/auto_scaling_policy_py3.py new file mode 100644 index 0000000..292c0fd --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_policy_py3.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class AutoScalingPolicy(Model): + """Describes the auto scaling policy. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the auto scaling policy. + :type name: str + :param trigger: Required. Determines when auto scaling operation will be + invoked. + :type trigger: ~azure.servicefabric.models.AutoScalingTrigger + :param mechanism: Required. The mechanism that is used to scale when auto + scaling operation is invoked. + :type mechanism: ~azure.servicefabric.models.AutoScalingMechanism + """ + + _validation = { + 'name': {'required': True}, + 'trigger': {'required': True}, + 'mechanism': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'trigger': {'key': 'trigger', 'type': 'AutoScalingTrigger'}, + 'mechanism': {'key': 'mechanism', 'type': 'AutoScalingMechanism'}, + } + + def __init__(self, *, name: str, trigger, mechanism, **kwargs) -> None: + super(AutoScalingPolicy, self).__init__(**kwargs) + self.name = name + self.trigger = trigger + self.mechanism = mechanism diff --git a/customSDK/servicefabric/models/auto_scaling_resource_metric.py b/customSDK/servicefabric/models/auto_scaling_resource_metric.py new file mode 100644 index 0000000..f853bf8 --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_resource_metric.py @@ -0,0 +1,41 @@ +# 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 .auto_scaling_metric import AutoScalingMetric + + +class AutoScalingResourceMetric(AutoScalingMetric): + """Describes the resource that is used for triggering auto scaling. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param name: Required. Name of the resource. Possible values include: + 'cpu', 'memoryInGB' + :type name: str or + ~azure.servicefabric.models.AutoScalingResourceMetricName + """ + + _validation = { + 'kind': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutoScalingResourceMetric, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.kind = 'Resource' diff --git a/customSDK/servicefabric/models/auto_scaling_resource_metric_py3.py b/customSDK/servicefabric/models/auto_scaling_resource_metric_py3.py new file mode 100644 index 0000000..ad6ea3f --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_resource_metric_py3.py @@ -0,0 +1,41 @@ +# 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 .auto_scaling_metric_py3 import AutoScalingMetric + + +class AutoScalingResourceMetric(AutoScalingMetric): + """Describes the resource that is used for triggering auto scaling. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param name: Required. Name of the resource. Possible values include: + 'cpu', 'memoryInGB' + :type name: str or + ~azure.servicefabric.models.AutoScalingResourceMetricName + """ + + _validation = { + 'kind': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name, **kwargs) -> None: + super(AutoScalingResourceMetric, self).__init__(**kwargs) + self.name = name + self.kind = 'Resource' diff --git a/customSDK/servicefabric/models/auto_scaling_trigger.py b/customSDK/servicefabric/models/auto_scaling_trigger.py new file mode 100644 index 0000000..b375454 --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_trigger.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class AutoScalingTrigger(Model): + """Describes the trigger for performing auto scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AverageLoadScalingTrigger + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AverageLoad': 'AverageLoadScalingTrigger'} + } + + def __init__(self, **kwargs): + super(AutoScalingTrigger, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/auto_scaling_trigger_py3.py b/customSDK/servicefabric/models/auto_scaling_trigger_py3.py new file mode 100644 index 0000000..cbf4335 --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_trigger_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class AutoScalingTrigger(Model): + """Describes the trigger for performing auto scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AverageLoadScalingTrigger + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AverageLoad': 'AverageLoadScalingTrigger'} + } + + def __init__(self, **kwargs) -> None: + super(AutoScalingTrigger, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/average_load_scaling_trigger.py b/customSDK/servicefabric/models/average_load_scaling_trigger.py new file mode 100644 index 0000000..975597b --- /dev/null +++ b/customSDK/servicefabric/models/average_load_scaling_trigger.py @@ -0,0 +1,58 @@ +# 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 .auto_scaling_trigger import AutoScalingTrigger + + +class AverageLoadScalingTrigger(AutoScalingTrigger): + """Describes the average load trigger used for auto scaling. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param metric: Required. Description of the metric that is used for + scaling. + :type metric: ~azure.servicefabric.models.AutoScalingMetric + :param lower_load_threshold: Required. Lower load threshold (if average + load is below this threshold, service will scale down). + :type lower_load_threshold: float + :param upper_load_threshold: Required. Upper load threshold (if average + load is above this threshold, service will scale up). + :type upper_load_threshold: float + :param scale_interval_in_seconds: Required. Scale interval that indicates + how often will this trigger be checked. + :type scale_interval_in_seconds: int + """ + + _validation = { + 'kind': {'required': True}, + 'metric': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'minimum': 60}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'metric': {'key': 'metric', 'type': 'AutoScalingMetric'}, + 'lower_load_threshold': {'key': 'lowerLoadThreshold', 'type': 'float'}, + 'upper_load_threshold': {'key': 'upperLoadThreshold', 'type': 'float'}, + 'scale_interval_in_seconds': {'key': 'scaleIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AverageLoadScalingTrigger, self).__init__(**kwargs) + self.metric = kwargs.get('metric', None) + self.lower_load_threshold = kwargs.get('lower_load_threshold', None) + self.upper_load_threshold = kwargs.get('upper_load_threshold', None) + self.scale_interval_in_seconds = kwargs.get('scale_interval_in_seconds', None) + self.kind = 'AverageLoad' diff --git a/customSDK/servicefabric/models/average_load_scaling_trigger_py3.py b/customSDK/servicefabric/models/average_load_scaling_trigger_py3.py new file mode 100644 index 0000000..b6a20ae --- /dev/null +++ b/customSDK/servicefabric/models/average_load_scaling_trigger_py3.py @@ -0,0 +1,58 @@ +# 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 .auto_scaling_trigger_py3 import AutoScalingTrigger + + +class AverageLoadScalingTrigger(AutoScalingTrigger): + """Describes the average load trigger used for auto scaling. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param metric: Required. Description of the metric that is used for + scaling. + :type metric: ~azure.servicefabric.models.AutoScalingMetric + :param lower_load_threshold: Required. Lower load threshold (if average + load is below this threshold, service will scale down). + :type lower_load_threshold: float + :param upper_load_threshold: Required. Upper load threshold (if average + load is above this threshold, service will scale up). + :type upper_load_threshold: float + :param scale_interval_in_seconds: Required. Scale interval that indicates + how often will this trigger be checked. + :type scale_interval_in_seconds: int + """ + + _validation = { + 'kind': {'required': True}, + 'metric': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'minimum': 60}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'metric': {'key': 'metric', 'type': 'AutoScalingMetric'}, + 'lower_load_threshold': {'key': 'lowerLoadThreshold', 'type': 'float'}, + 'upper_load_threshold': {'key': 'upperLoadThreshold', 'type': 'float'}, + 'scale_interval_in_seconds': {'key': 'scaleIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, *, metric, lower_load_threshold: float, upper_load_threshold: float, scale_interval_in_seconds: int, **kwargs) -> None: + super(AverageLoadScalingTrigger, self).__init__(**kwargs) + self.metric = metric + self.lower_load_threshold = lower_load_threshold + self.upper_load_threshold = upper_load_threshold + self.scale_interval_in_seconds = scale_interval_in_seconds + self.kind = 'AverageLoad' diff --git a/customSDK/servicefabric/models/average_partition_load_scaling_trigger.py b/customSDK/servicefabric/models/average_partition_load_scaling_trigger.py new file mode 100644 index 0000000..8130735 --- /dev/null +++ b/customSDK/servicefabric/models/average_partition_load_scaling_trigger.py @@ -0,0 +1,59 @@ +# 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 .scaling_trigger_description import ScalingTriggerDescription + + +class AveragePartitionLoadScalingTrigger(ScalingTriggerDescription): + """Represents a scaling trigger related to an average load of a + metric/resource of a partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param metric_name: Required. The name of the metric for which usage + should be tracked. + :type metric_name: str + :param lower_load_threshold: Required. The lower limit of the load below + which a scale in operation should be performed. + :type lower_load_threshold: str + :param upper_load_threshold: Required. The upper limit of the load beyond + which a scale out operation should be performed. + :type upper_load_threshold: str + :param scale_interval_in_seconds: Required. The period in seconds on which + a decision is made whether to scale or not. + :type scale_interval_in_seconds: long + """ + + _validation = { + 'kind': {'required': True}, + 'metric_name': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, + 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, + 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(AveragePartitionLoadScalingTrigger, self).__init__(**kwargs) + self.metric_name = kwargs.get('metric_name', None) + self.lower_load_threshold = kwargs.get('lower_load_threshold', None) + self.upper_load_threshold = kwargs.get('upper_load_threshold', None) + self.scale_interval_in_seconds = kwargs.get('scale_interval_in_seconds', None) + self.kind = 'AveragePartitionLoad' diff --git a/customSDK/servicefabric/models/average_partition_load_scaling_trigger_py3.py b/customSDK/servicefabric/models/average_partition_load_scaling_trigger_py3.py new file mode 100644 index 0000000..610459e --- /dev/null +++ b/customSDK/servicefabric/models/average_partition_load_scaling_trigger_py3.py @@ -0,0 +1,59 @@ +# 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 .scaling_trigger_description_py3 import ScalingTriggerDescription + + +class AveragePartitionLoadScalingTrigger(ScalingTriggerDescription): + """Represents a scaling trigger related to an average load of a + metric/resource of a partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param metric_name: Required. The name of the metric for which usage + should be tracked. + :type metric_name: str + :param lower_load_threshold: Required. The lower limit of the load below + which a scale in operation should be performed. + :type lower_load_threshold: str + :param upper_load_threshold: Required. The upper limit of the load beyond + which a scale out operation should be performed. + :type upper_load_threshold: str + :param scale_interval_in_seconds: Required. The period in seconds on which + a decision is made whether to scale or not. + :type scale_interval_in_seconds: long + """ + + _validation = { + 'kind': {'required': True}, + 'metric_name': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, + 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, + 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, + } + + def __init__(self, *, metric_name: str, lower_load_threshold: str, upper_load_threshold: str, scale_interval_in_seconds: int, **kwargs) -> None: + super(AveragePartitionLoadScalingTrigger, self).__init__(**kwargs) + self.metric_name = metric_name + self.lower_load_threshold = lower_load_threshold + self.upper_load_threshold = upper_load_threshold + self.scale_interval_in_seconds = scale_interval_in_seconds + self.kind = 'AveragePartitionLoad' diff --git a/customSDK/servicefabric/models/average_service_load_scaling_trigger.py b/customSDK/servicefabric/models/average_service_load_scaling_trigger.py new file mode 100644 index 0000000..5c53927 --- /dev/null +++ b/customSDK/servicefabric/models/average_service_load_scaling_trigger.py @@ -0,0 +1,69 @@ +# 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 .scaling_trigger_description import ScalingTriggerDescription + + +class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): + """Represents a scaling policy related to an average load of a metric/resource + of a service. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param metric_name: Required. The name of the metric for which usage + should be tracked. + :type metric_name: str + :param lower_load_threshold: Required. The lower limit of the load below + which a scale in operation should be performed. + :type lower_load_threshold: str + :param upper_load_threshold: Required. The upper limit of the load beyond + which a scale out operation should be performed. + :type upper_load_threshold: str + :param scale_interval_in_seconds: Required. The period in seconds on which + a decision is made whether to scale or not. + :type scale_interval_in_seconds: long + :param use_only_primary_load: Required. Flag determines whether only the + load of primary replica should be considered for scaling. + If set to true, then trigger will only consider the load of primary + replicas of stateful service. + If set to false, trigger will consider load of all replicas. + This parameter cannot be set to true for stateless service. + :type use_only_primary_load: bool + """ + + _validation = { + 'kind': {'required': True}, + 'metric_name': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, + 'use_only_primary_load': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, + 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, + 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, + 'use_only_primary_load': {'key': 'UseOnlyPrimaryLoad', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AverageServiceLoadScalingTrigger, self).__init__(**kwargs) + self.metric_name = kwargs.get('metric_name', None) + self.lower_load_threshold = kwargs.get('lower_load_threshold', None) + self.upper_load_threshold = kwargs.get('upper_load_threshold', None) + self.scale_interval_in_seconds = kwargs.get('scale_interval_in_seconds', None) + self.use_only_primary_load = kwargs.get('use_only_primary_load', None) + self.kind = 'AverageServiceLoad' diff --git a/customSDK/servicefabric/models/average_service_load_scaling_trigger_py3.py b/customSDK/servicefabric/models/average_service_load_scaling_trigger_py3.py new file mode 100644 index 0000000..0a8d296 --- /dev/null +++ b/customSDK/servicefabric/models/average_service_load_scaling_trigger_py3.py @@ -0,0 +1,69 @@ +# 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 .scaling_trigger_description_py3 import ScalingTriggerDescription + + +class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): + """Represents a scaling policy related to an average load of a metric/resource + of a service. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param metric_name: Required. The name of the metric for which usage + should be tracked. + :type metric_name: str + :param lower_load_threshold: Required. The lower limit of the load below + which a scale in operation should be performed. + :type lower_load_threshold: str + :param upper_load_threshold: Required. The upper limit of the load beyond + which a scale out operation should be performed. + :type upper_load_threshold: str + :param scale_interval_in_seconds: Required. The period in seconds on which + a decision is made whether to scale or not. + :type scale_interval_in_seconds: long + :param use_only_primary_load: Required. Flag determines whether only the + load of primary replica should be considered for scaling. + If set to true, then trigger will only consider the load of primary + replicas of stateful service. + If set to false, trigger will consider load of all replicas. + This parameter cannot be set to true for stateless service. + :type use_only_primary_load: bool + """ + + _validation = { + 'kind': {'required': True}, + 'metric_name': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, + 'use_only_primary_load': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, + 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, + 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, + 'use_only_primary_load': {'key': 'UseOnlyPrimaryLoad', 'type': 'bool'}, + } + + def __init__(self, *, metric_name: str, lower_load_threshold: str, upper_load_threshold: str, scale_interval_in_seconds: int, use_only_primary_load: bool, **kwargs) -> None: + super(AverageServiceLoadScalingTrigger, self).__init__(**kwargs) + self.metric_name = metric_name + self.lower_load_threshold = lower_load_threshold + self.upper_load_threshold = upper_load_threshold + self.scale_interval_in_seconds = scale_interval_in_seconds + self.use_only_primary_load = use_only_primary_load + self.kind = 'AverageServiceLoad' diff --git a/customSDK/servicefabric/models/azure_blob_backup_storage_description.py b/customSDK/servicefabric/models/azure_blob_backup_storage_description.py new file mode 100644 index 0000000..ad0615e --- /dev/null +++ b/customSDK/servicefabric/models/azure_blob_backup_storage_description.py @@ -0,0 +1,50 @@ +# 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 .backup_storage_description import BackupStorageDescription + + +class AzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Azure blob store used for storing and + enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param connection_string: Required. The connection string to connect to + the Azure blob store. + :type connection_string: str + :param container_name: Required. The name of the container in the blob + store to store and enumerate backups from. + :type container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'connection_string': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'connection_string': {'key': 'ConnectionString', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureBlobBackupStorageDescription, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.container_name = kwargs.get('container_name', None) + self.storage_kind = 'AzureBlobStore' diff --git a/customSDK/servicefabric/models/azure_blob_backup_storage_description_py3.py b/customSDK/servicefabric/models/azure_blob_backup_storage_description_py3.py new file mode 100644 index 0000000..1384848 --- /dev/null +++ b/customSDK/servicefabric/models/azure_blob_backup_storage_description_py3.py @@ -0,0 +1,50 @@ +# 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 .backup_storage_description_py3 import BackupStorageDescription + + +class AzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Azure blob store used for storing and + enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param connection_string: Required. The connection string to connect to + the Azure blob store. + :type connection_string: str + :param container_name: Required. The name of the container in the blob + store to store and enumerate backups from. + :type container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'connection_string': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'connection_string': {'key': 'ConnectionString', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, *, connection_string: str, container_name: str, friendly_name: str=None, **kwargs) -> None: + super(AzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) + self.connection_string = connection_string + self.container_name = container_name + self.storage_kind = 'AzureBlobStore' diff --git a/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description.py b/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description.py new file mode 100644 index 0000000..a61f34e --- /dev/null +++ b/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description.py @@ -0,0 +1,63 @@ +# 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 .diagnostics_sink_properties import DiagnosticsSinkProperties + + +class AzureInternalMonitoringPipelineSinkDescription(DiagnosticsSinkProperties): + """Diagnostics settings for Geneva. + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the sink. This value is referenced by + DiagnosticsReferenceDescription + :type name: str + :param description: A description of the sink. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param account_name: Azure Internal monitoring pipeline account. + :type account_name: str + :param namespace: Azure Internal monitoring pipeline account namespace. + :type namespace: str + :param ma_config_url: Azure Internal monitoring agent configuration. + :type ma_config_url: str + :param fluentd_config_url: Azure Internal monitoring agent fluentd + configuration. + :type fluentd_config_url: str + :param auto_key_config_url: Azure Internal monitoring pipeline autokey + associated with the certificate. + :type auto_key_config_url: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'ma_config_url': {'key': 'maConfigUrl', 'type': 'str'}, + 'fluentd_config_url': {'key': 'fluentdConfigUrl', 'type': 'str'}, + 'auto_key_config_url': {'key': 'autoKeyConfigUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureInternalMonitoringPipelineSinkDescription, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + self.namespace = kwargs.get('namespace', None) + self.ma_config_url = kwargs.get('ma_config_url', None) + self.fluentd_config_url = kwargs.get('fluentd_config_url', None) + self.auto_key_config_url = kwargs.get('auto_key_config_url', None) + self.kind = 'AzureInternalMonitoringPipeline' diff --git a/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description_py3.py b/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description_py3.py new file mode 100644 index 0000000..986ff02 --- /dev/null +++ b/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description_py3.py @@ -0,0 +1,63 @@ +# 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 .diagnostics_sink_properties_py3 import DiagnosticsSinkProperties + + +class AzureInternalMonitoringPipelineSinkDescription(DiagnosticsSinkProperties): + """Diagnostics settings for Geneva. + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the sink. This value is referenced by + DiagnosticsReferenceDescription + :type name: str + :param description: A description of the sink. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param account_name: Azure Internal monitoring pipeline account. + :type account_name: str + :param namespace: Azure Internal monitoring pipeline account namespace. + :type namespace: str + :param ma_config_url: Azure Internal monitoring agent configuration. + :type ma_config_url: str + :param fluentd_config_url: Azure Internal monitoring agent fluentd + configuration. + :type fluentd_config_url: str + :param auto_key_config_url: Azure Internal monitoring pipeline autokey + associated with the certificate. + :type auto_key_config_url: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'ma_config_url': {'key': 'maConfigUrl', 'type': 'str'}, + 'fluentd_config_url': {'key': 'fluentdConfigUrl', 'type': 'str'}, + 'auto_key_config_url': {'key': 'autoKeyConfigUrl', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, description: str=None, account_name: str=None, namespace: str=None, ma_config_url: str=None, fluentd_config_url: str=None, auto_key_config_url: str=None, **kwargs) -> None: + super(AzureInternalMonitoringPipelineSinkDescription, self).__init__(name=name, description=description, **kwargs) + self.account_name = account_name + self.namespace = namespace + self.ma_config_url = ma_config_url + self.fluentd_config_url = fluentd_config_url + self.auto_key_config_url = auto_key_config_url + self.kind = 'AzureInternalMonitoringPipeline' diff --git a/customSDK/servicefabric/models/backup_configuration_info.py b/customSDK/servicefabric/models/backup_configuration_info.py new file mode 100644 index 0000000..53e26f0 --- /dev/null +++ b/customSDK/servicefabric/models/backup_configuration_info.py @@ -0,0 +1,58 @@ +# 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 msrest.serialization import Model + + +class BackupConfigurationInfo(Model): + """Describes the backup configuration information. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationBackupConfigurationInfo, + ServiceBackupConfigurationInfo, PartitionBackupConfigurationInfo + + All required parameters must be populated in order to send to Azure. + + :param policy_name: The name of the backup policy which is applicable to + this Service Fabric application or service or partition. + :type policy_name: str + :param policy_inherited_from: Specifies the scope at which the backup + policy is applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type policy_inherited_from: str or + ~azure.servicefabric.models.BackupPolicyScope + :param suspension_info: Describes the backup suspension details. + :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Application': 'ApplicationBackupConfigurationInfo', 'Service': 'ServiceBackupConfigurationInfo', 'Partition': 'PartitionBackupConfigurationInfo'} + } + + def __init__(self, **kwargs): + super(BackupConfigurationInfo, self).__init__(**kwargs) + self.policy_name = kwargs.get('policy_name', None) + self.policy_inherited_from = kwargs.get('policy_inherited_from', None) + self.suspension_info = kwargs.get('suspension_info', None) + self.kind = None diff --git a/customSDK/servicefabric/models/backup_configuration_info_py3.py b/customSDK/servicefabric/models/backup_configuration_info_py3.py new file mode 100644 index 0000000..6b16019 --- /dev/null +++ b/customSDK/servicefabric/models/backup_configuration_info_py3.py @@ -0,0 +1,58 @@ +# 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 msrest.serialization import Model + + +class BackupConfigurationInfo(Model): + """Describes the backup configuration information. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationBackupConfigurationInfo, + ServiceBackupConfigurationInfo, PartitionBackupConfigurationInfo + + All required parameters must be populated in order to send to Azure. + + :param policy_name: The name of the backup policy which is applicable to + this Service Fabric application or service or partition. + :type policy_name: str + :param policy_inherited_from: Specifies the scope at which the backup + policy is applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type policy_inherited_from: str or + ~azure.servicefabric.models.BackupPolicyScope + :param suspension_info: Describes the backup suspension details. + :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Application': 'ApplicationBackupConfigurationInfo', 'Service': 'ServiceBackupConfigurationInfo', 'Partition': 'PartitionBackupConfigurationInfo'} + } + + def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, **kwargs) -> None: + super(BackupConfigurationInfo, self).__init__(**kwargs) + self.policy_name = policy_name + self.policy_inherited_from = policy_inherited_from + self.suspension_info = suspension_info + self.kind = None diff --git a/customSDK/servicefabric/models/backup_entity.py b/customSDK/servicefabric/models/backup_entity.py new file mode 100644 index 0000000..f61be0f --- /dev/null +++ b/customSDK/servicefabric/models/backup_entity.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class BackupEntity(Model): + """Describes the Service Fabric entity that is configured for backup. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationBackupEntity, ServiceBackupEntity, + PartitionBackupEntity + + All required parameters must be populated in order to send to Azure. + + :param entity_kind: Required. Constant filled by server. + :type entity_kind: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + } + + _subtype_map = { + 'entity_kind': {'Application': 'ApplicationBackupEntity', 'Service': 'ServiceBackupEntity', 'Partition': 'PartitionBackupEntity'} + } + + def __init__(self, **kwargs): + super(BackupEntity, self).__init__(**kwargs) + self.entity_kind = None diff --git a/customSDK/servicefabric/models/backup_entity_py3.py b/customSDK/servicefabric/models/backup_entity_py3.py new file mode 100644 index 0000000..4ce8b96 --- /dev/null +++ b/customSDK/servicefabric/models/backup_entity_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class BackupEntity(Model): + """Describes the Service Fabric entity that is configured for backup. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationBackupEntity, ServiceBackupEntity, + PartitionBackupEntity + + All required parameters must be populated in order to send to Azure. + + :param entity_kind: Required. Constant filled by server. + :type entity_kind: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + } + + _subtype_map = { + 'entity_kind': {'Application': 'ApplicationBackupEntity', 'Service': 'ServiceBackupEntity', 'Partition': 'PartitionBackupEntity'} + } + + def __init__(self, **kwargs) -> None: + super(BackupEntity, self).__init__(**kwargs) + self.entity_kind = None diff --git a/customSDK/servicefabric/models/backup_info.py b/customSDK/servicefabric/models/backup_info.py new file mode 100644 index 0000000..ca205e5 --- /dev/null +++ b/customSDK/servicefabric/models/backup_info.py @@ -0,0 +1,83 @@ +# 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 msrest.serialization import Model + + +class BackupInfo(Model): + """Represents a backup point which can be used to trigger a restore. + + :param backup_id: Unique backup ID . + :type backup_id: str + :param backup_chain_id: Unique backup chain ID. All backups part of the + same chain has the same backup chain id. A backup chain is comprised of 1 + full backup and multiple incremental backups. + :type backup_chain_id: str + :param application_name: Name of the Service Fabric application this + partition backup belongs to. + :type application_name: str + :param service_name: Name of the Service Fabric service this partition + backup belongs to. + :type service_name: str + :param partition_information: Information about the partition to which + this backup belongs to + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param backup_location: Location of the backup, relative to the backup + store. + :type backup_location: str + :param backup_type: Describes the type of backup, whether its full or + incremental. Possible values include: 'Invalid', 'Full', 'Incremental' + :type backup_type: str or ~azure.servicefabric.models.BackupType + :param epoch_of_last_backup_record: Epoch of the last record in this + backup. + :type epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch + :param lsn_of_last_backup_record: LSN of the last record in this backup. + :type lsn_of_last_backup_record: str + :param creation_time_utc: The date time when this backup was taken. + :type creation_time_utc: datetime + :param service_manifest_version: Manifest Version of the service this + partition backup belongs to. + :type service_manifest_version: str + :param failure_error: Denotes the failure encountered in getting backup + point information. + :type failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_chain_id': {'key': 'BackupChainId', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'backup_type': {'key': 'BackupType', 'type': 'str'}, + 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, + 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, + 'creation_time_utc': {'key': 'CreationTimeUtc', 'type': 'iso-8601'}, + 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__(self, **kwargs): + super(BackupInfo, self).__init__(**kwargs) + self.backup_id = kwargs.get('backup_id', None) + self.backup_chain_id = kwargs.get('backup_chain_id', None) + self.application_name = kwargs.get('application_name', None) + self.service_name = kwargs.get('service_name', None) + self.partition_information = kwargs.get('partition_information', None) + self.backup_location = kwargs.get('backup_location', None) + self.backup_type = kwargs.get('backup_type', None) + self.epoch_of_last_backup_record = kwargs.get('epoch_of_last_backup_record', None) + self.lsn_of_last_backup_record = kwargs.get('lsn_of_last_backup_record', None) + self.creation_time_utc = kwargs.get('creation_time_utc', None) + self.service_manifest_version = kwargs.get('service_manifest_version', None) + self.failure_error = kwargs.get('failure_error', None) diff --git a/customSDK/servicefabric/models/backup_info_py3.py b/customSDK/servicefabric/models/backup_info_py3.py new file mode 100644 index 0000000..61fdc44 --- /dev/null +++ b/customSDK/servicefabric/models/backup_info_py3.py @@ -0,0 +1,83 @@ +# 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 msrest.serialization import Model + + +class BackupInfo(Model): + """Represents a backup point which can be used to trigger a restore. + + :param backup_id: Unique backup ID . + :type backup_id: str + :param backup_chain_id: Unique backup chain ID. All backups part of the + same chain has the same backup chain id. A backup chain is comprised of 1 + full backup and multiple incremental backups. + :type backup_chain_id: str + :param application_name: Name of the Service Fabric application this + partition backup belongs to. + :type application_name: str + :param service_name: Name of the Service Fabric service this partition + backup belongs to. + :type service_name: str + :param partition_information: Information about the partition to which + this backup belongs to + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param backup_location: Location of the backup, relative to the backup + store. + :type backup_location: str + :param backup_type: Describes the type of backup, whether its full or + incremental. Possible values include: 'Invalid', 'Full', 'Incremental' + :type backup_type: str or ~azure.servicefabric.models.BackupType + :param epoch_of_last_backup_record: Epoch of the last record in this + backup. + :type epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch + :param lsn_of_last_backup_record: LSN of the last record in this backup. + :type lsn_of_last_backup_record: str + :param creation_time_utc: The date time when this backup was taken. + :type creation_time_utc: datetime + :param service_manifest_version: Manifest Version of the service this + partition backup belongs to. + :type service_manifest_version: str + :param failure_error: Denotes the failure encountered in getting backup + point information. + :type failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_chain_id': {'key': 'BackupChainId', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'backup_type': {'key': 'BackupType', 'type': 'str'}, + 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, + 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, + 'creation_time_utc': {'key': 'CreationTimeUtc', 'type': 'iso-8601'}, + 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__(self, *, backup_id: str=None, backup_chain_id: str=None, application_name: str=None, service_name: str=None, partition_information=None, backup_location: str=None, backup_type=None, epoch_of_last_backup_record=None, lsn_of_last_backup_record: str=None, creation_time_utc=None, service_manifest_version: str=None, failure_error=None, **kwargs) -> None: + super(BackupInfo, self).__init__(**kwargs) + self.backup_id = backup_id + self.backup_chain_id = backup_chain_id + self.application_name = application_name + self.service_name = service_name + self.partition_information = partition_information + self.backup_location = backup_location + self.backup_type = backup_type + self.epoch_of_last_backup_record = epoch_of_last_backup_record + self.lsn_of_last_backup_record = lsn_of_last_backup_record + self.creation_time_utc = creation_time_utc + self.service_manifest_version = service_manifest_version + self.failure_error = failure_error diff --git a/customSDK/servicefabric/models/backup_partition_description.py b/customSDK/servicefabric/models/backup_partition_description.py new file mode 100644 index 0000000..dc3433a --- /dev/null +++ b/customSDK/servicefabric/models/backup_partition_description.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class BackupPartitionDescription(Model): + """Describes the parameters for triggering partition's backup. + + :param backup_storage: Specifies the details of the backup storage where + to save the backup. + :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription + """ + + _attribute_map = { + 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, + } + + def __init__(self, **kwargs): + super(BackupPartitionDescription, self).__init__(**kwargs) + self.backup_storage = kwargs.get('backup_storage', None) diff --git a/customSDK/servicefabric/models/backup_partition_description_py3.py b/customSDK/servicefabric/models/backup_partition_description_py3.py new file mode 100644 index 0000000..bc511a1 --- /dev/null +++ b/customSDK/servicefabric/models/backup_partition_description_py3.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class BackupPartitionDescription(Model): + """Describes the parameters for triggering partition's backup. + + :param backup_storage: Specifies the details of the backup storage where + to save the backup. + :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription + """ + + _attribute_map = { + 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, + } + + def __init__(self, *, backup_storage=None, **kwargs) -> None: + super(BackupPartitionDescription, self).__init__(**kwargs) + self.backup_storage = backup_storage diff --git a/customSDK/servicefabric/models/backup_policy_description.py b/customSDK/servicefabric/models/backup_policy_description.py new file mode 100644 index 0000000..d87ea57 --- /dev/null +++ b/customSDK/servicefabric/models/backup_policy_description.py @@ -0,0 +1,69 @@ +# 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 msrest.serialization import Model + + +class BackupPolicyDescription(Model): + """Describes a backup policy for configuring periodic backup. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name identifying this backup policy. + :type name: str + :param auto_restore_on_data_loss: Required. Specifies whether to trigger + restore automatically using the latest available backup in case the + partition experiences a data loss event. + :type auto_restore_on_data_loss: bool + :param max_incremental_backups: Required. Defines the maximum number of + incremental backups to be taken between two full backups. This is just the + upper limit. A full backup may be taken before specified number of + incremental backups are completed in one of the following conditions + - The replica has never taken a full backup since it has become primary, + - Some of the log records since the last backup has been truncated, or + - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. + :type max_incremental_backups: int + :param schedule: Required. Describes the backup schedule parameters. + :type schedule: ~azure.servicefabric.models.BackupScheduleDescription + :param storage: Required. Describes the details of backup storage where to + store the periodic backups. + :type storage: ~azure.servicefabric.models.BackupStorageDescription + :param retention_policy: Describes the policy to retain backups in + storage. + :type retention_policy: + ~azure.servicefabric.models.RetentionPolicyDescription + """ + + _validation = { + 'name': {'required': True}, + 'auto_restore_on_data_loss': {'required': True}, + 'max_incremental_backups': {'required': True, 'maximum': 255, 'minimum': 0}, + 'schedule': {'required': True}, + 'storage': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'auto_restore_on_data_loss': {'key': 'AutoRestoreOnDataLoss', 'type': 'bool'}, + 'max_incremental_backups': {'key': 'MaxIncrementalBackups', 'type': 'int'}, + 'schedule': {'key': 'Schedule', 'type': 'BackupScheduleDescription'}, + 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, + 'retention_policy': {'key': 'RetentionPolicy', 'type': 'RetentionPolicyDescription'}, + } + + def __init__(self, **kwargs): + super(BackupPolicyDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.auto_restore_on_data_loss = kwargs.get('auto_restore_on_data_loss', None) + self.max_incremental_backups = kwargs.get('max_incremental_backups', None) + self.schedule = kwargs.get('schedule', None) + self.storage = kwargs.get('storage', None) + self.retention_policy = kwargs.get('retention_policy', None) diff --git a/customSDK/servicefabric/models/backup_policy_description_py3.py b/customSDK/servicefabric/models/backup_policy_description_py3.py new file mode 100644 index 0000000..5890d79 --- /dev/null +++ b/customSDK/servicefabric/models/backup_policy_description_py3.py @@ -0,0 +1,69 @@ +# 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 msrest.serialization import Model + + +class BackupPolicyDescription(Model): + """Describes a backup policy for configuring periodic backup. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name identifying this backup policy. + :type name: str + :param auto_restore_on_data_loss: Required. Specifies whether to trigger + restore automatically using the latest available backup in case the + partition experiences a data loss event. + :type auto_restore_on_data_loss: bool + :param max_incremental_backups: Required. Defines the maximum number of + incremental backups to be taken between two full backups. This is just the + upper limit. A full backup may be taken before specified number of + incremental backups are completed in one of the following conditions + - The replica has never taken a full backup since it has become primary, + - Some of the log records since the last backup has been truncated, or + - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. + :type max_incremental_backups: int + :param schedule: Required. Describes the backup schedule parameters. + :type schedule: ~azure.servicefabric.models.BackupScheduleDescription + :param storage: Required. Describes the details of backup storage where to + store the periodic backups. + :type storage: ~azure.servicefabric.models.BackupStorageDescription + :param retention_policy: Describes the policy to retain backups in + storage. + :type retention_policy: + ~azure.servicefabric.models.RetentionPolicyDescription + """ + + _validation = { + 'name': {'required': True}, + 'auto_restore_on_data_loss': {'required': True}, + 'max_incremental_backups': {'required': True, 'maximum': 255, 'minimum': 0}, + 'schedule': {'required': True}, + 'storage': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'auto_restore_on_data_loss': {'key': 'AutoRestoreOnDataLoss', 'type': 'bool'}, + 'max_incremental_backups': {'key': 'MaxIncrementalBackups', 'type': 'int'}, + 'schedule': {'key': 'Schedule', 'type': 'BackupScheduleDescription'}, + 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, + 'retention_policy': {'key': 'RetentionPolicy', 'type': 'RetentionPolicyDescription'}, + } + + def __init__(self, *, name: str, auto_restore_on_data_loss: bool, max_incremental_backups: int, schedule, storage, retention_policy=None, **kwargs) -> None: + super(BackupPolicyDescription, self).__init__(**kwargs) + self.name = name + self.auto_restore_on_data_loss = auto_restore_on_data_loss + self.max_incremental_backups = max_incremental_backups + self.schedule = schedule + self.storage = storage + self.retention_policy = retention_policy diff --git a/customSDK/servicefabric/models/backup_progress_info.py b/customSDK/servicefabric/models/backup_progress_info.py new file mode 100644 index 0000000..785b02f --- /dev/null +++ b/customSDK/servicefabric/models/backup_progress_info.py @@ -0,0 +1,59 @@ +# 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 msrest.serialization import Model + + +class BackupProgressInfo(Model): + """Describes the progress of a partition's backup. + + :param backup_state: Represents the current state of the partition backup + operation. Possible values include: 'Invalid', 'Accepted', + 'BackupInProgress', 'Success', 'Failure', 'Timeout' + :type backup_state: str or ~azure.servicefabric.models.BackupState + :param time_stamp_utc: TimeStamp in UTC when operation succeeded or + failed. + :type time_stamp_utc: datetime + :param backup_id: Unique ID of the newly created backup. + :type backup_id: str + :param backup_location: Location, relative to the backup store, of the + newly created backup. + :type backup_location: str + :param epoch_of_last_backup_record: Specifies the epoch of the last record + included in backup. + :type epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch + :param lsn_of_last_backup_record: The LSN of last record included in + backup. + :type lsn_of_last_backup_record: str + :param failure_error: Denotes the failure encountered in performing backup + operation. + :type failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'backup_state': {'key': 'BackupState', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, + 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__(self, **kwargs): + super(BackupProgressInfo, self).__init__(**kwargs) + self.backup_state = kwargs.get('backup_state', None) + self.time_stamp_utc = kwargs.get('time_stamp_utc', None) + self.backup_id = kwargs.get('backup_id', None) + self.backup_location = kwargs.get('backup_location', None) + self.epoch_of_last_backup_record = kwargs.get('epoch_of_last_backup_record', None) + self.lsn_of_last_backup_record = kwargs.get('lsn_of_last_backup_record', None) + self.failure_error = kwargs.get('failure_error', None) diff --git a/customSDK/servicefabric/models/backup_progress_info_py3.py b/customSDK/servicefabric/models/backup_progress_info_py3.py new file mode 100644 index 0000000..c00ce62 --- /dev/null +++ b/customSDK/servicefabric/models/backup_progress_info_py3.py @@ -0,0 +1,59 @@ +# 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 msrest.serialization import Model + + +class BackupProgressInfo(Model): + """Describes the progress of a partition's backup. + + :param backup_state: Represents the current state of the partition backup + operation. Possible values include: 'Invalid', 'Accepted', + 'BackupInProgress', 'Success', 'Failure', 'Timeout' + :type backup_state: str or ~azure.servicefabric.models.BackupState + :param time_stamp_utc: TimeStamp in UTC when operation succeeded or + failed. + :type time_stamp_utc: datetime + :param backup_id: Unique ID of the newly created backup. + :type backup_id: str + :param backup_location: Location, relative to the backup store, of the + newly created backup. + :type backup_location: str + :param epoch_of_last_backup_record: Specifies the epoch of the last record + included in backup. + :type epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch + :param lsn_of_last_backup_record: The LSN of last record included in + backup. + :type lsn_of_last_backup_record: str + :param failure_error: Denotes the failure encountered in performing backup + operation. + :type failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'backup_state': {'key': 'BackupState', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, + 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__(self, *, backup_state=None, time_stamp_utc=None, backup_id: str=None, backup_location: str=None, epoch_of_last_backup_record=None, lsn_of_last_backup_record: str=None, failure_error=None, **kwargs) -> None: + super(BackupProgressInfo, self).__init__(**kwargs) + self.backup_state = backup_state + self.time_stamp_utc = time_stamp_utc + self.backup_id = backup_id + self.backup_location = backup_location + self.epoch_of_last_backup_record = epoch_of_last_backup_record + self.lsn_of_last_backup_record = lsn_of_last_backup_record + self.failure_error = failure_error diff --git a/customSDK/servicefabric/models/backup_schedule_description.py b/customSDK/servicefabric/models/backup_schedule_description.py new file mode 100644 index 0000000..5aba62a --- /dev/null +++ b/customSDK/servicefabric/models/backup_schedule_description.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class BackupScheduleDescription(Model): + """Describes the backup schedule parameters. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FrequencyBasedBackupScheduleDescription, + TimeBasedBackupScheduleDescription + + All required parameters must be populated in order to send to Azure. + + :param schedule_kind: Required. Constant filled by server. + :type schedule_kind: str + """ + + _validation = { + 'schedule_kind': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + } + + _subtype_map = { + 'schedule_kind': {'FrequencyBased': 'FrequencyBasedBackupScheduleDescription', 'TimeBased': 'TimeBasedBackupScheduleDescription'} + } + + def __init__(self, **kwargs): + super(BackupScheduleDescription, self).__init__(**kwargs) + self.schedule_kind = None diff --git a/customSDK/servicefabric/models/backup_schedule_description_py3.py b/customSDK/servicefabric/models/backup_schedule_description_py3.py new file mode 100644 index 0000000..cb3b824 --- /dev/null +++ b/customSDK/servicefabric/models/backup_schedule_description_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class BackupScheduleDescription(Model): + """Describes the backup schedule parameters. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FrequencyBasedBackupScheduleDescription, + TimeBasedBackupScheduleDescription + + All required parameters must be populated in order to send to Azure. + + :param schedule_kind: Required. Constant filled by server. + :type schedule_kind: str + """ + + _validation = { + 'schedule_kind': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + } + + _subtype_map = { + 'schedule_kind': {'FrequencyBased': 'FrequencyBasedBackupScheduleDescription', 'TimeBased': 'TimeBasedBackupScheduleDescription'} + } + + def __init__(self, **kwargs) -> None: + super(BackupScheduleDescription, self).__init__(**kwargs) + self.schedule_kind = None diff --git a/customSDK/servicefabric/models/backup_storage_description.py b/customSDK/servicefabric/models/backup_storage_description.py new file mode 100644 index 0000000..a22407e --- /dev/null +++ b/customSDK/servicefabric/models/backup_storage_description.py @@ -0,0 +1,47 @@ +# 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 msrest.serialization import Model + + +class BackupStorageDescription(Model): + """Describes the parameters for the backup storage. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBlobBackupStorageDescription, + FileShareBackupStorageDescription, DsmsAzureBlobBackupStorageDescription, + ManagedIdentityAzureBlobBackupStorageDescription + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + """ + + _validation = { + 'storage_kind': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + } + + _subtype_map = { + 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription', 'ManagedIdentityAzureBlobStore': 'ManagedIdentityAzureBlobBackupStorageDescription'} + } + + def __init__(self, **kwargs): + super(BackupStorageDescription, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.storage_kind = None diff --git a/customSDK/servicefabric/models/backup_storage_description_py3.py b/customSDK/servicefabric/models/backup_storage_description_py3.py new file mode 100644 index 0000000..da0d683 --- /dev/null +++ b/customSDK/servicefabric/models/backup_storage_description_py3.py @@ -0,0 +1,47 @@ +# 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 msrest.serialization import Model + + +class BackupStorageDescription(Model): + """Describes the parameters for the backup storage. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBlobBackupStorageDescription, + FileShareBackupStorageDescription, DsmsAzureBlobBackupStorageDescription, + ManagedIdentityAzureBlobBackupStorageDescription + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + """ + + _validation = { + 'storage_kind': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + } + + _subtype_map = { + 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription', 'ManagedIdentityAzureBlobStore': 'ManagedIdentityAzureBlobBackupStorageDescription'} + } + + def __init__(self, *, friendly_name: str=None, **kwargs) -> None: + super(BackupStorageDescription, self).__init__(**kwargs) + self.friendly_name = friendly_name + self.storage_kind = None diff --git a/customSDK/servicefabric/models/backup_suspension_info.py b/customSDK/servicefabric/models/backup_suspension_info.py new file mode 100644 index 0000000..a93a7b8 --- /dev/null +++ b/customSDK/servicefabric/models/backup_suspension_info.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class BackupSuspensionInfo(Model): + """Describes the backup suspension details. + + :param is_suspended: Indicates whether periodic backup is suspended at + this level or not. + :type is_suspended: bool + :param suspension_inherited_from: Specifies the scope at which the backup + suspension was applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type suspension_inherited_from: str or + ~azure.servicefabric.models.BackupSuspensionScope + """ + + _attribute_map = { + 'is_suspended': {'key': 'IsSuspended', 'type': 'bool'}, + 'suspension_inherited_from': {'key': 'SuspensionInheritedFrom', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BackupSuspensionInfo, self).__init__(**kwargs) + self.is_suspended = kwargs.get('is_suspended', None) + self.suspension_inherited_from = kwargs.get('suspension_inherited_from', None) diff --git a/customSDK/servicefabric/models/backup_suspension_info_py3.py b/customSDK/servicefabric/models/backup_suspension_info_py3.py new file mode 100644 index 0000000..a384ce9 --- /dev/null +++ b/customSDK/servicefabric/models/backup_suspension_info_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class BackupSuspensionInfo(Model): + """Describes the backup suspension details. + + :param is_suspended: Indicates whether periodic backup is suspended at + this level or not. + :type is_suspended: bool + :param suspension_inherited_from: Specifies the scope at which the backup + suspension was applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type suspension_inherited_from: str or + ~azure.servicefabric.models.BackupSuspensionScope + """ + + _attribute_map = { + 'is_suspended': {'key': 'IsSuspended', 'type': 'bool'}, + 'suspension_inherited_from': {'key': 'SuspensionInheritedFrom', 'type': 'str'}, + } + + def __init__(self, *, is_suspended: bool=None, suspension_inherited_from=None, **kwargs) -> None: + super(BackupSuspensionInfo, self).__init__(**kwargs) + self.is_suspended = is_suspended + self.suspension_inherited_from = suspension_inherited_from diff --git a/customSDK/servicefabric/models/basic_retention_policy_description.py b/customSDK/servicefabric/models/basic_retention_policy_description.py new file mode 100644 index 0000000..653dec4 --- /dev/null +++ b/customSDK/servicefabric/models/basic_retention_policy_description.py @@ -0,0 +1,49 @@ +# 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 .retention_policy_description import RetentionPolicyDescription + + +class BasicRetentionPolicyDescription(RetentionPolicyDescription): + """Describes basic retention policy. + + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. + :type retention_policy_type: str + :param retention_duration: Required. It is the minimum duration for which + a backup created, will remain stored in the storage and might get deleted + after that span of time. It should be specified in ISO8601 format. + :type retention_duration: timedelta + :param minimum_number_of_backups: It is the minimum number of backups to + be retained at any point of time. If specified with a non zero value, + backups will not be deleted even if the backups have gone past retention + duration and have number of backups less than or equal to it. + :type minimum_number_of_backups: int + """ + + _validation = { + 'retention_policy_type': {'required': True}, + 'retention_duration': {'required': True}, + 'minimum_number_of_backups': {'minimum': 0}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, + 'retention_duration': {'key': 'RetentionDuration', 'type': 'duration'}, + 'minimum_number_of_backups': {'key': 'MinimumNumberOfBackups', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BasicRetentionPolicyDescription, self).__init__(**kwargs) + self.retention_duration = kwargs.get('retention_duration', None) + self.minimum_number_of_backups = kwargs.get('minimum_number_of_backups', None) + self.retention_policy_type = 'Basic' diff --git a/customSDK/servicefabric/models/basic_retention_policy_description_py3.py b/customSDK/servicefabric/models/basic_retention_policy_description_py3.py new file mode 100644 index 0000000..5abb36a --- /dev/null +++ b/customSDK/servicefabric/models/basic_retention_policy_description_py3.py @@ -0,0 +1,49 @@ +# 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 .retention_policy_description_py3 import RetentionPolicyDescription + + +class BasicRetentionPolicyDescription(RetentionPolicyDescription): + """Describes basic retention policy. + + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. + :type retention_policy_type: str + :param retention_duration: Required. It is the minimum duration for which + a backup created, will remain stored in the storage and might get deleted + after that span of time. It should be specified in ISO8601 format. + :type retention_duration: timedelta + :param minimum_number_of_backups: It is the minimum number of backups to + be retained at any point of time. If specified with a non zero value, + backups will not be deleted even if the backups have gone past retention + duration and have number of backups less than or equal to it. + :type minimum_number_of_backups: int + """ + + _validation = { + 'retention_policy_type': {'required': True}, + 'retention_duration': {'required': True}, + 'minimum_number_of_backups': {'minimum': 0}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, + 'retention_duration': {'key': 'RetentionDuration', 'type': 'duration'}, + 'minimum_number_of_backups': {'key': 'MinimumNumberOfBackups', 'type': 'int'}, + } + + def __init__(self, *, retention_duration, minimum_number_of_backups: int=None, **kwargs) -> None: + super(BasicRetentionPolicyDescription, self).__init__(**kwargs) + self.retention_duration = retention_duration + self.minimum_number_of_backups = minimum_number_of_backups + self.retention_policy_type = 'Basic' diff --git a/customSDK/servicefabric/models/binary_property_value.py b/customSDK/servicefabric/models/binary_property_value.py new file mode 100644 index 0000000..4dbec46 --- /dev/null +++ b/customSDK/servicefabric/models/binary_property_value.py @@ -0,0 +1,40 @@ +# 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 .property_value import PropertyValue + + +class BinaryPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Binary. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. Array of bytes to be sent as an integer array. Each + element of array is a number between 0 and 255. + :type data: list[int] + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': '[int]'}, + } + + def __init__(self, **kwargs): + super(BinaryPropertyValue, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.kind = 'Binary' diff --git a/customSDK/servicefabric/models/binary_property_value_py3.py b/customSDK/servicefabric/models/binary_property_value_py3.py new file mode 100644 index 0000000..6435ad1 --- /dev/null +++ b/customSDK/servicefabric/models/binary_property_value_py3.py @@ -0,0 +1,40 @@ +# 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 .property_value_py3 import PropertyValue + + +class BinaryPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Binary. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. Array of bytes to be sent as an integer array. Each + element of array is a number between 0 and 255. + :type data: list[int] + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': '[int]'}, + } + + def __init__(self, *, data, **kwargs) -> None: + super(BinaryPropertyValue, self).__init__(**kwargs) + self.data = data + self.kind = 'Binary' diff --git a/customSDK/servicefabric/models/chaos.py b/customSDK/servicefabric/models/chaos.py new file mode 100644 index 0000000..db9f97f --- /dev/null +++ b/customSDK/servicefabric/models/chaos.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class Chaos(Model): + """Contains a description of Chaos. + + :param chaos_parameters: If Chaos is running, these are the parameters + Chaos is running with. + :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters + :param status: Current status of the Chaos run. Possible values include: + 'Invalid', 'Running', 'Stopped' + :type status: str or ~azure.servicefabric.models.ChaosStatus + :param schedule_status: Current status of the schedule. Possible values + include: 'Invalid', 'Stopped', 'Active', 'Expired', 'Pending' + :type schedule_status: str or + ~azure.servicefabric.models.ChaosScheduleStatus + """ + + _attribute_map = { + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'schedule_status': {'key': 'ScheduleStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Chaos, self).__init__(**kwargs) + self.chaos_parameters = kwargs.get('chaos_parameters', None) + self.status = kwargs.get('status', None) + self.schedule_status = kwargs.get('schedule_status', None) diff --git a/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event.py b/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event.py new file mode 100644 index 0000000..7b4396d --- /dev/null +++ b/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event.py @@ -0,0 +1,91 @@ +# 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 .application_event import ApplicationEvent + + +class ChaosCodePackageRestartScheduledEvent(ApplicationEvent): + """Chaos Restart Code Package Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param service_manifest_name: Required. Service manifest name. + :type service_manifest_name: str + :param code_package_name: Required. Code package name. + :type code_package_name: str + :param service_package_activation_id: Required. Id of Service package + activation. + :type service_package_activation_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'node_name': {'required': True}, + 'service_manifest_name': {'required': True}, + 'code_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChaosCodePackageRestartScheduledEvent, self).__init__(**kwargs) + self.fault_group_id = kwargs.get('fault_group_id', None) + self.fault_id = kwargs.get('fault_id', None) + self.node_name = kwargs.get('node_name', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.code_package_name = kwargs.get('code_package_name', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.kind = 'ChaosCodePackageRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event_py3.py new file mode 100644 index 0000000..a9a8098 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event_py3.py @@ -0,0 +1,91 @@ +# 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 .application_event_py3 import ApplicationEvent + + +class ChaosCodePackageRestartScheduledEvent(ApplicationEvent): + """Chaos Restart Code Package Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param service_manifest_name: Required. Service manifest name. + :type service_manifest_name: str + :param code_package_name: Required. Code package name. + :type code_package_name: str + :param service_package_activation_id: Required. Id of Service package + activation. + :type service_package_activation_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'node_name': {'required': True}, + 'service_manifest_name': {'required': True}, + 'code_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, fault_group_id: str, fault_id: str, node_name: str, service_manifest_name: str, code_package_name: str, service_package_activation_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ChaosCodePackageRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.fault_group_id = fault_group_id + self.fault_id = fault_id + self.node_name = node_name + self.service_manifest_name = service_manifest_name + self.code_package_name = code_package_name + self.service_package_activation_id = service_package_activation_id + self.kind = 'ChaosCodePackageRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_context.py b/customSDK/servicefabric/models/chaos_context.py new file mode 100644 index 0000000..d8d7cc5 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_context.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class ChaosContext(Model): + """Describes a map, which is a collection of (string, string) type key-value + pairs. The map can be used to record information about + the Chaos run. There cannot be more than 100 such pairs and each string + (key or value) can be at most 4095 characters long. + This map is set by the starter of the Chaos run to optionally store the + context about the specific run. + + :param map: Describes a map that contains a collection of + ChaosContextMapItem's. + :type map: dict[str, str] + """ + + _attribute_map = { + 'map': {'key': 'Map', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ChaosContext, self).__init__(**kwargs) + self.map = kwargs.get('map', None) diff --git a/customSDK/servicefabric/models/chaos_context_py3.py b/customSDK/servicefabric/models/chaos_context_py3.py new file mode 100644 index 0000000..85ea13a --- /dev/null +++ b/customSDK/servicefabric/models/chaos_context_py3.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class ChaosContext(Model): + """Describes a map, which is a collection of (string, string) type key-value + pairs. The map can be used to record information about + the Chaos run. There cannot be more than 100 such pairs and each string + (key or value) can be at most 4095 characters long. + This map is set by the starter of the Chaos run to optionally store the + context about the specific run. + + :param map: Describes a map that contains a collection of + ChaosContextMapItem's. + :type map: dict[str, str] + """ + + _attribute_map = { + 'map': {'key': 'Map', 'type': '{str}'}, + } + + def __init__(self, *, map=None, **kwargs) -> None: + super(ChaosContext, self).__init__(**kwargs) + self.map = map diff --git a/customSDK/servicefabric/models/chaos_event.py b/customSDK/servicefabric/models/chaos_event.py new file mode 100644 index 0000000..8d0de7a --- /dev/null +++ b/customSDK/servicefabric/models/chaos_event.py @@ -0,0 +1,49 @@ +# 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 msrest.serialization import Model + + +class ChaosEvent(Model): + """Represents an event generated during a Chaos run. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ExecutingFaultsChaosEvent, StartedChaosEvent, + StoppedChaosEvent, TestErrorChaosEvent, ValidationFailedChaosEvent, + WaitingChaosEvent + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ExecutingFaults': 'ExecutingFaultsChaosEvent', 'Started': 'StartedChaosEvent', 'Stopped': 'StoppedChaosEvent', 'TestError': 'TestErrorChaosEvent', 'ValidationFailed': 'ValidationFailedChaosEvent', 'Waiting': 'WaitingChaosEvent'} + } + + def __init__(self, **kwargs): + super(ChaosEvent, self).__init__(**kwargs) + self.time_stamp_utc = kwargs.get('time_stamp_utc', None) + self.kind = None diff --git a/customSDK/servicefabric/models/chaos_event_py3.py b/customSDK/servicefabric/models/chaos_event_py3.py new file mode 100644 index 0000000..31f2117 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_event_py3.py @@ -0,0 +1,49 @@ +# 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 msrest.serialization import Model + + +class ChaosEvent(Model): + """Represents an event generated during a Chaos run. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ExecutingFaultsChaosEvent, StartedChaosEvent, + StoppedChaosEvent, TestErrorChaosEvent, ValidationFailedChaosEvent, + WaitingChaosEvent + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ExecutingFaults': 'ExecutingFaultsChaosEvent', 'Started': 'StartedChaosEvent', 'Stopped': 'StoppedChaosEvent', 'TestError': 'TestErrorChaosEvent', 'ValidationFailed': 'ValidationFailedChaosEvent', 'Waiting': 'WaitingChaosEvent'} + } + + def __init__(self, *, time_stamp_utc, **kwargs) -> None: + super(ChaosEvent, self).__init__(**kwargs) + self.time_stamp_utc = time_stamp_utc + self.kind = None diff --git a/customSDK/servicefabric/models/chaos_event_wrapper.py b/customSDK/servicefabric/models/chaos_event_wrapper.py new file mode 100644 index 0000000..0c56d69 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_event_wrapper.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class ChaosEventWrapper(Model): + """Wrapper object for Chaos event. + + :param chaos_event: Represents an event generated during a Chaos run. + :type chaos_event: ~azure.servicefabric.models.ChaosEvent + """ + + _attribute_map = { + 'chaos_event': {'key': 'ChaosEvent', 'type': 'ChaosEvent'}, + } + + def __init__(self, **kwargs): + super(ChaosEventWrapper, self).__init__(**kwargs) + self.chaos_event = kwargs.get('chaos_event', None) diff --git a/customSDK/servicefabric/models/chaos_event_wrapper_py3.py b/customSDK/servicefabric/models/chaos_event_wrapper_py3.py new file mode 100644 index 0000000..e1c68e9 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_event_wrapper_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class ChaosEventWrapper(Model): + """Wrapper object for Chaos event. + + :param chaos_event: Represents an event generated during a Chaos run. + :type chaos_event: ~azure.servicefabric.models.ChaosEvent + """ + + _attribute_map = { + 'chaos_event': {'key': 'ChaosEvent', 'type': 'ChaosEvent'}, + } + + def __init__(self, *, chaos_event=None, **kwargs) -> None: + super(ChaosEventWrapper, self).__init__(**kwargs) + self.chaos_event = chaos_event diff --git a/customSDK/servicefabric/models/chaos_events_segment.py b/customSDK/servicefabric/models/chaos_events_segment.py new file mode 100644 index 0000000..a6373aa --- /dev/null +++ b/customSDK/servicefabric/models/chaos_events_segment.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class ChaosEventsSegment(Model): + """Contains the list of Chaos events and the continuation token to get the + next segment. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param history: List of Chaos events that meet the user-supplied criteria. + :type history: list[~azure.servicefabric.models.ChaosEventWrapper] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'history': {'key': 'History', 'type': '[ChaosEventWrapper]'}, + } + + def __init__(self, **kwargs): + super(ChaosEventsSegment, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.history = kwargs.get('history', None) diff --git a/customSDK/servicefabric/models/chaos_events_segment_py3.py b/customSDK/servicefabric/models/chaos_events_segment_py3.py new file mode 100644 index 0000000..e916ca9 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_events_segment_py3.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class ChaosEventsSegment(Model): + """Contains the list of Chaos events and the continuation token to get the + next segment. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param history: List of Chaos events that meet the user-supplied criteria. + :type history: list[~azure.servicefabric.models.ChaosEventWrapper] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'history': {'key': 'History', 'type': '[ChaosEventWrapper]'}, + } + + def __init__(self, *, continuation_token: str=None, history=None, **kwargs) -> None: + super(ChaosEventsSegment, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.history = history diff --git a/customSDK/servicefabric/models/chaos_node_restart_scheduled_event.py b/customSDK/servicefabric/models/chaos_node_restart_scheduled_event.py new file mode 100644 index 0000000..4bbcde8 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_node_restart_scheduled_event.py @@ -0,0 +1,69 @@ +# 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 .node_event import NodeEvent + + +class ChaosNodeRestartScheduledEvent(NodeEvent): + """Chaos Restart Node Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: Required. Id of Node instance. + :type node_instance_id: long + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChaosNodeRestartScheduledEvent, self).__init__(**kwargs) + self.node_instance_id = kwargs.get('node_instance_id', None) + self.fault_group_id = kwargs.get('fault_group_id', None) + self.fault_id = kwargs.get('fault_id', None) + self.kind = 'ChaosNodeRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_node_restart_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_node_restart_scheduled_event_py3.py new file mode 100644 index 0000000..780e31f --- /dev/null +++ b/customSDK/servicefabric/models/chaos_node_restart_scheduled_event_py3.py @@ -0,0 +1,69 @@ +# 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 .node_event_py3 import NodeEvent + + +class ChaosNodeRestartScheduledEvent(NodeEvent): + """Chaos Restart Node Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: Required. Id of Node instance. + :type node_instance_id: long + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance_id: int, fault_group_id: str, fault_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ChaosNodeRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance_id = node_instance_id + self.fault_group_id = fault_group_id + self.fault_id = fault_id + self.kind = 'ChaosNodeRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_parameters.py b/customSDK/servicefabric/models/chaos_parameters.py new file mode 100644 index 0000000..ed32218 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_parameters.py @@ -0,0 +1,107 @@ +# 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 msrest.serialization import Model + + +class ChaosParameters(Model): + """Defines all the parameters to configure a Chaos run. + + :param time_to_run_in_seconds: Total time (in seconds) for which Chaos + will run before automatically stopping. The maximum allowed value is + 4,294,967,295 (System.UInt32.MaxValue). Default value: "4294967295" . + :type time_to_run_in_seconds: str + :param max_cluster_stabilization_timeout_in_seconds: The maximum amount of + time to wait for all cluster entities to become stable and healthy. Chaos + executes in iterations and at the start of each iteration it validates the + health of cluster entities. + During validation if a cluster entity is not stable and healthy within + MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation + failed event. Default value: 60 . + :type max_cluster_stabilization_timeout_in_seconds: long + :param max_concurrent_faults: MaxConcurrentFaults is the maximum number of + concurrent faults induced per iteration. + Chaos executes in iterations and two consecutive iterations are separated + by a validation phase. + The higher the concurrency, the more aggressive the injection of faults, + leading to inducing more complex series of states to uncover bugs. + The recommendation is to start with a value of 2 or 3 and to exercise + caution while moving up. Default value: 1 . + :type max_concurrent_faults: long + :param enable_move_replica_faults: Enables or disables the move primary + and move secondary faults. Default value: True . + :type enable_move_replica_faults: bool + :param wait_time_between_faults_in_seconds: Wait time (in seconds) between + consecutive faults within a single iteration. + The larger the value, the lower the overlapping between faults and the + simpler the sequence of state transitions that the cluster goes through. + The recommendation is to start with a value between 1 and 5 and exercise + caution while moving up. Default value: 20 . + :type wait_time_between_faults_in_seconds: long + :param wait_time_between_iterations_in_seconds: Time-separation (in + seconds) between two consecutive iterations of Chaos. + The larger the value, the lower the fault injection rate. Default value: + 30 . + :type wait_time_between_iterations_in_seconds: long + :param cluster_health_policy: Passed-in cluster health policy is used to + validate health of the cluster in between Chaos iterations. If the cluster + health is in error or if an unexpected exception happens during fault + execution--to provide the cluster with some time to recuperate--Chaos will + wait for 30 minutes before the next health-check. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param context: Describes a map, which is a collection of (string, string) + type key-value pairs. The map can be used to record information about + the Chaos run. There cannot be more than 100 such pairs and each string + (key or value) can be at most 4095 characters long. + This map is set by the starter of the Chaos run to optionally store the + context about the specific run. + :type context: ~azure.servicefabric.models.ChaosContext + :param chaos_target_filter: List of cluster entities to target for Chaos + faults. + This filter can be used to target Chaos faults only to certain node types + or only to certain application instances. If ChaosTargetFilter is not + used, Chaos faults all cluster entities. + If ChaosTargetFilter is used, Chaos faults only the entities that meet the + ChaosTargetFilter specification. + :type chaos_target_filter: ~azure.servicefabric.models.ChaosTargetFilter + """ + + _validation = { + 'max_cluster_stabilization_timeout_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'max_concurrent_faults': {'maximum': 4294967295, 'minimum': 0}, + 'wait_time_between_faults_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'wait_time_between_iterations_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'str'}, + 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'long'}, + 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, + 'enable_move_replica_faults': {'key': 'EnableMoveReplicaFaults', 'type': 'bool'}, + 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'long'}, + 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'long'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'context': {'key': 'Context', 'type': 'ChaosContext'}, + 'chaos_target_filter': {'key': 'ChaosTargetFilter', 'type': 'ChaosTargetFilter'}, + } + + def __init__(self, **kwargs): + super(ChaosParameters, self).__init__(**kwargs) + self.time_to_run_in_seconds = kwargs.get('time_to_run_in_seconds', "4294967295") + self.max_cluster_stabilization_timeout_in_seconds = kwargs.get('max_cluster_stabilization_timeout_in_seconds', 60) + self.max_concurrent_faults = kwargs.get('max_concurrent_faults', 1) + self.enable_move_replica_faults = kwargs.get('enable_move_replica_faults', True) + self.wait_time_between_faults_in_seconds = kwargs.get('wait_time_between_faults_in_seconds', 20) + self.wait_time_between_iterations_in_seconds = kwargs.get('wait_time_between_iterations_in_seconds', 30) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.context = kwargs.get('context', None) + self.chaos_target_filter = kwargs.get('chaos_target_filter', None) diff --git a/customSDK/servicefabric/models/chaos_parameters_dictionary_item.py b/customSDK/servicefabric/models/chaos_parameters_dictionary_item.py new file mode 100644 index 0000000..e2b07e8 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_parameters_dictionary_item.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class ChaosParametersDictionaryItem(Model): + """Defines an item in ChaosParametersDictionary of the Chaos Schedule. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key identifying the Chaos Parameter in the + dictionary. This key is referenced by Chaos Schedule Jobs. + :type key: str + :param value: Required. Defines all the parameters to configure a Chaos + run. + :type value: ~azure.servicefabric.models.ChaosParameters + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ChaosParameters'}, + } + + def __init__(self, **kwargs): + super(ChaosParametersDictionaryItem, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/chaos_parameters_dictionary_item_py3.py b/customSDK/servicefabric/models/chaos_parameters_dictionary_item_py3.py new file mode 100644 index 0000000..067d193 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_parameters_dictionary_item_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class ChaosParametersDictionaryItem(Model): + """Defines an item in ChaosParametersDictionary of the Chaos Schedule. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key identifying the Chaos Parameter in the + dictionary. This key is referenced by Chaos Schedule Jobs. + :type key: str + :param value: Required. Defines all the parameters to configure a Chaos + run. + :type value: ~azure.servicefabric.models.ChaosParameters + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ChaosParameters'}, + } + + def __init__(self, *, key: str, value, **kwargs) -> None: + super(ChaosParametersDictionaryItem, self).__init__(**kwargs) + self.key = key + self.value = value diff --git a/customSDK/servicefabric/models/chaos_parameters_py3.py b/customSDK/servicefabric/models/chaos_parameters_py3.py new file mode 100644 index 0000000..ed9ab92 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_parameters_py3.py @@ -0,0 +1,107 @@ +# 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 msrest.serialization import Model + + +class ChaosParameters(Model): + """Defines all the parameters to configure a Chaos run. + + :param time_to_run_in_seconds: Total time (in seconds) for which Chaos + will run before automatically stopping. The maximum allowed value is + 4,294,967,295 (System.UInt32.MaxValue). Default value: "4294967295" . + :type time_to_run_in_seconds: str + :param max_cluster_stabilization_timeout_in_seconds: The maximum amount of + time to wait for all cluster entities to become stable and healthy. Chaos + executes in iterations and at the start of each iteration it validates the + health of cluster entities. + During validation if a cluster entity is not stable and healthy within + MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation + failed event. Default value: 60 . + :type max_cluster_stabilization_timeout_in_seconds: long + :param max_concurrent_faults: MaxConcurrentFaults is the maximum number of + concurrent faults induced per iteration. + Chaos executes in iterations and two consecutive iterations are separated + by a validation phase. + The higher the concurrency, the more aggressive the injection of faults, + leading to inducing more complex series of states to uncover bugs. + The recommendation is to start with a value of 2 or 3 and to exercise + caution while moving up. Default value: 1 . + :type max_concurrent_faults: long + :param enable_move_replica_faults: Enables or disables the move primary + and move secondary faults. Default value: True . + :type enable_move_replica_faults: bool + :param wait_time_between_faults_in_seconds: Wait time (in seconds) between + consecutive faults within a single iteration. + The larger the value, the lower the overlapping between faults and the + simpler the sequence of state transitions that the cluster goes through. + The recommendation is to start with a value between 1 and 5 and exercise + caution while moving up. Default value: 20 . + :type wait_time_between_faults_in_seconds: long + :param wait_time_between_iterations_in_seconds: Time-separation (in + seconds) between two consecutive iterations of Chaos. + The larger the value, the lower the fault injection rate. Default value: + 30 . + :type wait_time_between_iterations_in_seconds: long + :param cluster_health_policy: Passed-in cluster health policy is used to + validate health of the cluster in between Chaos iterations. If the cluster + health is in error or if an unexpected exception happens during fault + execution--to provide the cluster with some time to recuperate--Chaos will + wait for 30 minutes before the next health-check. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param context: Describes a map, which is a collection of (string, string) + type key-value pairs. The map can be used to record information about + the Chaos run. There cannot be more than 100 such pairs and each string + (key or value) can be at most 4095 characters long. + This map is set by the starter of the Chaos run to optionally store the + context about the specific run. + :type context: ~azure.servicefabric.models.ChaosContext + :param chaos_target_filter: List of cluster entities to target for Chaos + faults. + This filter can be used to target Chaos faults only to certain node types + or only to certain application instances. If ChaosTargetFilter is not + used, Chaos faults all cluster entities. + If ChaosTargetFilter is used, Chaos faults only the entities that meet the + ChaosTargetFilter specification. + :type chaos_target_filter: ~azure.servicefabric.models.ChaosTargetFilter + """ + + _validation = { + 'max_cluster_stabilization_timeout_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'max_concurrent_faults': {'maximum': 4294967295, 'minimum': 0}, + 'wait_time_between_faults_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'wait_time_between_iterations_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'str'}, + 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'long'}, + 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, + 'enable_move_replica_faults': {'key': 'EnableMoveReplicaFaults', 'type': 'bool'}, + 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'long'}, + 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'long'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'context': {'key': 'Context', 'type': 'ChaosContext'}, + 'chaos_target_filter': {'key': 'ChaosTargetFilter', 'type': 'ChaosTargetFilter'}, + } + + def __init__(self, *, time_to_run_in_seconds: str="4294967295", max_cluster_stabilization_timeout_in_seconds: int=60, max_concurrent_faults: int=1, enable_move_replica_faults: bool=True, wait_time_between_faults_in_seconds: int=20, wait_time_between_iterations_in_seconds: int=30, cluster_health_policy=None, context=None, chaos_target_filter=None, **kwargs) -> None: + super(ChaosParameters, self).__init__(**kwargs) + self.time_to_run_in_seconds = time_to_run_in_seconds + self.max_cluster_stabilization_timeout_in_seconds = max_cluster_stabilization_timeout_in_seconds + self.max_concurrent_faults = max_concurrent_faults + self.enable_move_replica_faults = enable_move_replica_faults + self.wait_time_between_faults_in_seconds = wait_time_between_faults_in_seconds + self.wait_time_between_iterations_in_seconds = wait_time_between_iterations_in_seconds + self.cluster_health_policy = cluster_health_policy + self.context = context + self.chaos_target_filter = chaos_target_filter diff --git a/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event.py b/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event.py new file mode 100644 index 0000000..2275bc0 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event.py @@ -0,0 +1,83 @@ +# 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 .partition_event import PartitionEvent + + +class ChaosPartitionPrimaryMoveScheduledEvent(PartitionEvent): + """Chaos Move Primary Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param service_name: Required. Service name. + :type service_name: str + :param node_to: Required. The name of a Service Fabric node. + :type node_to: str + :param forced_move: Required. Indicates a forced move. + :type forced_move: bool + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_name': {'required': True}, + 'node_to': {'required': True}, + 'forced_move': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'node_to': {'key': 'NodeTo', 'type': 'str'}, + 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ChaosPartitionPrimaryMoveScheduledEvent, self).__init__(**kwargs) + self.fault_group_id = kwargs.get('fault_group_id', None) + self.fault_id = kwargs.get('fault_id', None) + self.service_name = kwargs.get('service_name', None) + self.node_to = kwargs.get('node_to', None) + self.forced_move = kwargs.get('forced_move', None) + self.kind = 'ChaosPartitionPrimaryMoveScheduled' diff --git a/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event_py3.py new file mode 100644 index 0000000..e6d714d --- /dev/null +++ b/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event_py3.py @@ -0,0 +1,83 @@ +# 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 .partition_event_py3 import PartitionEvent + + +class ChaosPartitionPrimaryMoveScheduledEvent(PartitionEvent): + """Chaos Move Primary Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param service_name: Required. Service name. + :type service_name: str + :param node_to: Required. The name of a Service Fabric node. + :type node_to: str + :param forced_move: Required. Indicates a forced move. + :type forced_move: bool + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_name': {'required': True}, + 'node_to': {'required': True}, + 'forced_move': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'node_to': {'key': 'NodeTo', 'type': 'str'}, + 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, fault_group_id: str, fault_id: str, service_name: str, node_to: str, forced_move: bool, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ChaosPartitionPrimaryMoveScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.fault_group_id = fault_group_id + self.fault_id = fault_id + self.service_name = service_name + self.node_to = node_to + self.forced_move = forced_move + self.kind = 'ChaosPartitionPrimaryMoveScheduled' diff --git a/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event.py b/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event.py new file mode 100644 index 0000000..89a7012 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event.py @@ -0,0 +1,88 @@ +# 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 .partition_event import PartitionEvent + + +class ChaosPartitionSecondaryMoveScheduledEvent(PartitionEvent): + """Chaos Move Secondary Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param service_name: Required. Service name. + :type service_name: str + :param source_node: Required. The name of a Service Fabric node. + :type source_node: str + :param destination_node: Required. The name of a Service Fabric node. + :type destination_node: str + :param forced_move: Required. Indicates a forced move. + :type forced_move: bool + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_name': {'required': True}, + 'source_node': {'required': True}, + 'destination_node': {'required': True}, + 'forced_move': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'source_node': {'key': 'SourceNode', 'type': 'str'}, + 'destination_node': {'key': 'DestinationNode', 'type': 'str'}, + 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ChaosPartitionSecondaryMoveScheduledEvent, self).__init__(**kwargs) + self.fault_group_id = kwargs.get('fault_group_id', None) + self.fault_id = kwargs.get('fault_id', None) + self.service_name = kwargs.get('service_name', None) + self.source_node = kwargs.get('source_node', None) + self.destination_node = kwargs.get('destination_node', None) + self.forced_move = kwargs.get('forced_move', None) + self.kind = 'ChaosPartitionSecondaryMoveScheduled' diff --git a/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event_py3.py new file mode 100644 index 0000000..c385d53 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event_py3.py @@ -0,0 +1,88 @@ +# 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 .partition_event_py3 import PartitionEvent + + +class ChaosPartitionSecondaryMoveScheduledEvent(PartitionEvent): + """Chaos Move Secondary Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param service_name: Required. Service name. + :type service_name: str + :param source_node: Required. The name of a Service Fabric node. + :type source_node: str + :param destination_node: Required. The name of a Service Fabric node. + :type destination_node: str + :param forced_move: Required. Indicates a forced move. + :type forced_move: bool + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_name': {'required': True}, + 'source_node': {'required': True}, + 'destination_node': {'required': True}, + 'forced_move': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'source_node': {'key': 'SourceNode', 'type': 'str'}, + 'destination_node': {'key': 'DestinationNode', 'type': 'str'}, + 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, fault_group_id: str, fault_id: str, service_name: str, source_node: str, destination_node: str, forced_move: bool, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ChaosPartitionSecondaryMoveScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.fault_group_id = fault_group_id + self.fault_id = fault_id + self.service_name = service_name + self.source_node = source_node + self.destination_node = destination_node + self.forced_move = forced_move + self.kind = 'ChaosPartitionSecondaryMoveScheduled' diff --git a/customSDK/servicefabric/models/chaos_py3.py b/customSDK/servicefabric/models/chaos_py3.py new file mode 100644 index 0000000..ab49661 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class Chaos(Model): + """Contains a description of Chaos. + + :param chaos_parameters: If Chaos is running, these are the parameters + Chaos is running with. + :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters + :param status: Current status of the Chaos run. Possible values include: + 'Invalid', 'Running', 'Stopped' + :type status: str or ~azure.servicefabric.models.ChaosStatus + :param schedule_status: Current status of the schedule. Possible values + include: 'Invalid', 'Stopped', 'Active', 'Expired', 'Pending' + :type schedule_status: str or + ~azure.servicefabric.models.ChaosScheduleStatus + """ + + _attribute_map = { + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'schedule_status': {'key': 'ScheduleStatus', 'type': 'str'}, + } + + def __init__(self, *, chaos_parameters=None, status=None, schedule_status=None, **kwargs) -> None: + super(Chaos, self).__init__(**kwargs) + self.chaos_parameters = chaos_parameters + self.status = status + self.schedule_status = schedule_status diff --git a/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event.py b/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event.py new file mode 100644 index 0000000..3ac7810 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event.py @@ -0,0 +1,83 @@ +# 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 .replica_event import ReplicaEvent + + +class ChaosReplicaRemovalScheduledEvent(ReplicaEvent): + """Chaos Remove Replica Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param service_uri: Required. Service name. + :type service_uri: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChaosReplicaRemovalScheduledEvent, self).__init__(**kwargs) + self.fault_group_id = kwargs.get('fault_group_id', None) + self.fault_id = kwargs.get('fault_id', None) + self.service_uri = kwargs.get('service_uri', None) + self.kind = 'ChaosReplicaRemovalScheduled' diff --git a/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event_py3.py new file mode 100644 index 0000000..81db7b0 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event_py3.py @@ -0,0 +1,83 @@ +# 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 .replica_event_py3 import ReplicaEvent + + +class ChaosReplicaRemovalScheduledEvent(ReplicaEvent): + """Chaos Remove Replica Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param service_uri: Required. Service name. + :type service_uri: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, fault_group_id: str, fault_id: str, service_uri: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ChaosReplicaRemovalScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.fault_group_id = fault_group_id + self.fault_id = fault_id + self.service_uri = service_uri + self.kind = 'ChaosReplicaRemovalScheduled' diff --git a/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event.py b/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event.py new file mode 100644 index 0000000..c877e86 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event.py @@ -0,0 +1,83 @@ +# 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 .replica_event import ReplicaEvent + + +class ChaosReplicaRestartScheduledEvent(ReplicaEvent): + """Chaos Restart Replica Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param service_uri: Required. Service name. + :type service_uri: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChaosReplicaRestartScheduledEvent, self).__init__(**kwargs) + self.fault_group_id = kwargs.get('fault_group_id', None) + self.fault_id = kwargs.get('fault_id', None) + self.service_uri = kwargs.get('service_uri', None) + self.kind = 'ChaosReplicaRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event_py3.py new file mode 100644 index 0000000..f8b2cbb --- /dev/null +++ b/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event_py3.py @@ -0,0 +1,83 @@ +# 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 .replica_event_py3 import ReplicaEvent + + +class ChaosReplicaRestartScheduledEvent(ReplicaEvent): + """Chaos Restart Replica Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param service_uri: Required. Service name. + :type service_uri: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, fault_group_id: str, fault_id: str, service_uri: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ChaosReplicaRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.fault_group_id = fault_group_id + self.fault_id = fault_id + self.service_uri = service_uri + self.kind = 'ChaosReplicaRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_schedule.py b/customSDK/servicefabric/models/chaos_schedule.py new file mode 100644 index 0000000..bac824b --- /dev/null +++ b/customSDK/servicefabric/models/chaos_schedule.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class ChaosSchedule(Model): + """Defines the schedule used by Chaos. + + :param start_date: The date and time Chaos will start using this schedule. + Default value: "1601-01-01T00:00:00Z" . + :type start_date: datetime + :param expiry_date: The date and time Chaos will continue to use this + schedule until. Default value: "9999-12-31T23:59:59.999Z" . + :type expiry_date: datetime + :param chaos_parameters_dictionary: A mapping of string names to Chaos + Parameters to be referenced by Chaos Schedule Jobs. + :type chaos_parameters_dictionary: + list[~azure.servicefabric.models.ChaosParametersDictionaryItem] + :param jobs: A list of all Chaos Schedule Jobs that will be automated by + the schedule. + :type jobs: list[~azure.servicefabric.models.ChaosScheduleJob] + """ + + _attribute_map = { + 'start_date': {'key': 'StartDate', 'type': 'iso-8601'}, + 'expiry_date': {'key': 'ExpiryDate', 'type': 'iso-8601'}, + 'chaos_parameters_dictionary': {'key': 'ChaosParametersDictionary', 'type': '[ChaosParametersDictionaryItem]'}, + 'jobs': {'key': 'Jobs', 'type': '[ChaosScheduleJob]'}, + } + + def __init__(self, **kwargs): + super(ChaosSchedule, self).__init__(**kwargs) + self.start_date = kwargs.get('start_date', "1601-01-01T00:00:00Z") + self.expiry_date = kwargs.get('expiry_date', "9999-12-31T23:59:59.999Z") + self.chaos_parameters_dictionary = kwargs.get('chaos_parameters_dictionary', None) + self.jobs = kwargs.get('jobs', None) diff --git a/customSDK/servicefabric/models/chaos_schedule_description.py b/customSDK/servicefabric/models/chaos_schedule_description.py new file mode 100644 index 0000000..8a7d376 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_schedule_description.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class ChaosScheduleDescription(Model): + """Defines the Chaos Schedule used by Chaos and the version of the Chaos + Schedule. The version value wraps back to 0 after surpassing 2,147,483,647. + + :param version: The version number of the Schedule. + :type version: int + :param schedule: Defines the schedule used by Chaos. + :type schedule: ~azure.servicefabric.models.ChaosSchedule + """ + + _validation = { + 'version': {'minimum': 0}, + } + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'int'}, + 'schedule': {'key': 'Schedule', 'type': 'ChaosSchedule'}, + } + + def __init__(self, **kwargs): + super(ChaosScheduleDescription, self).__init__(**kwargs) + self.version = kwargs.get('version', None) + self.schedule = kwargs.get('schedule', None) diff --git a/customSDK/servicefabric/models/chaos_schedule_description_py3.py b/customSDK/servicefabric/models/chaos_schedule_description_py3.py new file mode 100644 index 0000000..aeb7d9e --- /dev/null +++ b/customSDK/servicefabric/models/chaos_schedule_description_py3.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class ChaosScheduleDescription(Model): + """Defines the Chaos Schedule used by Chaos and the version of the Chaos + Schedule. The version value wraps back to 0 after surpassing 2,147,483,647. + + :param version: The version number of the Schedule. + :type version: int + :param schedule: Defines the schedule used by Chaos. + :type schedule: ~azure.servicefabric.models.ChaosSchedule + """ + + _validation = { + 'version': {'minimum': 0}, + } + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'int'}, + 'schedule': {'key': 'Schedule', 'type': 'ChaosSchedule'}, + } + + def __init__(self, *, version: int=None, schedule=None, **kwargs) -> None: + super(ChaosScheduleDescription, self).__init__(**kwargs) + self.version = version + self.schedule = schedule diff --git a/customSDK/servicefabric/models/chaos_schedule_job.py b/customSDK/servicefabric/models/chaos_schedule_job.py new file mode 100644 index 0000000..3488251 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_schedule_job.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class ChaosScheduleJob(Model): + """Defines a repetition rule and parameters of Chaos to be used with the Chaos + Schedule. + + :param chaos_parameters: A reference to which Chaos Parameters of the + Chaos Schedule to use. + :type chaos_parameters: str + :param days: Defines the days of the week that a Chaos Schedule Job will + run for. + :type days: ~azure.servicefabric.models.ChaosScheduleJobActiveDaysOfWeek + :param times: A list of Time Ranges that specify when during active days + that this job will run. The times are interpreted as UTC. + :type times: list[~azure.servicefabric.models.TimeRange] + """ + + _attribute_map = { + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'str'}, + 'days': {'key': 'Days', 'type': 'ChaosScheduleJobActiveDaysOfWeek'}, + 'times': {'key': 'Times', 'type': '[TimeRange]'}, + } + + def __init__(self, **kwargs): + super(ChaosScheduleJob, self).__init__(**kwargs) + self.chaos_parameters = kwargs.get('chaos_parameters', None) + self.days = kwargs.get('days', None) + self.times = kwargs.get('times', None) diff --git a/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week.py b/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week.py new file mode 100644 index 0000000..3586ce0 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week.py @@ -0,0 +1,59 @@ +# 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 msrest.serialization import Model + + +class ChaosScheduleJobActiveDaysOfWeek(Model): + """Defines the days of the week that a Chaos Schedule Job will run for. + + :param sunday: Indicates if the Chaos Schedule Job will run on Sunday. + Default value: False . + :type sunday: bool + :param monday: Indicates if the Chaos Schedule Job will run on Monday. + Default value: False . + :type monday: bool + :param tuesday: Indicates if the Chaos Schedule Job will run on Tuesday. + Default value: False . + :type tuesday: bool + :param wednesday: Indicates if the Chaos Schedule Job will run on + Wednesday. Default value: False . + :type wednesday: bool + :param thursday: Indicates if the Chaos Schedule Job will run on Thursday. + Default value: False . + :type thursday: bool + :param friday: Indicates if the Chaos Schedule Job will run on Friday. + Default value: False . + :type friday: bool + :param saturday: Indicates if the Chaos Schedule Job will run on Saturday. + Default value: False . + :type saturday: bool + """ + + _attribute_map = { + 'sunday': {'key': 'Sunday', 'type': 'bool'}, + 'monday': {'key': 'Monday', 'type': 'bool'}, + 'tuesday': {'key': 'Tuesday', 'type': 'bool'}, + 'wednesday': {'key': 'Wednesday', 'type': 'bool'}, + 'thursday': {'key': 'Thursday', 'type': 'bool'}, + 'friday': {'key': 'Friday', 'type': 'bool'}, + 'saturday': {'key': 'Saturday', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ChaosScheduleJobActiveDaysOfWeek, self).__init__(**kwargs) + self.sunday = kwargs.get('sunday', False) + self.monday = kwargs.get('monday', False) + self.tuesday = kwargs.get('tuesday', False) + self.wednesday = kwargs.get('wednesday', False) + self.thursday = kwargs.get('thursday', False) + self.friday = kwargs.get('friday', False) + self.saturday = kwargs.get('saturday', False) diff --git a/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week_py3.py b/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week_py3.py new file mode 100644 index 0000000..75c07c5 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week_py3.py @@ -0,0 +1,59 @@ +# 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 msrest.serialization import Model + + +class ChaosScheduleJobActiveDaysOfWeek(Model): + """Defines the days of the week that a Chaos Schedule Job will run for. + + :param sunday: Indicates if the Chaos Schedule Job will run on Sunday. + Default value: False . + :type sunday: bool + :param monday: Indicates if the Chaos Schedule Job will run on Monday. + Default value: False . + :type monday: bool + :param tuesday: Indicates if the Chaos Schedule Job will run on Tuesday. + Default value: False . + :type tuesday: bool + :param wednesday: Indicates if the Chaos Schedule Job will run on + Wednesday. Default value: False . + :type wednesday: bool + :param thursday: Indicates if the Chaos Schedule Job will run on Thursday. + Default value: False . + :type thursday: bool + :param friday: Indicates if the Chaos Schedule Job will run on Friday. + Default value: False . + :type friday: bool + :param saturday: Indicates if the Chaos Schedule Job will run on Saturday. + Default value: False . + :type saturday: bool + """ + + _attribute_map = { + 'sunday': {'key': 'Sunday', 'type': 'bool'}, + 'monday': {'key': 'Monday', 'type': 'bool'}, + 'tuesday': {'key': 'Tuesday', 'type': 'bool'}, + 'wednesday': {'key': 'Wednesday', 'type': 'bool'}, + 'thursday': {'key': 'Thursday', 'type': 'bool'}, + 'friday': {'key': 'Friday', 'type': 'bool'}, + 'saturday': {'key': 'Saturday', 'type': 'bool'}, + } + + def __init__(self, *, sunday: bool=False, monday: bool=False, tuesday: bool=False, wednesday: bool=False, thursday: bool=False, friday: bool=False, saturday: bool=False, **kwargs) -> None: + super(ChaosScheduleJobActiveDaysOfWeek, self).__init__(**kwargs) + self.sunday = sunday + self.monday = monday + self.tuesday = tuesday + self.wednesday = wednesday + self.thursday = thursday + self.friday = friday + self.saturday = saturday diff --git a/customSDK/servicefabric/models/chaos_schedule_job_py3.py b/customSDK/servicefabric/models/chaos_schedule_job_py3.py new file mode 100644 index 0000000..de766ca --- /dev/null +++ b/customSDK/servicefabric/models/chaos_schedule_job_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class ChaosScheduleJob(Model): + """Defines a repetition rule and parameters of Chaos to be used with the Chaos + Schedule. + + :param chaos_parameters: A reference to which Chaos Parameters of the + Chaos Schedule to use. + :type chaos_parameters: str + :param days: Defines the days of the week that a Chaos Schedule Job will + run for. + :type days: ~azure.servicefabric.models.ChaosScheduleJobActiveDaysOfWeek + :param times: A list of Time Ranges that specify when during active days + that this job will run. The times are interpreted as UTC. + :type times: list[~azure.servicefabric.models.TimeRange] + """ + + _attribute_map = { + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'str'}, + 'days': {'key': 'Days', 'type': 'ChaosScheduleJobActiveDaysOfWeek'}, + 'times': {'key': 'Times', 'type': '[TimeRange]'}, + } + + def __init__(self, *, chaos_parameters: str=None, days=None, times=None, **kwargs) -> None: + super(ChaosScheduleJob, self).__init__(**kwargs) + self.chaos_parameters = chaos_parameters + self.days = days + self.times = times diff --git a/customSDK/servicefabric/models/chaos_schedule_py3.py b/customSDK/servicefabric/models/chaos_schedule_py3.py new file mode 100644 index 0000000..78ee2ce --- /dev/null +++ b/customSDK/servicefabric/models/chaos_schedule_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class ChaosSchedule(Model): + """Defines the schedule used by Chaos. + + :param start_date: The date and time Chaos will start using this schedule. + Default value: "1601-01-01T00:00:00Z" . + :type start_date: datetime + :param expiry_date: The date and time Chaos will continue to use this + schedule until. Default value: "9999-12-31T23:59:59.999Z" . + :type expiry_date: datetime + :param chaos_parameters_dictionary: A mapping of string names to Chaos + Parameters to be referenced by Chaos Schedule Jobs. + :type chaos_parameters_dictionary: + list[~azure.servicefabric.models.ChaosParametersDictionaryItem] + :param jobs: A list of all Chaos Schedule Jobs that will be automated by + the schedule. + :type jobs: list[~azure.servicefabric.models.ChaosScheduleJob] + """ + + _attribute_map = { + 'start_date': {'key': 'StartDate', 'type': 'iso-8601'}, + 'expiry_date': {'key': 'ExpiryDate', 'type': 'iso-8601'}, + 'chaos_parameters_dictionary': {'key': 'ChaosParametersDictionary', 'type': '[ChaosParametersDictionaryItem]'}, + 'jobs': {'key': 'Jobs', 'type': '[ChaosScheduleJob]'}, + } + + def __init__(self, *, start_date="1601-01-01T00:00:00Z", expiry_date="9999-12-31T23:59:59.999Z", chaos_parameters_dictionary=None, jobs=None, **kwargs) -> None: + super(ChaosSchedule, self).__init__(**kwargs) + self.start_date = start_date + self.expiry_date = expiry_date + self.chaos_parameters_dictionary = chaos_parameters_dictionary + self.jobs = jobs diff --git a/customSDK/servicefabric/models/chaos_started_event.py b/customSDK/servicefabric/models/chaos_started_event.py new file mode 100644 index 0000000..d00971f --- /dev/null +++ b/customSDK/servicefabric/models/chaos_started_event.py @@ -0,0 +1,105 @@ +# 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 .cluster_event import ClusterEvent + + +class ChaosStartedEvent(ClusterEvent): + """Chaos Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param max_concurrent_faults: Required. Maximum number of concurrent + faults. + :type max_concurrent_faults: long + :param time_to_run_in_seconds: Required. Time to run in seconds. + :type time_to_run_in_seconds: float + :param max_cluster_stabilization_timeout_in_seconds: Required. Maximum + timeout for cluster stabilization in seconds. + :type max_cluster_stabilization_timeout_in_seconds: float + :param wait_time_between_iterations_in_seconds: Required. Wait time + between iterations in seconds. + :type wait_time_between_iterations_in_seconds: float + :param wait_time_between_faults_in_seconds: Required. Wait time between + faults in seconds. + :type wait_time_between_faults_in_seconds: float + :param move_replica_fault_enabled: Required. Indicates MoveReplica fault + is enabled. + :type move_replica_fault_enabled: bool + :param included_node_type_list: Required. List of included Node types. + :type included_node_type_list: str + :param included_application_list: Required. List of included Applications. + :type included_application_list: str + :param cluster_health_policy: Required. Health policy. + :type cluster_health_policy: str + :param chaos_context: Required. Chaos Context. + :type chaos_context: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'max_concurrent_faults': {'required': True}, + 'time_to_run_in_seconds': {'required': True}, + 'max_cluster_stabilization_timeout_in_seconds': {'required': True}, + 'wait_time_between_iterations_in_seconds': {'required': True}, + 'wait_time_between_faults_in_seconds': {'required': True}, + 'move_replica_fault_enabled': {'required': True}, + 'included_node_type_list': {'required': True}, + 'included_application_list': {'required': True}, + 'cluster_health_policy': {'required': True}, + 'chaos_context': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, + 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'float'}, + 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'float'}, + 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'float'}, + 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'float'}, + 'move_replica_fault_enabled': {'key': 'MoveReplicaFaultEnabled', 'type': 'bool'}, + 'included_node_type_list': {'key': 'IncludedNodeTypeList', 'type': 'str'}, + 'included_application_list': {'key': 'IncludedApplicationList', 'type': 'str'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'str'}, + 'chaos_context': {'key': 'ChaosContext', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChaosStartedEvent, self).__init__(**kwargs) + self.max_concurrent_faults = kwargs.get('max_concurrent_faults', None) + self.time_to_run_in_seconds = kwargs.get('time_to_run_in_seconds', None) + self.max_cluster_stabilization_timeout_in_seconds = kwargs.get('max_cluster_stabilization_timeout_in_seconds', None) + self.wait_time_between_iterations_in_seconds = kwargs.get('wait_time_between_iterations_in_seconds', None) + self.wait_time_between_faults_in_seconds = kwargs.get('wait_time_between_faults_in_seconds', None) + self.move_replica_fault_enabled = kwargs.get('move_replica_fault_enabled', None) + self.included_node_type_list = kwargs.get('included_node_type_list', None) + self.included_application_list = kwargs.get('included_application_list', None) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.chaos_context = kwargs.get('chaos_context', None) + self.kind = 'ChaosStarted' diff --git a/customSDK/servicefabric/models/chaos_started_event_py3.py b/customSDK/servicefabric/models/chaos_started_event_py3.py new file mode 100644 index 0000000..81bb018 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_started_event_py3.py @@ -0,0 +1,105 @@ +# 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 .cluster_event_py3 import ClusterEvent + + +class ChaosStartedEvent(ClusterEvent): + """Chaos Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param max_concurrent_faults: Required. Maximum number of concurrent + faults. + :type max_concurrent_faults: long + :param time_to_run_in_seconds: Required. Time to run in seconds. + :type time_to_run_in_seconds: float + :param max_cluster_stabilization_timeout_in_seconds: Required. Maximum + timeout for cluster stabilization in seconds. + :type max_cluster_stabilization_timeout_in_seconds: float + :param wait_time_between_iterations_in_seconds: Required. Wait time + between iterations in seconds. + :type wait_time_between_iterations_in_seconds: float + :param wait_time_between_faults_in_seconds: Required. Wait time between + faults in seconds. + :type wait_time_between_faults_in_seconds: float + :param move_replica_fault_enabled: Required. Indicates MoveReplica fault + is enabled. + :type move_replica_fault_enabled: bool + :param included_node_type_list: Required. List of included Node types. + :type included_node_type_list: str + :param included_application_list: Required. List of included Applications. + :type included_application_list: str + :param cluster_health_policy: Required. Health policy. + :type cluster_health_policy: str + :param chaos_context: Required. Chaos Context. + :type chaos_context: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'max_concurrent_faults': {'required': True}, + 'time_to_run_in_seconds': {'required': True}, + 'max_cluster_stabilization_timeout_in_seconds': {'required': True}, + 'wait_time_between_iterations_in_seconds': {'required': True}, + 'wait_time_between_faults_in_seconds': {'required': True}, + 'move_replica_fault_enabled': {'required': True}, + 'included_node_type_list': {'required': True}, + 'included_application_list': {'required': True}, + 'cluster_health_policy': {'required': True}, + 'chaos_context': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, + 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'float'}, + 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'float'}, + 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'float'}, + 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'float'}, + 'move_replica_fault_enabled': {'key': 'MoveReplicaFaultEnabled', 'type': 'bool'}, + 'included_node_type_list': {'key': 'IncludedNodeTypeList', 'type': 'str'}, + 'included_application_list': {'key': 'IncludedApplicationList', 'type': 'str'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'str'}, + 'chaos_context': {'key': 'ChaosContext', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, max_concurrent_faults: int, time_to_run_in_seconds: float, max_cluster_stabilization_timeout_in_seconds: float, wait_time_between_iterations_in_seconds: float, wait_time_between_faults_in_seconds: float, move_replica_fault_enabled: bool, included_node_type_list: str, included_application_list: str, cluster_health_policy: str, chaos_context: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ChaosStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.max_concurrent_faults = max_concurrent_faults + self.time_to_run_in_seconds = time_to_run_in_seconds + self.max_cluster_stabilization_timeout_in_seconds = max_cluster_stabilization_timeout_in_seconds + self.wait_time_between_iterations_in_seconds = wait_time_between_iterations_in_seconds + self.wait_time_between_faults_in_seconds = wait_time_between_faults_in_seconds + self.move_replica_fault_enabled = move_replica_fault_enabled + self.included_node_type_list = included_node_type_list + self.included_application_list = included_application_list + self.cluster_health_policy = cluster_health_policy + self.chaos_context = chaos_context + self.kind = 'ChaosStarted' diff --git a/customSDK/servicefabric/models/chaos_stopped_event.py b/customSDK/servicefabric/models/chaos_stopped_event.py new file mode 100644 index 0000000..744662f --- /dev/null +++ b/customSDK/servicefabric/models/chaos_stopped_event.py @@ -0,0 +1,55 @@ +# 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 .cluster_event import ClusterEvent + + +class ChaosStoppedEvent(ClusterEvent): + """Chaos Stopped event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Required. Describes reason. + :type reason: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'reason': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChaosStoppedEvent, self).__init__(**kwargs) + self.reason = kwargs.get('reason', None) + self.kind = 'ChaosStopped' diff --git a/customSDK/servicefabric/models/chaos_stopped_event_py3.py b/customSDK/servicefabric/models/chaos_stopped_event_py3.py new file mode 100644 index 0000000..70be550 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_stopped_event_py3.py @@ -0,0 +1,55 @@ +# 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 .cluster_event_py3 import ClusterEvent + + +class ChaosStoppedEvent(ClusterEvent): + """Chaos Stopped event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Required. Describes reason. + :type reason: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'reason': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, reason: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ChaosStoppedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.reason = reason + self.kind = 'ChaosStopped' diff --git a/customSDK/servicefabric/models/chaos_target_filter.py b/customSDK/servicefabric/models/chaos_target_filter.py new file mode 100644 index 0000000..97d513b --- /dev/null +++ b/customSDK/servicefabric/models/chaos_target_filter.py @@ -0,0 +1,78 @@ +# 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 msrest.serialization import Model + + +class ChaosTargetFilter(Model): + """Defines all filters for targeted Chaos faults, for example, faulting only + certain node types or faulting only certain applications. + If ChaosTargetFilter is not used, Chaos faults all cluster entities. If + ChaosTargetFilter is used, Chaos faults only the entities that meet the + ChaosTargetFilter + specification. NodeTypeInclusionList and ApplicationInclusionList allow a + union semantics only. It is not possible to specify an intersection + of NodeTypeInclusionList and ApplicationInclusionList. For example, it is + not possible to specify "fault this application only when it is on that + node type." + Once an entity is included in either NodeTypeInclusionList or + ApplicationInclusionList, that entity cannot be excluded using + ChaosTargetFilter. Even if + applicationX does not appear in ApplicationInclusionList, in some Chaos + iteration applicationX can be faulted because it happens to be on a node of + nodeTypeY that is included + in NodeTypeInclusionList. If both NodeTypeInclusionList and + ApplicationInclusionList are null or empty, an ArgumentException is thrown. + + :param node_type_inclusion_list: A list of node types to include in Chaos + faults. + All types of faults (restart node, restart code package, remove replica, + restart replica, move primary, and move secondary) are enabled for the + nodes of these node types. + If a node type (say NodeTypeX) does not appear in the + NodeTypeInclusionList, then node level faults (like NodeRestart) will + never be enabled for the nodes of + NodeTypeX, but code package and replica faults can still be enabled for + NodeTypeX if an application in the ApplicationInclusionList. + happens to reside on a node of NodeTypeX. + At most 100 node type names can be included in this list, to increase this + number, a config upgrade is required for + MaxNumberOfNodeTypesInChaosEntityFilter configuration. + :type node_type_inclusion_list: list[str] + :param application_inclusion_list: A list of application URIs to include + in Chaos faults. + All replicas belonging to services of these applications are amenable to + replica faults (restart replica, remove replica, move primary, and move + secondary) by Chaos. + Chaos may restart a code package only if the code package hosts replicas + of these applications only. + If an application does not appear in this list, it can still be faulted in + some Chaos iteration if the application ends up on a node of a node type + that is included in NodeTypeInclusionList. + However, if applicationX is tied to nodeTypeY through placement + constraints and applicationX is absent from ApplicationInclusionList and + nodeTypeY is absent from NodeTypeInclusionList, then applicationX will + never be faulted. + At most 1000 application names can be included in this list, to increase + this number, a config upgrade is required for + MaxNumberOfApplicationsInChaosEntityFilter configuration. + :type application_inclusion_list: list[str] + """ + + _attribute_map = { + 'node_type_inclusion_list': {'key': 'NodeTypeInclusionList', 'type': '[str]'}, + 'application_inclusion_list': {'key': 'ApplicationInclusionList', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ChaosTargetFilter, self).__init__(**kwargs) + self.node_type_inclusion_list = kwargs.get('node_type_inclusion_list', None) + self.application_inclusion_list = kwargs.get('application_inclusion_list', None) diff --git a/customSDK/servicefabric/models/chaos_target_filter_py3.py b/customSDK/servicefabric/models/chaos_target_filter_py3.py new file mode 100644 index 0000000..7bcb2f0 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_target_filter_py3.py @@ -0,0 +1,78 @@ +# 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 msrest.serialization import Model + + +class ChaosTargetFilter(Model): + """Defines all filters for targeted Chaos faults, for example, faulting only + certain node types or faulting only certain applications. + If ChaosTargetFilter is not used, Chaos faults all cluster entities. If + ChaosTargetFilter is used, Chaos faults only the entities that meet the + ChaosTargetFilter + specification. NodeTypeInclusionList and ApplicationInclusionList allow a + union semantics only. It is not possible to specify an intersection + of NodeTypeInclusionList and ApplicationInclusionList. For example, it is + not possible to specify "fault this application only when it is on that + node type." + Once an entity is included in either NodeTypeInclusionList or + ApplicationInclusionList, that entity cannot be excluded using + ChaosTargetFilter. Even if + applicationX does not appear in ApplicationInclusionList, in some Chaos + iteration applicationX can be faulted because it happens to be on a node of + nodeTypeY that is included + in NodeTypeInclusionList. If both NodeTypeInclusionList and + ApplicationInclusionList are null or empty, an ArgumentException is thrown. + + :param node_type_inclusion_list: A list of node types to include in Chaos + faults. + All types of faults (restart node, restart code package, remove replica, + restart replica, move primary, and move secondary) are enabled for the + nodes of these node types. + If a node type (say NodeTypeX) does not appear in the + NodeTypeInclusionList, then node level faults (like NodeRestart) will + never be enabled for the nodes of + NodeTypeX, but code package and replica faults can still be enabled for + NodeTypeX if an application in the ApplicationInclusionList. + happens to reside on a node of NodeTypeX. + At most 100 node type names can be included in this list, to increase this + number, a config upgrade is required for + MaxNumberOfNodeTypesInChaosEntityFilter configuration. + :type node_type_inclusion_list: list[str] + :param application_inclusion_list: A list of application URIs to include + in Chaos faults. + All replicas belonging to services of these applications are amenable to + replica faults (restart replica, remove replica, move primary, and move + secondary) by Chaos. + Chaos may restart a code package only if the code package hosts replicas + of these applications only. + If an application does not appear in this list, it can still be faulted in + some Chaos iteration if the application ends up on a node of a node type + that is included in NodeTypeInclusionList. + However, if applicationX is tied to nodeTypeY through placement + constraints and applicationX is absent from ApplicationInclusionList and + nodeTypeY is absent from NodeTypeInclusionList, then applicationX will + never be faulted. + At most 1000 application names can be included in this list, to increase + this number, a config upgrade is required for + MaxNumberOfApplicationsInChaosEntityFilter configuration. + :type application_inclusion_list: list[str] + """ + + _attribute_map = { + 'node_type_inclusion_list': {'key': 'NodeTypeInclusionList', 'type': '[str]'}, + 'application_inclusion_list': {'key': 'ApplicationInclusionList', 'type': '[str]'}, + } + + def __init__(self, *, node_type_inclusion_list=None, application_inclusion_list=None, **kwargs) -> None: + super(ChaosTargetFilter, self).__init__(**kwargs) + self.node_type_inclusion_list = node_type_inclusion_list + self.application_inclusion_list = application_inclusion_list diff --git a/customSDK/servicefabric/models/check_exists_property_batch_operation.py b/customSDK/servicefabric/models/check_exists_property_batch_operation.py new file mode 100644 index 0000000..14ec2d9 --- /dev/null +++ b/customSDK/servicefabric/models/check_exists_property_batch_operation.py @@ -0,0 +1,51 @@ +# 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 .property_batch_operation import PropertyBatchOperation + + +class CheckExistsPropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that compares the Boolean existence of + a property with the Exists argument. + The PropertyBatchOperation operation fails if the property's existence is + not equal to the Exists argument. + The CheckExistsPropertyBatchOperation is generally used as a precondition + for the write operations in the batch. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param exists: Required. Whether or not the property should exist for the + operation to pass. + :type exists: bool + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + 'exists': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'exists': {'key': 'Exists', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(CheckExistsPropertyBatchOperation, self).__init__(**kwargs) + self.exists = kwargs.get('exists', None) + self.kind = 'CheckExists' diff --git a/customSDK/servicefabric/models/check_exists_property_batch_operation_py3.py b/customSDK/servicefabric/models/check_exists_property_batch_operation_py3.py new file mode 100644 index 0000000..2bb27c8 --- /dev/null +++ b/customSDK/servicefabric/models/check_exists_property_batch_operation_py3.py @@ -0,0 +1,51 @@ +# 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 .property_batch_operation_py3 import PropertyBatchOperation + + +class CheckExistsPropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that compares the Boolean existence of + a property with the Exists argument. + The PropertyBatchOperation operation fails if the property's existence is + not equal to the Exists argument. + The CheckExistsPropertyBatchOperation is generally used as a precondition + for the write operations in the batch. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param exists: Required. Whether or not the property should exist for the + operation to pass. + :type exists: bool + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + 'exists': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'exists': {'key': 'Exists', 'type': 'bool'}, + } + + def __init__(self, *, property_name: str, exists: bool, **kwargs) -> None: + super(CheckExistsPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.exists = exists + self.kind = 'CheckExists' diff --git a/customSDK/servicefabric/models/check_sequence_property_batch_operation.py b/customSDK/servicefabric/models/check_sequence_property_batch_operation.py new file mode 100644 index 0000000..306b3ae --- /dev/null +++ b/customSDK/servicefabric/models/check_sequence_property_batch_operation.py @@ -0,0 +1,52 @@ +# 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 .property_batch_operation import PropertyBatchOperation + + +class CheckSequencePropertyBatchOperation(PropertyBatchOperation): + """Compares the Sequence Number of a property with the SequenceNumber + argument. + A property's sequence number can be thought of as that property's version. + Every time the property is modified, its sequence number is increased. + The sequence number can be found in a property's metadata. + The comparison fails if the sequence numbers are not equal. + CheckSequencePropertyBatchOperation is generally used as a precondition for + the write operations in the batch. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param sequence_number: Required. The expected sequence number. + :type sequence_number: str + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + 'sequence_number': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckSequencePropertyBatchOperation, self).__init__(**kwargs) + self.sequence_number = kwargs.get('sequence_number', None) + self.kind = 'CheckSequence' diff --git a/customSDK/servicefabric/models/check_sequence_property_batch_operation_py3.py b/customSDK/servicefabric/models/check_sequence_property_batch_operation_py3.py new file mode 100644 index 0000000..7dabd0f --- /dev/null +++ b/customSDK/servicefabric/models/check_sequence_property_batch_operation_py3.py @@ -0,0 +1,52 @@ +# 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 .property_batch_operation_py3 import PropertyBatchOperation + + +class CheckSequencePropertyBatchOperation(PropertyBatchOperation): + """Compares the Sequence Number of a property with the SequenceNumber + argument. + A property's sequence number can be thought of as that property's version. + Every time the property is modified, its sequence number is increased. + The sequence number can be found in a property's metadata. + The comparison fails if the sequence numbers are not equal. + CheckSequencePropertyBatchOperation is generally used as a precondition for + the write operations in the batch. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param sequence_number: Required. The expected sequence number. + :type sequence_number: str + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + 'sequence_number': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + } + + def __init__(self, *, property_name: str, sequence_number: str, **kwargs) -> None: + super(CheckSequencePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.sequence_number = sequence_number + self.kind = 'CheckSequence' diff --git a/customSDK/servicefabric/models/check_value_property_batch_operation.py b/customSDK/servicefabric/models/check_value_property_batch_operation.py new file mode 100644 index 0000000..e1b8a3b --- /dev/null +++ b/customSDK/servicefabric/models/check_value_property_batch_operation.py @@ -0,0 +1,48 @@ +# 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 .property_batch_operation import PropertyBatchOperation + + +class CheckValuePropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that compares the value of the property + with the expected value. + The CheckValuePropertyBatchOperation is generally used as a precondition + for the write operations in the batch. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param value: Required. The expected property value. + :type value: ~azure.servicefabric.models.PropertyValue + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + } + + def __init__(self, **kwargs): + super(CheckValuePropertyBatchOperation, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.kind = 'CheckValue' diff --git a/customSDK/servicefabric/models/check_value_property_batch_operation_py3.py b/customSDK/servicefabric/models/check_value_property_batch_operation_py3.py new file mode 100644 index 0000000..8af0c8b --- /dev/null +++ b/customSDK/servicefabric/models/check_value_property_batch_operation_py3.py @@ -0,0 +1,48 @@ +# 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 .property_batch_operation_py3 import PropertyBatchOperation + + +class CheckValuePropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that compares the value of the property + with the expected value. + The CheckValuePropertyBatchOperation is generally used as a precondition + for the write operations in the batch. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param value: Required. The expected property value. + :type value: ~azure.servicefabric.models.PropertyValue + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + } + + def __init__(self, *, property_name: str, value, **kwargs) -> None: + super(CheckValuePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.value = value + self.kind = 'CheckValue' diff --git a/customSDK/servicefabric/models/cluster_configuration.py b/customSDK/servicefabric/models/cluster_configuration.py new file mode 100644 index 0000000..a888b4f --- /dev/null +++ b/customSDK/servicefabric/models/cluster_configuration.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class ClusterConfiguration(Model): + """Information about the standalone cluster configuration. + + :param cluster_configuration: The contents of the cluster configuration + file. + :type cluster_configuration: str + """ + + _attribute_map = { + 'cluster_configuration': {'key': 'ClusterConfiguration', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterConfiguration, self).__init__(**kwargs) + self.cluster_configuration = kwargs.get('cluster_configuration', None) diff --git a/customSDK/servicefabric/models/cluster_configuration_py3.py b/customSDK/servicefabric/models/cluster_configuration_py3.py new file mode 100644 index 0000000..5d6f409 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_configuration_py3.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class ClusterConfiguration(Model): + """Information about the standalone cluster configuration. + + :param cluster_configuration: The contents of the cluster configuration + file. + :type cluster_configuration: str + """ + + _attribute_map = { + 'cluster_configuration': {'key': 'ClusterConfiguration', 'type': 'str'}, + } + + def __init__(self, *, cluster_configuration: str=None, **kwargs) -> None: + super(ClusterConfiguration, self).__init__(**kwargs) + self.cluster_configuration = cluster_configuration diff --git a/customSDK/servicefabric/models/cluster_configuration_upgrade_description.py b/customSDK/servicefabric/models/cluster_configuration_upgrade_description.py new file mode 100644 index 0000000..699c387 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_configuration_upgrade_description.py @@ -0,0 +1,98 @@ +# 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 msrest.serialization import Model + + +class ClusterConfigurationUpgradeDescription(Model): + """Describes the parameters for a standalone cluster configuration upgrade. + + All required parameters must be populated in order to send to Azure. + + :param cluster_config: Required. The cluster configuration as a JSON + string. For example, [this + file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) + contains JSON describing the [nodes and other properties of the + cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). + :type cluster_config: str + :param health_check_retry_timeout: The length of time between attempts to + perform health checks if the application or cluster is not healthy. + Default value: "PT0H0M0S" . + :type health_check_retry_timeout: timedelta + :param health_check_wait_duration_in_seconds: The length of time to wait + after completing an upgrade domain before starting the health checks + process. Default value: "PT0H0M0S" . + :type health_check_wait_duration_in_seconds: timedelta + :param health_check_stable_duration_in_seconds: The length of time that + the application or cluster must remain healthy before the upgrade proceeds + to the next upgrade domain. Default value: "PT0H0M0S" . + :type health_check_stable_duration_in_seconds: timedelta + :param upgrade_domain_timeout_in_seconds: The timeout for the upgrade + domain. Default value: "PT0H0M0S" . + :type upgrade_domain_timeout_in_seconds: timedelta + :param upgrade_timeout_in_seconds: The upgrade timeout. Default value: + "PT0H0M0S" . + :type upgrade_timeout_in_seconds: timedelta + :param max_percent_unhealthy_applications: The maximum allowed percentage + of unhealthy applications during the upgrade. Allowed values are integer + values from zero to 100. Default value: 0 . + :type max_percent_unhealthy_applications: int + :param max_percent_unhealthy_nodes: The maximum allowed percentage of + unhealthy nodes during the upgrade. Allowed values are integer values from + zero to 100. Default value: 0 . + :type max_percent_unhealthy_nodes: int + :param max_percent_delta_unhealthy_nodes: The maximum allowed percentage + of delta health degradation during the upgrade. Allowed values are integer + values from zero to 100. Default value: 0 . + :type max_percent_delta_unhealthy_nodes: int + :param max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum + allowed percentage of upgrade domain delta health degradation during the + upgrade. Allowed values are integer values from zero to 100. Default + value: 0 . + :type max_percent_upgrade_domain_delta_unhealthy_nodes: int + :param application_health_policies: Defines the application health policy + map used to evaluate the health of an application or one of its children + entities. + :type application_health_policies: + ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _validation = { + 'cluster_config': {'required': True}, + } + + _attribute_map = { + 'cluster_config': {'key': 'ClusterConfig', 'type': 'str'}, + 'health_check_retry_timeout': {'key': 'HealthCheckRetryTimeout', 'type': 'duration'}, + 'health_check_wait_duration_in_seconds': {'key': 'HealthCheckWaitDurationInSeconds', 'type': 'duration'}, + 'health_check_stable_duration_in_seconds': {'key': 'HealthCheckStableDurationInSeconds', 'type': 'duration'}, + 'upgrade_domain_timeout_in_seconds': {'key': 'UpgradeDomainTimeoutInSeconds', 'type': 'duration'}, + 'upgrade_timeout_in_seconds': {'key': 'UpgradeTimeoutInSeconds', 'type': 'duration'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, + 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__(self, **kwargs): + super(ClusterConfigurationUpgradeDescription, self).__init__(**kwargs) + self.cluster_config = kwargs.get('cluster_config', None) + self.health_check_retry_timeout = kwargs.get('health_check_retry_timeout', "PT0H0M0S") + self.health_check_wait_duration_in_seconds = kwargs.get('health_check_wait_duration_in_seconds', "PT0H0M0S") + self.health_check_stable_duration_in_seconds = kwargs.get('health_check_stable_duration_in_seconds', "PT0H0M0S") + self.upgrade_domain_timeout_in_seconds = kwargs.get('upgrade_domain_timeout_in_seconds', "PT0H0M0S") + self.upgrade_timeout_in_seconds = kwargs.get('upgrade_timeout_in_seconds', "PT0H0M0S") + self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', 0) + self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', 0) + self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', 0) + self.max_percent_upgrade_domain_delta_unhealthy_nodes = kwargs.get('max_percent_upgrade_domain_delta_unhealthy_nodes', 0) + self.application_health_policies = kwargs.get('application_health_policies', None) diff --git a/customSDK/servicefabric/models/cluster_configuration_upgrade_description_py3.py b/customSDK/servicefabric/models/cluster_configuration_upgrade_description_py3.py new file mode 100644 index 0000000..856bd47 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_configuration_upgrade_description_py3.py @@ -0,0 +1,98 @@ +# 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 msrest.serialization import Model + + +class ClusterConfigurationUpgradeDescription(Model): + """Describes the parameters for a standalone cluster configuration upgrade. + + All required parameters must be populated in order to send to Azure. + + :param cluster_config: Required. The cluster configuration as a JSON + string. For example, [this + file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) + contains JSON describing the [nodes and other properties of the + cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). + :type cluster_config: str + :param health_check_retry_timeout: The length of time between attempts to + perform health checks if the application or cluster is not healthy. + Default value: "PT0H0M0S" . + :type health_check_retry_timeout: timedelta + :param health_check_wait_duration_in_seconds: The length of time to wait + after completing an upgrade domain before starting the health checks + process. Default value: "PT0H0M0S" . + :type health_check_wait_duration_in_seconds: timedelta + :param health_check_stable_duration_in_seconds: The length of time that + the application or cluster must remain healthy before the upgrade proceeds + to the next upgrade domain. Default value: "PT0H0M0S" . + :type health_check_stable_duration_in_seconds: timedelta + :param upgrade_domain_timeout_in_seconds: The timeout for the upgrade + domain. Default value: "PT0H0M0S" . + :type upgrade_domain_timeout_in_seconds: timedelta + :param upgrade_timeout_in_seconds: The upgrade timeout. Default value: + "PT0H0M0S" . + :type upgrade_timeout_in_seconds: timedelta + :param max_percent_unhealthy_applications: The maximum allowed percentage + of unhealthy applications during the upgrade. Allowed values are integer + values from zero to 100. Default value: 0 . + :type max_percent_unhealthy_applications: int + :param max_percent_unhealthy_nodes: The maximum allowed percentage of + unhealthy nodes during the upgrade. Allowed values are integer values from + zero to 100. Default value: 0 . + :type max_percent_unhealthy_nodes: int + :param max_percent_delta_unhealthy_nodes: The maximum allowed percentage + of delta health degradation during the upgrade. Allowed values are integer + values from zero to 100. Default value: 0 . + :type max_percent_delta_unhealthy_nodes: int + :param max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum + allowed percentage of upgrade domain delta health degradation during the + upgrade. Allowed values are integer values from zero to 100. Default + value: 0 . + :type max_percent_upgrade_domain_delta_unhealthy_nodes: int + :param application_health_policies: Defines the application health policy + map used to evaluate the health of an application or one of its children + entities. + :type application_health_policies: + ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _validation = { + 'cluster_config': {'required': True}, + } + + _attribute_map = { + 'cluster_config': {'key': 'ClusterConfig', 'type': 'str'}, + 'health_check_retry_timeout': {'key': 'HealthCheckRetryTimeout', 'type': 'duration'}, + 'health_check_wait_duration_in_seconds': {'key': 'HealthCheckWaitDurationInSeconds', 'type': 'duration'}, + 'health_check_stable_duration_in_seconds': {'key': 'HealthCheckStableDurationInSeconds', 'type': 'duration'}, + 'upgrade_domain_timeout_in_seconds': {'key': 'UpgradeDomainTimeoutInSeconds', 'type': 'duration'}, + 'upgrade_timeout_in_seconds': {'key': 'UpgradeTimeoutInSeconds', 'type': 'duration'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, + 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__(self, *, cluster_config: str, health_check_retry_timeout="PT0H0M0S", health_check_wait_duration_in_seconds="PT0H0M0S", health_check_stable_duration_in_seconds="PT0H0M0S", upgrade_domain_timeout_in_seconds="PT0H0M0S", upgrade_timeout_in_seconds="PT0H0M0S", max_percent_unhealthy_applications: int=0, max_percent_unhealthy_nodes: int=0, max_percent_delta_unhealthy_nodes: int=0, max_percent_upgrade_domain_delta_unhealthy_nodes: int=0, application_health_policies=None, **kwargs) -> None: + super(ClusterConfigurationUpgradeDescription, self).__init__(**kwargs) + self.cluster_config = cluster_config + self.health_check_retry_timeout = health_check_retry_timeout + self.health_check_wait_duration_in_seconds = health_check_wait_duration_in_seconds + self.health_check_stable_duration_in_seconds = health_check_stable_duration_in_seconds + self.upgrade_domain_timeout_in_seconds = upgrade_domain_timeout_in_seconds + self.upgrade_timeout_in_seconds = upgrade_timeout_in_seconds + self.max_percent_unhealthy_applications = max_percent_unhealthy_applications + self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes + self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes + self.max_percent_upgrade_domain_delta_unhealthy_nodes = max_percent_upgrade_domain_delta_unhealthy_nodes + self.application_health_policies = application_health_policies diff --git a/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info.py b/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info.py new file mode 100644 index 0000000..b48531b --- /dev/null +++ b/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class ClusterConfigurationUpgradeStatusInfo(Model): + """Information about a standalone cluster configuration upgrade status. + + :param upgrade_state: The state of the upgrade domain. Possible values + include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', + 'RollingForwardPending', 'RollingForwardInProgress', + 'RollingForwardCompleted', 'Failed' + :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :param progress_status: The cluster manifest version. + :type progress_status: int + :param config_version: The cluster configuration version. + :type config_version: str + :param details: The cluster upgrade status details. + :type details: str + """ + + _attribute_map = { + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'progress_status': {'key': 'ProgressStatus', 'type': 'int'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'details': {'key': 'Details', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterConfigurationUpgradeStatusInfo, self).__init__(**kwargs) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.progress_status = kwargs.get('progress_status', None) + self.config_version = kwargs.get('config_version', None) + self.details = kwargs.get('details', None) diff --git a/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info_py3.py b/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info_py3.py new file mode 100644 index 0000000..d1362be --- /dev/null +++ b/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info_py3.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class ClusterConfigurationUpgradeStatusInfo(Model): + """Information about a standalone cluster configuration upgrade status. + + :param upgrade_state: The state of the upgrade domain. Possible values + include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', + 'RollingForwardPending', 'RollingForwardInProgress', + 'RollingForwardCompleted', 'Failed' + :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :param progress_status: The cluster manifest version. + :type progress_status: int + :param config_version: The cluster configuration version. + :type config_version: str + :param details: The cluster upgrade status details. + :type details: str + """ + + _attribute_map = { + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'progress_status': {'key': 'ProgressStatus', 'type': 'int'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'details': {'key': 'Details', 'type': 'str'}, + } + + def __init__(self, *, upgrade_state=None, progress_status: int=None, config_version: str=None, details: str=None, **kwargs) -> None: + super(ClusterConfigurationUpgradeStatusInfo, self).__init__(**kwargs) + self.upgrade_state = upgrade_state + self.progress_status = progress_status + self.config_version = config_version + self.details = details diff --git a/customSDK/servicefabric/models/cluster_event.py b/customSDK/servicefabric/models/cluster_event.py new file mode 100644 index 0000000..d4822d3 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_event.py @@ -0,0 +1,61 @@ +# 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 .fabric_event import FabricEvent + + +class ClusterEvent(FabricEvent): + """Represents the base for all Cluster Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ClusterNewHealthReportEvent, + ClusterHealthReportExpiredEvent, ClusterUpgradeCompletedEvent, + ClusterUpgradeDomainCompletedEvent, ClusterUpgradeRollbackCompletedEvent, + ClusterUpgradeRollbackStartedEvent, ClusterUpgradeStartedEvent, + ChaosStoppedEvent, ChaosStartedEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ClusterNewHealthReport': 'ClusterNewHealthReportEvent', 'ClusterHealthReportExpired': 'ClusterHealthReportExpiredEvent', 'ClusterUpgradeCompleted': 'ClusterUpgradeCompletedEvent', 'ClusterUpgradeDomainCompleted': 'ClusterUpgradeDomainCompletedEvent', 'ClusterUpgradeRollbackCompleted': 'ClusterUpgradeRollbackCompletedEvent', 'ClusterUpgradeRollbackStarted': 'ClusterUpgradeRollbackStartedEvent', 'ClusterUpgradeStarted': 'ClusterUpgradeStartedEvent', 'ChaosStopped': 'ChaosStoppedEvent', 'ChaosStarted': 'ChaosStartedEvent'} + } + + def __init__(self, **kwargs): + super(ClusterEvent, self).__init__(**kwargs) + self.kind = 'ClusterEvent' diff --git a/customSDK/servicefabric/models/cluster_event_py3.py b/customSDK/servicefabric/models/cluster_event_py3.py new file mode 100644 index 0000000..04613f0 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_event_py3.py @@ -0,0 +1,61 @@ +# 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 .fabric_event_py3 import FabricEvent + + +class ClusterEvent(FabricEvent): + """Represents the base for all Cluster Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ClusterNewHealthReportEvent, + ClusterHealthReportExpiredEvent, ClusterUpgradeCompletedEvent, + ClusterUpgradeDomainCompletedEvent, ClusterUpgradeRollbackCompletedEvent, + ClusterUpgradeRollbackStartedEvent, ClusterUpgradeStartedEvent, + ChaosStoppedEvent, ChaosStartedEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ClusterNewHealthReport': 'ClusterNewHealthReportEvent', 'ClusterHealthReportExpired': 'ClusterHealthReportExpiredEvent', 'ClusterUpgradeCompleted': 'ClusterUpgradeCompletedEvent', 'ClusterUpgradeDomainCompleted': 'ClusterUpgradeDomainCompletedEvent', 'ClusterUpgradeRollbackCompleted': 'ClusterUpgradeRollbackCompletedEvent', 'ClusterUpgradeRollbackStarted': 'ClusterUpgradeRollbackStartedEvent', 'ClusterUpgradeStarted': 'ClusterUpgradeStartedEvent', 'ChaosStopped': 'ChaosStoppedEvent', 'ChaosStarted': 'ChaosStartedEvent'} + } + + def __init__(self, *, event_instance_id: str, time_stamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ClusterEvent' diff --git a/customSDK/servicefabric/models/cluster_health.py b/customSDK/servicefabric/models/cluster_health.py new file mode 100644 index 0000000..5185f73 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health.py @@ -0,0 +1,60 @@ +# 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 .entity_health import EntityHealth + + +class ClusterHealth(EntityHealth): + """Represents the health of the cluster. + Contains the cluster aggregated health state, the cluster application and + node health states as well as the health events and the unhealthy + evaluations. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param node_health_states: Cluster node health states as found in the + health store. + :type node_health_states: + list[~azure.servicefabric.models.NodeHealthState] + :param application_health_states: Cluster application health states as + found in the health store. + :type application_health_states: + list[~azure.servicefabric.models.ApplicationHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'node_health_states': {'key': 'NodeHealthStates', 'type': '[NodeHealthState]'}, + 'application_health_states': {'key': 'ApplicationHealthStates', 'type': '[ApplicationHealthState]'}, + } + + def __init__(self, **kwargs): + super(ClusterHealth, self).__init__(**kwargs) + self.node_health_states = kwargs.get('node_health_states', None) + self.application_health_states = kwargs.get('application_health_states', None) diff --git a/customSDK/servicefabric/models/cluster_health_chunk.py b/customSDK/servicefabric/models/cluster_health_chunk.py new file mode 100644 index 0000000..aa70cee --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_chunk.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class ClusterHealthChunk(Model): + """Represents the health chunk of the cluster. + Contains the cluster aggregated health state, and the cluster entities that + respect the input filter. + + :param health_state: The HealthState representing the aggregated health + state of the cluster computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired cluster health policy and + the application health policies. Possible values include: 'Invalid', 'Ok', + 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_health_state_chunks: The list of node health state chunks in + the cluster that respect the filters in the cluster health chunk query + description. + :type node_health_state_chunks: + ~azure.servicefabric.models.NodeHealthStateChunkList + :param application_health_state_chunks: The list of application health + state chunks in the cluster that respect the filters in the cluster health + chunk query description. + :type application_health_state_chunks: + ~azure.servicefabric.models.ApplicationHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_health_state_chunks': {'key': 'NodeHealthStateChunks', 'type': 'NodeHealthStateChunkList'}, + 'application_health_state_chunks': {'key': 'ApplicationHealthStateChunks', 'type': 'ApplicationHealthStateChunkList'}, + } + + def __init__(self, **kwargs): + super(ClusterHealthChunk, self).__init__(**kwargs) + self.health_state = kwargs.get('health_state', None) + self.node_health_state_chunks = kwargs.get('node_health_state_chunks', None) + self.application_health_state_chunks = kwargs.get('application_health_state_chunks', None) diff --git a/customSDK/servicefabric/models/cluster_health_chunk_py3.py b/customSDK/servicefabric/models/cluster_health_chunk_py3.py new file mode 100644 index 0000000..549375a --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_chunk_py3.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class ClusterHealthChunk(Model): + """Represents the health chunk of the cluster. + Contains the cluster aggregated health state, and the cluster entities that + respect the input filter. + + :param health_state: The HealthState representing the aggregated health + state of the cluster computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired cluster health policy and + the application health policies. Possible values include: 'Invalid', 'Ok', + 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_health_state_chunks: The list of node health state chunks in + the cluster that respect the filters in the cluster health chunk query + description. + :type node_health_state_chunks: + ~azure.servicefabric.models.NodeHealthStateChunkList + :param application_health_state_chunks: The list of application health + state chunks in the cluster that respect the filters in the cluster health + chunk query description. + :type application_health_state_chunks: + ~azure.servicefabric.models.ApplicationHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_health_state_chunks': {'key': 'NodeHealthStateChunks', 'type': 'NodeHealthStateChunkList'}, + 'application_health_state_chunks': {'key': 'ApplicationHealthStateChunks', 'type': 'ApplicationHealthStateChunkList'}, + } + + def __init__(self, *, health_state=None, node_health_state_chunks=None, application_health_state_chunks=None, **kwargs) -> None: + super(ClusterHealthChunk, self).__init__(**kwargs) + self.health_state = health_state + self.node_health_state_chunks = node_health_state_chunks + self.application_health_state_chunks = application_health_state_chunks diff --git a/customSDK/servicefabric/models/cluster_health_chunk_query_description.py b/customSDK/servicefabric/models/cluster_health_chunk_query_description.py new file mode 100644 index 0000000..324ec7a --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_chunk_query_description.py @@ -0,0 +1,65 @@ +# 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 msrest.serialization import Model + + +class ClusterHealthChunkQueryDescription(Model): + """The cluster health chunk query description, which can specify the health + policies to evaluate cluster health and very expressive filters to select + which cluster entities to include in response. + + :param node_filters: Defines a list of filters that specify which nodes to + be included in the returned cluster health chunk. + If no filters are specified, no nodes are returned. All the nodes are used + to evaluate the cluster's aggregated health state, regardless of the input + filters. + The cluster health chunk query may specify multiple node filters. + For example, it can specify a filter to return all nodes with health state + Error and another filter to always include a node identified by its + NodeName. + :type node_filters: + list[~azure.servicefabric.models.NodeHealthStateFilter] + :param application_filters: Defines a list of filters that specify which + applications to be included in the returned cluster health chunk. + If no filters are specified, no applications are returned. All the + applications are used to evaluate the cluster's aggregated health state, + regardless of the input filters. + The cluster health chunk query may specify multiple application filters. + For example, it can specify a filter to return all applications with + health state Error and another filter to always include applications of a + specified application type. + :type application_filters: + list[~azure.servicefabric.models.ApplicationHealthStateFilter] + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param application_health_policies: Defines the application health policy + map used to evaluate the health of an application or one of its children + entities. + :type application_health_policies: + ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _attribute_map = { + 'node_filters': {'key': 'NodeFilters', 'type': '[NodeHealthStateFilter]'}, + 'application_filters': {'key': 'ApplicationFilters', 'type': '[ApplicationHealthStateFilter]'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__(self, **kwargs): + super(ClusterHealthChunkQueryDescription, self).__init__(**kwargs) + self.node_filters = kwargs.get('node_filters', None) + self.application_filters = kwargs.get('application_filters', None) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.application_health_policies = kwargs.get('application_health_policies', None) diff --git a/customSDK/servicefabric/models/cluster_health_chunk_query_description_py3.py b/customSDK/servicefabric/models/cluster_health_chunk_query_description_py3.py new file mode 100644 index 0000000..5b55a1e --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_chunk_query_description_py3.py @@ -0,0 +1,65 @@ +# 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 msrest.serialization import Model + + +class ClusterHealthChunkQueryDescription(Model): + """The cluster health chunk query description, which can specify the health + policies to evaluate cluster health and very expressive filters to select + which cluster entities to include in response. + + :param node_filters: Defines a list of filters that specify which nodes to + be included in the returned cluster health chunk. + If no filters are specified, no nodes are returned. All the nodes are used + to evaluate the cluster's aggregated health state, regardless of the input + filters. + The cluster health chunk query may specify multiple node filters. + For example, it can specify a filter to return all nodes with health state + Error and another filter to always include a node identified by its + NodeName. + :type node_filters: + list[~azure.servicefabric.models.NodeHealthStateFilter] + :param application_filters: Defines a list of filters that specify which + applications to be included in the returned cluster health chunk. + If no filters are specified, no applications are returned. All the + applications are used to evaluate the cluster's aggregated health state, + regardless of the input filters. + The cluster health chunk query may specify multiple application filters. + For example, it can specify a filter to return all applications with + health state Error and another filter to always include applications of a + specified application type. + :type application_filters: + list[~azure.servicefabric.models.ApplicationHealthStateFilter] + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param application_health_policies: Defines the application health policy + map used to evaluate the health of an application or one of its children + entities. + :type application_health_policies: + ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _attribute_map = { + 'node_filters': {'key': 'NodeFilters', 'type': '[NodeHealthStateFilter]'}, + 'application_filters': {'key': 'ApplicationFilters', 'type': '[ApplicationHealthStateFilter]'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__(self, *, node_filters=None, application_filters=None, cluster_health_policy=None, application_health_policies=None, **kwargs) -> None: + super(ClusterHealthChunkQueryDescription, self).__init__(**kwargs) + self.node_filters = node_filters + self.application_filters = application_filters + self.cluster_health_policy = cluster_health_policy + self.application_health_policies = application_health_policies diff --git a/customSDK/servicefabric/models/cluster_health_policies.py b/customSDK/servicefabric/models/cluster_health_policies.py new file mode 100644 index 0000000..ff93755 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_policies.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class ClusterHealthPolicies(Model): + """Health policies to evaluate cluster health. + + :param application_health_policy_map: Defines a map that contains specific + application health policies for different applications. + Each entry specifies as key the application name and as value an + ApplicationHealthPolicy used to evaluate the application health. + If an application is not specified in the map, the application health + evaluation uses the ApplicationHealthPolicy found in its application + manifest or the default application health policy (if no health policy is + defined in the manifest). + The map is empty by default. + :type application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + } + + def __init__(self, **kwargs): + super(ClusterHealthPolicies, self).__init__(**kwargs) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) diff --git a/customSDK/servicefabric/models/cluster_health_policies_py3.py b/customSDK/servicefabric/models/cluster_health_policies_py3.py new file mode 100644 index 0000000..3434de2 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_policies_py3.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class ClusterHealthPolicies(Model): + """Health policies to evaluate cluster health. + + :param application_health_policy_map: Defines a map that contains specific + application health policies for different applications. + Each entry specifies as key the application name and as value an + ApplicationHealthPolicy used to evaluate the application health. + If an application is not specified in the map, the application health + evaluation uses the ApplicationHealthPolicy found in its application + manifest or the default application health policy (if no health policy is + defined in the manifest). + The map is empty by default. + :type application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + } + + def __init__(self, *, application_health_policy_map=None, cluster_health_policy=None, **kwargs) -> None: + super(ClusterHealthPolicies, self).__init__(**kwargs) + self.application_health_policy_map = application_health_policy_map + self.cluster_health_policy = cluster_health_policy diff --git a/customSDK/servicefabric/models/cluster_health_policy.py b/customSDK/servicefabric/models/cluster_health_policy.py new file mode 100644 index 0000000..f7adcf0 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_policy.py @@ -0,0 +1,129 @@ +# 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 msrest.serialization import Model + + +class ClusterHealthPolicy(Model): + """Defines a health policy used to evaluate the health of the cluster or of a + cluster node. + + :param consider_warning_as_error: Indicates whether warnings are treated + with the same severity as errors. Default value: False . + :type consider_warning_as_error: bool + :param max_percent_unhealthy_nodes: The maximum allowed percentage of + unhealthy nodes before reporting an error. For example, to allow 10% of + nodes to be unhealthy, this value would be 10. + The percentage represents the maximum tolerated percentage of nodes that + can be unhealthy before the cluster is considered in error. + If the percentage is respected but there is at least one unhealthy node, + the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes + over the total number of nodes in the cluster. + The computation rounds up to tolerate one failure on small numbers of + nodes. Default percentage is zero. + In large clusters, some nodes will always be down or out for repairs, so + this percentage should be configured to tolerate that. Default value: 0 . + :type max_percent_unhealthy_nodes: int + :param max_percent_unhealthy_applications: The maximum allowed percentage + of unhealthy applications before reporting an error. For example, to allow + 10% of applications to be unhealthy, this value would be 10. + The percentage represents the maximum tolerated percentage of applications + that can be unhealthy before the cluster is considered in error. + If the percentage is respected but there is at least one unhealthy + application, the health is evaluated as Warning. + This is calculated by dividing the number of unhealthy applications over + the total number of application instances in the cluster, excluding + applications of application types that are included in the + ApplicationTypeHealthPolicyMap. + The computation rounds up to tolerate one failure on small numbers of + applications. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_applications: int + :param application_type_health_policy_map: Defines a map with max + percentage unhealthy applications for specific application types. + Each entry specifies as key the application type name and as value an + integer that represents the MaxPercentUnhealthyApplications percentage + used to evaluate the applications of the specified application type. + The application type health policy map can be used during cluster health + evaluation to describe special application types. + The application types included in the map are evaluated against the + percentage specified in the map, and not with the global + MaxPercentUnhealthyApplications defined in the cluster health policy. + The applications of application types specified in the map are not counted + against the global pool of applications. + For example, if some applications of a type are critical, the cluster + administrator can add an entry to the map for that application type + and assign it a value of 0% (that is, do not tolerate any failures). + All other applications can be evaluated with + MaxPercentUnhealthyApplications set to 20% to tolerate some failures out + of the thousands of application instances. + The application type health policy map is used only if the cluster + manifest enables application type health evaluation using the + configuration entry for + HealthManager/EnableApplicationTypeHealthEvaluation. + :type application_type_health_policy_map: + list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] + :param node_type_health_policy_map: Defines a map with max percentage + unhealthy nodes for specific node types. + Each entry specifies as key the node type name and as value an integer + that represents the MaxPercentUnhealthyNodes percentage used to evaluate + the nodes of the specified node type. + The node type health policy map can be used during cluster health + evaluation to describe special node types. + They are evaluated against the percentages associated with their node type + name in the map. + Setting this has no impact on the global pool of nodes used for + MaxPercentUnhealthyNodes. + The node type health policy map is used only if the cluster manifest + enables node type health evaluation using the configuration entry for + HealthManager/EnableNodeTypeHealthEvaluation. + For example, given a cluster with many nodes of different types, with + important work hosted on node type "SpecialNodeType" that should not + tolerate any nodes down. + You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some + failures for all nodes, but for the node type "SpecialNodeType", set the + MaxPercentUnhealthyNodes to 0 by + setting the value in the key value pair in NodeTypeHealthPolicyMapItem. + The key is the node type name. + This way, as long as no nodes of type "SpecialNodeType" are in Error + state, + even if some of the many nodes in the global pool are in Error state, but + below the global unhealthy percentage, the cluster would be evaluated to + Warning. + A Warning health state does not impact cluster upgrade or other monitoring + triggered by Error health state. + But even one node of type SpecialNodeType in Error would make cluster + unhealthy (in Error rather than Warning/Ok), which triggers rollback or + pauses the cluster upgrade, depending on the upgrade configuration. + Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting + SpecialNodeType's max percent unhealthy nodes to 100, + with one node of type SpecialNodeType in Error state would still put the + cluster in an Error state, since the global restriction is more strict in + this case. + :type node_type_health_policy_map: + list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] + """ + + _attribute_map = { + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'application_type_health_policy_map': {'key': 'ApplicationTypeHealthPolicyMap', 'type': '[ApplicationTypeHealthPolicyMapItem]'}, + 'node_type_health_policy_map': {'key': 'NodeTypeHealthPolicyMap', 'type': '[NodeTypeHealthPolicyMapItem]'}, + } + + def __init__(self, **kwargs): + super(ClusterHealthPolicy, self).__init__(**kwargs) + self.consider_warning_as_error = kwargs.get('consider_warning_as_error', False) + self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', 0) + self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', 0) + self.application_type_health_policy_map = kwargs.get('application_type_health_policy_map', None) + self.node_type_health_policy_map = kwargs.get('node_type_health_policy_map', None) diff --git a/customSDK/servicefabric/models/cluster_health_policy_py3.py b/customSDK/servicefabric/models/cluster_health_policy_py3.py new file mode 100644 index 0000000..8c9230c --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_policy_py3.py @@ -0,0 +1,129 @@ +# 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 msrest.serialization import Model + + +class ClusterHealthPolicy(Model): + """Defines a health policy used to evaluate the health of the cluster or of a + cluster node. + + :param consider_warning_as_error: Indicates whether warnings are treated + with the same severity as errors. Default value: False . + :type consider_warning_as_error: bool + :param max_percent_unhealthy_nodes: The maximum allowed percentage of + unhealthy nodes before reporting an error. For example, to allow 10% of + nodes to be unhealthy, this value would be 10. + The percentage represents the maximum tolerated percentage of nodes that + can be unhealthy before the cluster is considered in error. + If the percentage is respected but there is at least one unhealthy node, + the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes + over the total number of nodes in the cluster. + The computation rounds up to tolerate one failure on small numbers of + nodes. Default percentage is zero. + In large clusters, some nodes will always be down or out for repairs, so + this percentage should be configured to tolerate that. Default value: 0 . + :type max_percent_unhealthy_nodes: int + :param max_percent_unhealthy_applications: The maximum allowed percentage + of unhealthy applications before reporting an error. For example, to allow + 10% of applications to be unhealthy, this value would be 10. + The percentage represents the maximum tolerated percentage of applications + that can be unhealthy before the cluster is considered in error. + If the percentage is respected but there is at least one unhealthy + application, the health is evaluated as Warning. + This is calculated by dividing the number of unhealthy applications over + the total number of application instances in the cluster, excluding + applications of application types that are included in the + ApplicationTypeHealthPolicyMap. + The computation rounds up to tolerate one failure on small numbers of + applications. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_applications: int + :param application_type_health_policy_map: Defines a map with max + percentage unhealthy applications for specific application types. + Each entry specifies as key the application type name and as value an + integer that represents the MaxPercentUnhealthyApplications percentage + used to evaluate the applications of the specified application type. + The application type health policy map can be used during cluster health + evaluation to describe special application types. + The application types included in the map are evaluated against the + percentage specified in the map, and not with the global + MaxPercentUnhealthyApplications defined in the cluster health policy. + The applications of application types specified in the map are not counted + against the global pool of applications. + For example, if some applications of a type are critical, the cluster + administrator can add an entry to the map for that application type + and assign it a value of 0% (that is, do not tolerate any failures). + All other applications can be evaluated with + MaxPercentUnhealthyApplications set to 20% to tolerate some failures out + of the thousands of application instances. + The application type health policy map is used only if the cluster + manifest enables application type health evaluation using the + configuration entry for + HealthManager/EnableApplicationTypeHealthEvaluation. + :type application_type_health_policy_map: + list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] + :param node_type_health_policy_map: Defines a map with max percentage + unhealthy nodes for specific node types. + Each entry specifies as key the node type name and as value an integer + that represents the MaxPercentUnhealthyNodes percentage used to evaluate + the nodes of the specified node type. + The node type health policy map can be used during cluster health + evaluation to describe special node types. + They are evaluated against the percentages associated with their node type + name in the map. + Setting this has no impact on the global pool of nodes used for + MaxPercentUnhealthyNodes. + The node type health policy map is used only if the cluster manifest + enables node type health evaluation using the configuration entry for + HealthManager/EnableNodeTypeHealthEvaluation. + For example, given a cluster with many nodes of different types, with + important work hosted on node type "SpecialNodeType" that should not + tolerate any nodes down. + You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some + failures for all nodes, but for the node type "SpecialNodeType", set the + MaxPercentUnhealthyNodes to 0 by + setting the value in the key value pair in NodeTypeHealthPolicyMapItem. + The key is the node type name. + This way, as long as no nodes of type "SpecialNodeType" are in Error + state, + even if some of the many nodes in the global pool are in Error state, but + below the global unhealthy percentage, the cluster would be evaluated to + Warning. + A Warning health state does not impact cluster upgrade or other monitoring + triggered by Error health state. + But even one node of type SpecialNodeType in Error would make cluster + unhealthy (in Error rather than Warning/Ok), which triggers rollback or + pauses the cluster upgrade, depending on the upgrade configuration. + Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting + SpecialNodeType's max percent unhealthy nodes to 100, + with one node of type SpecialNodeType in Error state would still put the + cluster in an Error state, since the global restriction is more strict in + this case. + :type node_type_health_policy_map: + list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] + """ + + _attribute_map = { + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'application_type_health_policy_map': {'key': 'ApplicationTypeHealthPolicyMap', 'type': '[ApplicationTypeHealthPolicyMapItem]'}, + 'node_type_health_policy_map': {'key': 'NodeTypeHealthPolicyMap', 'type': '[NodeTypeHealthPolicyMapItem]'}, + } + + def __init__(self, *, consider_warning_as_error: bool=False, max_percent_unhealthy_nodes: int=0, max_percent_unhealthy_applications: int=0, application_type_health_policy_map=None, node_type_health_policy_map=None, **kwargs) -> None: + super(ClusterHealthPolicy, self).__init__(**kwargs) + self.consider_warning_as_error = consider_warning_as_error + self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes + self.max_percent_unhealthy_applications = max_percent_unhealthy_applications + self.application_type_health_policy_map = application_type_health_policy_map + self.node_type_health_policy_map = node_type_health_policy_map diff --git a/customSDK/servicefabric/models/cluster_health_py3.py b/customSDK/servicefabric/models/cluster_health_py3.py new file mode 100644 index 0000000..a60ca49 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_py3.py @@ -0,0 +1,60 @@ +# 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 .entity_health_py3 import EntityHealth + + +class ClusterHealth(EntityHealth): + """Represents the health of the cluster. + Contains the cluster aggregated health state, the cluster application and + node health states as well as the health events and the unhealthy + evaluations. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param node_health_states: Cluster node health states as found in the + health store. + :type node_health_states: + list[~azure.servicefabric.models.NodeHealthState] + :param application_health_states: Cluster application health states as + found in the health store. + :type application_health_states: + list[~azure.servicefabric.models.ApplicationHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'node_health_states': {'key': 'NodeHealthStates', 'type': '[NodeHealthState]'}, + 'application_health_states': {'key': 'ApplicationHealthStates', 'type': '[ApplicationHealthState]'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, node_health_states=None, application_health_states=None, **kwargs) -> None: + super(ClusterHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.node_health_states = node_health_states + self.application_health_states = application_health_states diff --git a/customSDK/servicefabric/models/cluster_health_report_expired_event.py b/customSDK/servicefabric/models/cluster_health_report_expired_event.py new file mode 100644 index 0000000..a714abc --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_report_expired_event.py @@ -0,0 +1,91 @@ +# 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 .cluster_event import ClusterEvent + + +class ClusterHealthReportExpiredEvent(ClusterEvent): + """Cluster Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ClusterHealthReportExpiredEvent, self).__init__(**kwargs) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'ClusterHealthReportExpired' diff --git a/customSDK/servicefabric/models/cluster_health_report_expired_event_py3.py b/customSDK/servicefabric/models/cluster_health_report_expired_event_py3.py new file mode 100644 index 0000000..fcef06a --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_report_expired_event_py3.py @@ -0,0 +1,91 @@ +# 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 .cluster_event_py3 import ClusterEvent + + +class ClusterHealthReportExpiredEvent(ClusterEvent): + """Cluster Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ClusterHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'ClusterHealthReportExpired' diff --git a/customSDK/servicefabric/models/cluster_load_info.py b/customSDK/servicefabric/models/cluster_load_info.py new file mode 100644 index 0000000..2dfb3fd --- /dev/null +++ b/customSDK/servicefabric/models/cluster_load_info.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class ClusterLoadInfo(Model): + """Information about load in a Service Fabric cluster. It holds a summary of + all metrics and their load in a cluster. + + :param last_balancing_start_time_utc: The starting time of last resource + balancing run. + :type last_balancing_start_time_utc: datetime + :param last_balancing_end_time_utc: The end time of last resource + balancing run. + :type last_balancing_end_time_utc: datetime + :param load_metric_information: List that contains metrics and their load + information in this cluster. + :type load_metric_information: + list[~azure.servicefabric.models.LoadMetricInformation] + """ + + _attribute_map = { + 'last_balancing_start_time_utc': {'key': 'LastBalancingStartTimeUtc', 'type': 'iso-8601'}, + 'last_balancing_end_time_utc': {'key': 'LastBalancingEndTimeUtc', 'type': 'iso-8601'}, + 'load_metric_information': {'key': 'LoadMetricInformation', 'type': '[LoadMetricInformation]'}, + } + + def __init__(self, **kwargs): + super(ClusterLoadInfo, self).__init__(**kwargs) + self.last_balancing_start_time_utc = kwargs.get('last_balancing_start_time_utc', None) + self.last_balancing_end_time_utc = kwargs.get('last_balancing_end_time_utc', None) + self.load_metric_information = kwargs.get('load_metric_information', None) diff --git a/customSDK/servicefabric/models/cluster_load_info_py3.py b/customSDK/servicefabric/models/cluster_load_info_py3.py new file mode 100644 index 0000000..d71dc2c --- /dev/null +++ b/customSDK/servicefabric/models/cluster_load_info_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class ClusterLoadInfo(Model): + """Information about load in a Service Fabric cluster. It holds a summary of + all metrics and their load in a cluster. + + :param last_balancing_start_time_utc: The starting time of last resource + balancing run. + :type last_balancing_start_time_utc: datetime + :param last_balancing_end_time_utc: The end time of last resource + balancing run. + :type last_balancing_end_time_utc: datetime + :param load_metric_information: List that contains metrics and their load + information in this cluster. + :type load_metric_information: + list[~azure.servicefabric.models.LoadMetricInformation] + """ + + _attribute_map = { + 'last_balancing_start_time_utc': {'key': 'LastBalancingStartTimeUtc', 'type': 'iso-8601'}, + 'last_balancing_end_time_utc': {'key': 'LastBalancingEndTimeUtc', 'type': 'iso-8601'}, + 'load_metric_information': {'key': 'LoadMetricInformation', 'type': '[LoadMetricInformation]'}, + } + + def __init__(self, *, last_balancing_start_time_utc=None, last_balancing_end_time_utc=None, load_metric_information=None, **kwargs) -> None: + super(ClusterLoadInfo, self).__init__(**kwargs) + self.last_balancing_start_time_utc = last_balancing_start_time_utc + self.last_balancing_end_time_utc = last_balancing_end_time_utc + self.load_metric_information = load_metric_information diff --git a/customSDK/servicefabric/models/cluster_manifest.py b/customSDK/servicefabric/models/cluster_manifest.py new file mode 100644 index 0000000..6f3f3e4 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_manifest.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class ClusterManifest(Model): + """Information about the cluster manifest. + + :param manifest: The contents of the cluster manifest file. + :type manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterManifest, self).__init__(**kwargs) + self.manifest = kwargs.get('manifest', None) diff --git a/customSDK/servicefabric/models/cluster_manifest_py3.py b/customSDK/servicefabric/models/cluster_manifest_py3.py new file mode 100644 index 0000000..3dc2d2c --- /dev/null +++ b/customSDK/servicefabric/models/cluster_manifest_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class ClusterManifest(Model): + """Information about the cluster manifest. + + :param manifest: The contents of the cluster manifest file. + :type manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__(self, *, manifest: str=None, **kwargs) -> None: + super(ClusterManifest, self).__init__(**kwargs) + self.manifest = manifest diff --git a/customSDK/servicefabric/models/cluster_new_health_report_event.py b/customSDK/servicefabric/models/cluster_new_health_report_event.py new file mode 100644 index 0000000..3c6b2be --- /dev/null +++ b/customSDK/servicefabric/models/cluster_new_health_report_event.py @@ -0,0 +1,91 @@ +# 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 .cluster_event import ClusterEvent + + +class ClusterNewHealthReportEvent(ClusterEvent): + """Cluster Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ClusterNewHealthReportEvent, self).__init__(**kwargs) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'ClusterNewHealthReport' diff --git a/customSDK/servicefabric/models/cluster_new_health_report_event_py3.py b/customSDK/servicefabric/models/cluster_new_health_report_event_py3.py new file mode 100644 index 0000000..4f31abb --- /dev/null +++ b/customSDK/servicefabric/models/cluster_new_health_report_event_py3.py @@ -0,0 +1,91 @@ +# 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 .cluster_event_py3 import ClusterEvent + + +class ClusterNewHealthReportEvent(ClusterEvent): + """Cluster Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ClusterNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'ClusterNewHealthReport' diff --git a/customSDK/servicefabric/models/cluster_upgrade_completed_event.py b/customSDK/servicefabric/models/cluster_upgrade_completed_event.py new file mode 100644 index 0000000..3b75cdd --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_completed_event.py @@ -0,0 +1,61 @@ +# 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 .cluster_event import ClusterEvent + + +class ClusterUpgradeCompletedEvent(ClusterEvent): + """Cluster Upgrade Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of + upgrade in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'target_cluster_version': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ClusterUpgradeCompletedEvent, self).__init__(**kwargs) + self.target_cluster_version = kwargs.get('target_cluster_version', None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) + self.kind = 'ClusterUpgradeCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_completed_event_py3.py b/customSDK/servicefabric/models/cluster_upgrade_completed_event_py3.py new file mode 100644 index 0000000..8422f87 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_completed_event_py3.py @@ -0,0 +1,61 @@ +# 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 .cluster_event_py3 import ClusterEvent + + +class ClusterUpgradeCompletedEvent(ClusterEvent): + """Cluster Upgrade Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of + upgrade in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'target_cluster_version': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ClusterUpgradeCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.target_cluster_version = target_cluster_version + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + self.kind = 'ClusterUpgradeCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_description_object.py b/customSDK/servicefabric/models/cluster_upgrade_description_object.py new file mode 100644 index 0000000..aff0a6c --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_description_object.py @@ -0,0 +1,99 @@ +# 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 msrest.serialization import Model + + +class ClusterUpgradeDescriptionObject(Model): + """Represents a ServiceFabric cluster upgrade. + + :param config_version: The cluster configuration version (specified in the + cluster manifest). + :type config_version: str + :param code_version: The ServiceFabric code version of the cluster. + :type code_version: str + :param upgrade_kind: The kind of upgrade out of the following possible + values. Possible values include: 'Invalid', 'Rolling'. Default value: + "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param sort_order: Defines the order in which an upgrade proceeds through + the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', + 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default + value: "Default" . + :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :param enable_delta_health_evaluation: When true, enables delta health + evaluation rather than absolute health evaluation after completion of each + upgrade domain. + :type enable_delta_health_evaluation: bool + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param cluster_upgrade_health_policy: Defines a health policy used to + evaluate the health of the cluster during a cluster upgrade. + :type cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :param application_health_policy_map: Represents the map of application + health policies for a ServiceFabric cluster upgrade + :type application_health_policy_map: + ~azure.servicefabric.models.ApplicationHealthPolicyMapObject + """ + + _attribute_map = { + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicyMapObject'}, + } + + def __init__(self, **kwargs): + super(ClusterUpgradeDescriptionObject, self).__init__(**kwargs) + self.config_version = kwargs.get('config_version', None) + self.code_version = kwargs.get('code_version', None) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) + self.force_restart = kwargs.get('force_restart', None) + self.sort_order = kwargs.get('sort_order', "Default") + self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) + self.monitoring_policy = kwargs.get('monitoring_policy', None) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) diff --git a/customSDK/servicefabric/models/cluster_upgrade_description_object_py3.py b/customSDK/servicefabric/models/cluster_upgrade_description_object_py3.py new file mode 100644 index 0000000..6dd7246 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_description_object_py3.py @@ -0,0 +1,99 @@ +# 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 msrest.serialization import Model + + +class ClusterUpgradeDescriptionObject(Model): + """Represents a ServiceFabric cluster upgrade. + + :param config_version: The cluster configuration version (specified in the + cluster manifest). + :type config_version: str + :param code_version: The ServiceFabric code version of the cluster. + :type code_version: str + :param upgrade_kind: The kind of upgrade out of the following possible + values. Possible values include: 'Invalid', 'Rolling'. Default value: + "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param sort_order: Defines the order in which an upgrade proceeds through + the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', + 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default + value: "Default" . + :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :param enable_delta_health_evaluation: When true, enables delta health + evaluation rather than absolute health evaluation after completion of each + upgrade domain. + :type enable_delta_health_evaluation: bool + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param cluster_upgrade_health_policy: Defines a health policy used to + evaluate the health of the cluster during a cluster upgrade. + :type cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :param application_health_policy_map: Represents the map of application + health policies for a ServiceFabric cluster upgrade + :type application_health_policy_map: + ~azure.servicefabric.models.ApplicationHealthPolicyMapObject + """ + + _attribute_map = { + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicyMapObject'}, + } + + def __init__(self, *, config_version: str=None, code_version: str=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", enable_delta_health_evaluation: bool=None, monitoring_policy=None, cluster_health_policy=None, cluster_upgrade_health_policy=None, application_health_policy_map=None, **kwargs) -> None: + super(ClusterUpgradeDescriptionObject, self).__init__(**kwargs) + self.config_version = config_version + self.code_version = code_version + self.upgrade_kind = upgrade_kind + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.force_restart = force_restart + self.sort_order = sort_order + self.enable_delta_health_evaluation = enable_delta_health_evaluation + self.monitoring_policy = monitoring_policy + self.cluster_health_policy = cluster_health_policy + self.cluster_upgrade_health_policy = cluster_upgrade_health_policy + self.application_health_policy_map = application_health_policy_map diff --git a/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event.py b/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event.py new file mode 100644 index 0000000..42a8770 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event.py @@ -0,0 +1,71 @@ +# 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 .cluster_event import ClusterEvent + + +class ClusterUpgradeDomainCompletedEvent(ClusterEvent): + """Cluster Upgrade Domain Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param upgrade_state: Required. State of upgrade. + :type upgrade_state: str + :param upgrade_domains: Required. Upgrade domains. + :type upgrade_domains: str + :param upgrade_domain_elapsed_time_in_ms: Required. Duration of domain + upgrade in milli-seconds. + :type upgrade_domain_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'target_cluster_version': {'required': True}, + 'upgrade_state': {'required': True}, + 'upgrade_domains': {'required': True}, + 'upgrade_domain_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, + 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ClusterUpgradeDomainCompletedEvent, self).__init__(**kwargs) + self.target_cluster_version = kwargs.get('target_cluster_version', None) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.upgrade_domains = kwargs.get('upgrade_domains', None) + self.upgrade_domain_elapsed_time_in_ms = kwargs.get('upgrade_domain_elapsed_time_in_ms', None) + self.kind = 'ClusterUpgradeDomainCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event_py3.py b/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event_py3.py new file mode 100644 index 0000000..df7ea67 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event_py3.py @@ -0,0 +1,71 @@ +# 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 .cluster_event_py3 import ClusterEvent + + +class ClusterUpgradeDomainCompletedEvent(ClusterEvent): + """Cluster Upgrade Domain Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param upgrade_state: Required. State of upgrade. + :type upgrade_state: str + :param upgrade_domains: Required. Upgrade domains. + :type upgrade_domains: str + :param upgrade_domain_elapsed_time_in_ms: Required. Duration of domain + upgrade in milli-seconds. + :type upgrade_domain_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'target_cluster_version': {'required': True}, + 'upgrade_state': {'required': True}, + 'upgrade_domains': {'required': True}, + 'upgrade_domain_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, + 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, upgrade_state: str, upgrade_domains: str, upgrade_domain_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ClusterUpgradeDomainCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.target_cluster_version = target_cluster_version + self.upgrade_state = upgrade_state + self.upgrade_domains = upgrade_domains + self.upgrade_domain_elapsed_time_in_ms = upgrade_domain_elapsed_time_in_ms + self.kind = 'ClusterUpgradeDomainCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_health_policy_object.py b/customSDK/servicefabric/models/cluster_upgrade_health_policy_object.py new file mode 100644 index 0000000..80f09db --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_health_policy_object.py @@ -0,0 +1,51 @@ +# 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 msrest.serialization import Model + + +class ClusterUpgradeHealthPolicyObject(Model): + """Defines a health policy used to evaluate the health of the cluster during a + cluster upgrade. + + :param max_percent_delta_unhealthy_nodes: The maximum allowed percentage + of nodes health degradation allowed during cluster upgrades. The delta is + measured between the state of the nodes at the beginning of upgrade and + the state of the nodes at the time of the health evaluation. The check is + performed after every upgrade domain upgrade completion to make sure the + global state of the cluster is within tolerated limits. The default value + is 10%. + :type max_percent_delta_unhealthy_nodes: int + :param max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum + allowed percentage of upgrade domain nodes health degradation allowed + during cluster upgrades. The delta is measured between the state of the + upgrade domain nodes at the beginning of upgrade and the state of the + upgrade domain nodes at the time of the health evaluation. The check is + performed after every upgrade domain upgrade completion for all completed + upgrade domains to make sure the state of the upgrade domains is within + tolerated limits. The default value is 15%. + :type max_percent_upgrade_domain_delta_unhealthy_nodes: int + """ + + _validation = { + 'max_percent_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ClusterUpgradeHealthPolicyObject, self).__init__(**kwargs) + self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) + self.max_percent_upgrade_domain_delta_unhealthy_nodes = kwargs.get('max_percent_upgrade_domain_delta_unhealthy_nodes', None) diff --git a/customSDK/servicefabric/models/cluster_upgrade_health_policy_object_py3.py b/customSDK/servicefabric/models/cluster_upgrade_health_policy_object_py3.py new file mode 100644 index 0000000..f6143c3 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_health_policy_object_py3.py @@ -0,0 +1,51 @@ +# 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 msrest.serialization import Model + + +class ClusterUpgradeHealthPolicyObject(Model): + """Defines a health policy used to evaluate the health of the cluster during a + cluster upgrade. + + :param max_percent_delta_unhealthy_nodes: The maximum allowed percentage + of nodes health degradation allowed during cluster upgrades. The delta is + measured between the state of the nodes at the beginning of upgrade and + the state of the nodes at the time of the health evaluation. The check is + performed after every upgrade domain upgrade completion to make sure the + global state of the cluster is within tolerated limits. The default value + is 10%. + :type max_percent_delta_unhealthy_nodes: int + :param max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum + allowed percentage of upgrade domain nodes health degradation allowed + during cluster upgrades. The delta is measured between the state of the + upgrade domain nodes at the beginning of upgrade and the state of the + upgrade domain nodes at the time of the health evaluation. The check is + performed after every upgrade domain upgrade completion for all completed + upgrade domains to make sure the state of the upgrade domains is within + tolerated limits. The default value is 15%. + :type max_percent_upgrade_domain_delta_unhealthy_nodes: int + """ + + _validation = { + 'max_percent_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, + } + + def __init__(self, *, max_percent_delta_unhealthy_nodes: int=None, max_percent_upgrade_domain_delta_unhealthy_nodes: int=None, **kwargs) -> None: + super(ClusterUpgradeHealthPolicyObject, self).__init__(**kwargs) + self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes + self.max_percent_upgrade_domain_delta_unhealthy_nodes = max_percent_upgrade_domain_delta_unhealthy_nodes diff --git a/customSDK/servicefabric/models/cluster_upgrade_progress_object.py b/customSDK/servicefabric/models/cluster_upgrade_progress_object.py new file mode 100644 index 0000000..c3d14a6 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_progress_object.py @@ -0,0 +1,104 @@ +# 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 msrest.serialization import Model + + +class ClusterUpgradeProgressObject(Model): + """Information about a cluster upgrade. + + :param code_version: The ServiceFabric code version of the cluster. + :type code_version: str + :param config_version: The cluster configuration version (specified in the + cluster manifest). + :type config_version: str + :param upgrade_domains: List of upgrade domains and their statuses. + :type upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] + :param upgrade_state: The state of the upgrade domain. Possible values + include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', + 'RollingForwardPending', 'RollingForwardInProgress', + 'RollingForwardCompleted', 'Failed' + :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :param next_upgrade_domain: The name of the next upgrade domain to be + processed. + :type next_upgrade_domain: str + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_description: Represents a ServiceFabric cluster upgrade + :type upgrade_description: + ~azure.servicefabric.models.ClusterUpgradeDescriptionObject + :param upgrade_duration_in_milliseconds: The estimated elapsed time spent + processing the current overall upgrade. + :type upgrade_duration_in_milliseconds: str + :param upgrade_domain_duration_in_milliseconds: The estimated elapsed time + spent processing the current upgrade domain. + :type upgrade_domain_duration_in_milliseconds: str + :param unhealthy_evaluations: List of health evaluations that resulted in + the current aggregated health state. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param current_upgrade_domain_progress: Information about the current + in-progress upgrade domain. + :type current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :param start_timestamp_utc: The start time of the upgrade in UTC. + :type start_timestamp_utc: str + :param failure_timestamp_utc: The failure time of the upgrade in UTC. + :type failure_timestamp_utc: str + :param failure_reason: The cause of an upgrade failure that resulted in + FailureAction being executed. Possible values include: 'None', + 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + 'OverallUpgradeTimeout' + :type failure_reason: str or ~azure.servicefabric.models.FailureReason + :param upgrade_domain_progress_at_failure: The detailed upgrade progress + for nodes in the current upgrade domain at the point of failure. + :type upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailedUpgradeDomainProgressObject + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ClusterUpgradeDescriptionObject'}, + 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, + 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailedUpgradeDomainProgressObject'}, + } + + def __init__(self, **kwargs): + super(ClusterUpgradeProgressObject, self).__init__(**kwargs) + self.code_version = kwargs.get('code_version', None) + self.config_version = kwargs.get('config_version', None) + self.upgrade_domains = kwargs.get('upgrade_domains', None) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.next_upgrade_domain = kwargs.get('next_upgrade_domain', None) + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_description = kwargs.get('upgrade_description', None) + self.upgrade_duration_in_milliseconds = kwargs.get('upgrade_duration_in_milliseconds', None) + self.upgrade_domain_duration_in_milliseconds = kwargs.get('upgrade_domain_duration_in_milliseconds', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) + self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) + self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) diff --git a/customSDK/servicefabric/models/cluster_upgrade_progress_object_py3.py b/customSDK/servicefabric/models/cluster_upgrade_progress_object_py3.py new file mode 100644 index 0000000..0cf9e68 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_progress_object_py3.py @@ -0,0 +1,104 @@ +# 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 msrest.serialization import Model + + +class ClusterUpgradeProgressObject(Model): + """Information about a cluster upgrade. + + :param code_version: The ServiceFabric code version of the cluster. + :type code_version: str + :param config_version: The cluster configuration version (specified in the + cluster manifest). + :type config_version: str + :param upgrade_domains: List of upgrade domains and their statuses. + :type upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] + :param upgrade_state: The state of the upgrade domain. Possible values + include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', + 'RollingForwardPending', 'RollingForwardInProgress', + 'RollingForwardCompleted', 'Failed' + :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :param next_upgrade_domain: The name of the next upgrade domain to be + processed. + :type next_upgrade_domain: str + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_description: Represents a ServiceFabric cluster upgrade + :type upgrade_description: + ~azure.servicefabric.models.ClusterUpgradeDescriptionObject + :param upgrade_duration_in_milliseconds: The estimated elapsed time spent + processing the current overall upgrade. + :type upgrade_duration_in_milliseconds: str + :param upgrade_domain_duration_in_milliseconds: The estimated elapsed time + spent processing the current upgrade domain. + :type upgrade_domain_duration_in_milliseconds: str + :param unhealthy_evaluations: List of health evaluations that resulted in + the current aggregated health state. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param current_upgrade_domain_progress: Information about the current + in-progress upgrade domain. + :type current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :param start_timestamp_utc: The start time of the upgrade in UTC. + :type start_timestamp_utc: str + :param failure_timestamp_utc: The failure time of the upgrade in UTC. + :type failure_timestamp_utc: str + :param failure_reason: The cause of an upgrade failure that resulted in + FailureAction being executed. Possible values include: 'None', + 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + 'OverallUpgradeTimeout' + :type failure_reason: str or ~azure.servicefabric.models.FailureReason + :param upgrade_domain_progress_at_failure: The detailed upgrade progress + for nodes in the current upgrade domain at the point of failure. + :type upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailedUpgradeDomainProgressObject + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ClusterUpgradeDescriptionObject'}, + 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, + 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailedUpgradeDomainProgressObject'}, + } + + def __init__(self, *, code_version: str=None, config_version: str=None, upgrade_domains=None, upgrade_state=None, next_upgrade_domain: str=None, rolling_upgrade_mode="UnmonitoredAuto", upgrade_description=None, upgrade_duration_in_milliseconds: str=None, upgrade_domain_duration_in_milliseconds: str=None, unhealthy_evaluations=None, current_upgrade_domain_progress=None, start_timestamp_utc: str=None, failure_timestamp_utc: str=None, failure_reason=None, upgrade_domain_progress_at_failure=None, **kwargs) -> None: + super(ClusterUpgradeProgressObject, self).__init__(**kwargs) + self.code_version = code_version + self.config_version = config_version + self.upgrade_domains = upgrade_domains + self.upgrade_state = upgrade_state + self.next_upgrade_domain = next_upgrade_domain + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_description = upgrade_description + self.upgrade_duration_in_milliseconds = upgrade_duration_in_milliseconds + self.upgrade_domain_duration_in_milliseconds = upgrade_domain_duration_in_milliseconds + self.unhealthy_evaluations = unhealthy_evaluations + self.current_upgrade_domain_progress = current_upgrade_domain_progress + self.start_timestamp_utc = start_timestamp_utc + self.failure_timestamp_utc = failure_timestamp_utc + self.failure_reason = failure_reason + self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure diff --git a/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event.py b/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event.py new file mode 100644 index 0000000..a914773 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event.py @@ -0,0 +1,66 @@ +# 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 .cluster_event import ClusterEvent + + +class ClusterUpgradeRollbackCompletedEvent(ClusterEvent): + """Cluster Upgrade Rollback Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param failure_reason: Required. Describes failure. + :type failure_reason: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of + upgrade in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'target_cluster_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ClusterUpgradeRollbackCompletedEvent, self).__init__(**kwargs) + self.target_cluster_version = kwargs.get('target_cluster_version', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) + self.kind = 'ClusterUpgradeRollbackCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event_py3.py b/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event_py3.py new file mode 100644 index 0000000..75e456c --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event_py3.py @@ -0,0 +1,66 @@ +# 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 .cluster_event_py3 import ClusterEvent + + +class ClusterUpgradeRollbackCompletedEvent(ClusterEvent): + """Cluster Upgrade Rollback Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param failure_reason: Required. Describes failure. + :type failure_reason: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of + upgrade in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'target_cluster_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ClusterUpgradeRollbackCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.target_cluster_version = target_cluster_version + self.failure_reason = failure_reason + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + self.kind = 'ClusterUpgradeRollbackCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event.py b/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event.py new file mode 100644 index 0000000..b278a7d --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event.py @@ -0,0 +1,66 @@ +# 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 .cluster_event import ClusterEvent + + +class ClusterUpgradeRollbackStartedEvent(ClusterEvent): + """Cluster Upgrade Rollback Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param failure_reason: Required. Describes failure. + :type failure_reason: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of + upgrade in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'target_cluster_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ClusterUpgradeRollbackStartedEvent, self).__init__(**kwargs) + self.target_cluster_version = kwargs.get('target_cluster_version', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) + self.kind = 'ClusterUpgradeRollbackStarted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event_py3.py b/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event_py3.py new file mode 100644 index 0000000..54e00da --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event_py3.py @@ -0,0 +1,66 @@ +# 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 .cluster_event_py3 import ClusterEvent + + +class ClusterUpgradeRollbackStartedEvent(ClusterEvent): + """Cluster Upgrade Rollback Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param failure_reason: Required. Describes failure. + :type failure_reason: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of + upgrade in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'target_cluster_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ClusterUpgradeRollbackStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.target_cluster_version = target_cluster_version + self.failure_reason = failure_reason + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + self.kind = 'ClusterUpgradeRollbackStarted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_started_event.py b/customSDK/servicefabric/models/cluster_upgrade_started_event.py new file mode 100644 index 0000000..7222ff3 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_started_event.py @@ -0,0 +1,75 @@ +# 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 .cluster_event import ClusterEvent + + +class ClusterUpgradeStartedEvent(ClusterEvent): + """Cluster Upgrade Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param current_cluster_version: Required. Current Cluster version. + :type current_cluster_version: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param upgrade_type: Required. Type of upgrade. + :type upgrade_type: str + :param rolling_upgrade_mode: Required. Mode of upgrade. + :type rolling_upgrade_mode: str + :param failure_action: Required. Action if failed. + :type failure_action: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'current_cluster_version': {'required': True}, + 'target_cluster_version': {'required': True}, + 'upgrade_type': {'required': True}, + 'rolling_upgrade_mode': {'required': True}, + 'failure_action': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'current_cluster_version': {'key': 'CurrentClusterVersion', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterUpgradeStartedEvent, self).__init__(**kwargs) + self.current_cluster_version = kwargs.get('current_cluster_version', None) + self.target_cluster_version = kwargs.get('target_cluster_version', None) + self.upgrade_type = kwargs.get('upgrade_type', None) + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', None) + self.failure_action = kwargs.get('failure_action', None) + self.kind = 'ClusterUpgradeStarted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_started_event_py3.py b/customSDK/servicefabric/models/cluster_upgrade_started_event_py3.py new file mode 100644 index 0000000..e35bc36 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_started_event_py3.py @@ -0,0 +1,75 @@ +# 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 .cluster_event_py3 import ClusterEvent + + +class ClusterUpgradeStartedEvent(ClusterEvent): + """Cluster Upgrade Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param current_cluster_version: Required. Current Cluster version. + :type current_cluster_version: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param upgrade_type: Required. Type of upgrade. + :type upgrade_type: str + :param rolling_upgrade_mode: Required. Mode of upgrade. + :type rolling_upgrade_mode: str + :param failure_action: Required. Action if failed. + :type failure_action: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'current_cluster_version': {'required': True}, + 'target_cluster_version': {'required': True}, + 'upgrade_type': {'required': True}, + 'rolling_upgrade_mode': {'required': True}, + 'failure_action': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'current_cluster_version': {'key': 'CurrentClusterVersion', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, current_cluster_version: str, target_cluster_version: str, upgrade_type: str, rolling_upgrade_mode: str, failure_action: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ClusterUpgradeStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.current_cluster_version = current_cluster_version + self.target_cluster_version = target_cluster_version + self.upgrade_type = upgrade_type + self.rolling_upgrade_mode = rolling_upgrade_mode + self.failure_action = failure_action + self.kind = 'ClusterUpgradeStarted' diff --git a/customSDK/servicefabric/models/cluster_version.py b/customSDK/servicefabric/models/cluster_version.py new file mode 100644 index 0000000..15b4fdb --- /dev/null +++ b/customSDK/servicefabric/models/cluster_version.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class ClusterVersion(Model): + """The cluster version. + + :param version: The Service Fabric cluster runtime version. + :type version: str + """ + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterVersion, self).__init__(**kwargs) + self.version = kwargs.get('version', None) diff --git a/customSDK/servicefabric/models/cluster_version_py3.py b/customSDK/servicefabric/models/cluster_version_py3.py new file mode 100644 index 0000000..fcf8088 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_version_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class ClusterVersion(Model): + """The cluster version. + + :param version: The Service Fabric cluster runtime version. + :type version: str + """ + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, *, version: str=None, **kwargs) -> None: + super(ClusterVersion, self).__init__(**kwargs) + self.version = version diff --git a/customSDK/servicefabric/models/code_package_entry_point.py b/customSDK/servicefabric/models/code_package_entry_point.py new file mode 100644 index 0000000..7b03f01 --- /dev/null +++ b/customSDK/servicefabric/models/code_package_entry_point.py @@ -0,0 +1,63 @@ +# 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 msrest.serialization import Model + + +class CodePackageEntryPoint(Model): + """Information about setup or main entry point of a code package deployed on a + Service Fabric node. + + :param entry_point_location: The location of entry point executable on the + node. + :type entry_point_location: str + :param process_id: The process ID of the entry point. + :type process_id: str + :param run_as_user_name: The user name under which entry point executable + is run on the node. + :type run_as_user_name: str + :param code_package_entry_point_statistics: Statistics about setup or main + entry point of a code package deployed on a Service Fabric node. + :type code_package_entry_point_statistics: + ~azure.servicefabric.models.CodePackageEntryPointStatistics + :param status: Specifies the status of the code package entry point + deployed on a Service Fabric node. Possible values include: 'Invalid', + 'Pending', 'Starting', 'Started', 'Stopping', 'Stopped' + :type status: str or ~azure.servicefabric.models.EntryPointStatus + :param next_activation_time: The time (in UTC) when the entry point + executable will be run next. + :type next_activation_time: datetime + :param instance_id: The instance ID for current running entry point. For a + code package setup entry point (if specified) runs first and after it + finishes main entry point is started. Each time entry point executable is + run, its instance id will change. + :type instance_id: str + """ + + _attribute_map = { + 'entry_point_location': {'key': 'EntryPointLocation', 'type': 'str'}, + 'process_id': {'key': 'ProcessId', 'type': 'str'}, + 'run_as_user_name': {'key': 'RunAsUserName', 'type': 'str'}, + 'code_package_entry_point_statistics': {'key': 'CodePackageEntryPointStatistics', 'type': 'CodePackageEntryPointStatistics'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'next_activation_time': {'key': 'NextActivationTime', 'type': 'iso-8601'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CodePackageEntryPoint, self).__init__(**kwargs) + self.entry_point_location = kwargs.get('entry_point_location', None) + self.process_id = kwargs.get('process_id', None) + self.run_as_user_name = kwargs.get('run_as_user_name', None) + self.code_package_entry_point_statistics = kwargs.get('code_package_entry_point_statistics', None) + self.status = kwargs.get('status', None) + self.next_activation_time = kwargs.get('next_activation_time', None) + self.instance_id = kwargs.get('instance_id', None) diff --git a/customSDK/servicefabric/models/code_package_entry_point_py3.py b/customSDK/servicefabric/models/code_package_entry_point_py3.py new file mode 100644 index 0000000..08d4100 --- /dev/null +++ b/customSDK/servicefabric/models/code_package_entry_point_py3.py @@ -0,0 +1,63 @@ +# 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 msrest.serialization import Model + + +class CodePackageEntryPoint(Model): + """Information about setup or main entry point of a code package deployed on a + Service Fabric node. + + :param entry_point_location: The location of entry point executable on the + node. + :type entry_point_location: str + :param process_id: The process ID of the entry point. + :type process_id: str + :param run_as_user_name: The user name under which entry point executable + is run on the node. + :type run_as_user_name: str + :param code_package_entry_point_statistics: Statistics about setup or main + entry point of a code package deployed on a Service Fabric node. + :type code_package_entry_point_statistics: + ~azure.servicefabric.models.CodePackageEntryPointStatistics + :param status: Specifies the status of the code package entry point + deployed on a Service Fabric node. Possible values include: 'Invalid', + 'Pending', 'Starting', 'Started', 'Stopping', 'Stopped' + :type status: str or ~azure.servicefabric.models.EntryPointStatus + :param next_activation_time: The time (in UTC) when the entry point + executable will be run next. + :type next_activation_time: datetime + :param instance_id: The instance ID for current running entry point. For a + code package setup entry point (if specified) runs first and after it + finishes main entry point is started. Each time entry point executable is + run, its instance id will change. + :type instance_id: str + """ + + _attribute_map = { + 'entry_point_location': {'key': 'EntryPointLocation', 'type': 'str'}, + 'process_id': {'key': 'ProcessId', 'type': 'str'}, + 'run_as_user_name': {'key': 'RunAsUserName', 'type': 'str'}, + 'code_package_entry_point_statistics': {'key': 'CodePackageEntryPointStatistics', 'type': 'CodePackageEntryPointStatistics'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'next_activation_time': {'key': 'NextActivationTime', 'type': 'iso-8601'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__(self, *, entry_point_location: str=None, process_id: str=None, run_as_user_name: str=None, code_package_entry_point_statistics=None, status=None, next_activation_time=None, instance_id: str=None, **kwargs) -> None: + super(CodePackageEntryPoint, self).__init__(**kwargs) + self.entry_point_location = entry_point_location + self.process_id = process_id + self.run_as_user_name = run_as_user_name + self.code_package_entry_point_statistics = code_package_entry_point_statistics + self.status = status + self.next_activation_time = next_activation_time + self.instance_id = instance_id diff --git a/customSDK/servicefabric/models/code_package_entry_point_statistics.py b/customSDK/servicefabric/models/code_package_entry_point_statistics.py new file mode 100644 index 0000000..2f33d3d --- /dev/null +++ b/customSDK/servicefabric/models/code_package_entry_point_statistics.py @@ -0,0 +1,77 @@ +# 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 msrest.serialization import Model + + +class CodePackageEntryPointStatistics(Model): + """Statistics about setup or main entry point of a code package deployed on a + Service Fabric node. + + :param last_exit_code: The last exit code of the entry point. + :type last_exit_code: str + :param last_activation_time: The last time (in UTC) when Service Fabric + attempted to run the entry point. + :type last_activation_time: datetime + :param last_exit_time: The last time (in UTC) when the entry point + finished running. + :type last_exit_time: datetime + :param last_successful_activation_time: The last time (in UTC) when the + entry point ran successfully. + :type last_successful_activation_time: datetime + :param last_successful_exit_time: The last time (in UTC) when the entry + point finished running gracefully. + :type last_successful_exit_time: datetime + :param activation_count: Number of times the entry point has run. + :type activation_count: str + :param activation_failure_count: Number of times the entry point failed to + run. + :type activation_failure_count: str + :param continuous_activation_failure_count: Number of times the entry + point continuously failed to run. + :type continuous_activation_failure_count: str + :param exit_count: Number of times the entry point finished running. + :type exit_count: str + :param exit_failure_count: Number of times the entry point failed to exit + gracefully. + :type exit_failure_count: str + :param continuous_exit_failure_count: Number of times the entry point + continuously failed to exit gracefully. + :type continuous_exit_failure_count: str + """ + + _attribute_map = { + 'last_exit_code': {'key': 'LastExitCode', 'type': 'str'}, + 'last_activation_time': {'key': 'LastActivationTime', 'type': 'iso-8601'}, + 'last_exit_time': {'key': 'LastExitTime', 'type': 'iso-8601'}, + 'last_successful_activation_time': {'key': 'LastSuccessfulActivationTime', 'type': 'iso-8601'}, + 'last_successful_exit_time': {'key': 'LastSuccessfulExitTime', 'type': 'iso-8601'}, + 'activation_count': {'key': 'ActivationCount', 'type': 'str'}, + 'activation_failure_count': {'key': 'ActivationFailureCount', 'type': 'str'}, + 'continuous_activation_failure_count': {'key': 'ContinuousActivationFailureCount', 'type': 'str'}, + 'exit_count': {'key': 'ExitCount', 'type': 'str'}, + 'exit_failure_count': {'key': 'ExitFailureCount', 'type': 'str'}, + 'continuous_exit_failure_count': {'key': 'ContinuousExitFailureCount', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CodePackageEntryPointStatistics, self).__init__(**kwargs) + self.last_exit_code = kwargs.get('last_exit_code', None) + self.last_activation_time = kwargs.get('last_activation_time', None) + self.last_exit_time = kwargs.get('last_exit_time', None) + self.last_successful_activation_time = kwargs.get('last_successful_activation_time', None) + self.last_successful_exit_time = kwargs.get('last_successful_exit_time', None) + self.activation_count = kwargs.get('activation_count', None) + self.activation_failure_count = kwargs.get('activation_failure_count', None) + self.continuous_activation_failure_count = kwargs.get('continuous_activation_failure_count', None) + self.exit_count = kwargs.get('exit_count', None) + self.exit_failure_count = kwargs.get('exit_failure_count', None) + self.continuous_exit_failure_count = kwargs.get('continuous_exit_failure_count', None) diff --git a/customSDK/servicefabric/models/code_package_entry_point_statistics_py3.py b/customSDK/servicefabric/models/code_package_entry_point_statistics_py3.py new file mode 100644 index 0000000..1de0c88 --- /dev/null +++ b/customSDK/servicefabric/models/code_package_entry_point_statistics_py3.py @@ -0,0 +1,77 @@ +# 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 msrest.serialization import Model + + +class CodePackageEntryPointStatistics(Model): + """Statistics about setup or main entry point of a code package deployed on a + Service Fabric node. + + :param last_exit_code: The last exit code of the entry point. + :type last_exit_code: str + :param last_activation_time: The last time (in UTC) when Service Fabric + attempted to run the entry point. + :type last_activation_time: datetime + :param last_exit_time: The last time (in UTC) when the entry point + finished running. + :type last_exit_time: datetime + :param last_successful_activation_time: The last time (in UTC) when the + entry point ran successfully. + :type last_successful_activation_time: datetime + :param last_successful_exit_time: The last time (in UTC) when the entry + point finished running gracefully. + :type last_successful_exit_time: datetime + :param activation_count: Number of times the entry point has run. + :type activation_count: str + :param activation_failure_count: Number of times the entry point failed to + run. + :type activation_failure_count: str + :param continuous_activation_failure_count: Number of times the entry + point continuously failed to run. + :type continuous_activation_failure_count: str + :param exit_count: Number of times the entry point finished running. + :type exit_count: str + :param exit_failure_count: Number of times the entry point failed to exit + gracefully. + :type exit_failure_count: str + :param continuous_exit_failure_count: Number of times the entry point + continuously failed to exit gracefully. + :type continuous_exit_failure_count: str + """ + + _attribute_map = { + 'last_exit_code': {'key': 'LastExitCode', 'type': 'str'}, + 'last_activation_time': {'key': 'LastActivationTime', 'type': 'iso-8601'}, + 'last_exit_time': {'key': 'LastExitTime', 'type': 'iso-8601'}, + 'last_successful_activation_time': {'key': 'LastSuccessfulActivationTime', 'type': 'iso-8601'}, + 'last_successful_exit_time': {'key': 'LastSuccessfulExitTime', 'type': 'iso-8601'}, + 'activation_count': {'key': 'ActivationCount', 'type': 'str'}, + 'activation_failure_count': {'key': 'ActivationFailureCount', 'type': 'str'}, + 'continuous_activation_failure_count': {'key': 'ContinuousActivationFailureCount', 'type': 'str'}, + 'exit_count': {'key': 'ExitCount', 'type': 'str'}, + 'exit_failure_count': {'key': 'ExitFailureCount', 'type': 'str'}, + 'continuous_exit_failure_count': {'key': 'ContinuousExitFailureCount', 'type': 'str'}, + } + + def __init__(self, *, last_exit_code: str=None, last_activation_time=None, last_exit_time=None, last_successful_activation_time=None, last_successful_exit_time=None, activation_count: str=None, activation_failure_count: str=None, continuous_activation_failure_count: str=None, exit_count: str=None, exit_failure_count: str=None, continuous_exit_failure_count: str=None, **kwargs) -> None: + super(CodePackageEntryPointStatistics, self).__init__(**kwargs) + self.last_exit_code = last_exit_code + self.last_activation_time = last_activation_time + self.last_exit_time = last_exit_time + self.last_successful_activation_time = last_successful_activation_time + self.last_successful_exit_time = last_successful_exit_time + self.activation_count = activation_count + self.activation_failure_count = activation_failure_count + self.continuous_activation_failure_count = continuous_activation_failure_count + self.exit_count = exit_count + self.exit_failure_count = exit_failure_count + self.continuous_exit_failure_count = continuous_exit_failure_count diff --git a/customSDK/servicefabric/models/compose_deployment_status_info.py b/customSDK/servicefabric/models/compose_deployment_status_info.py new file mode 100644 index 0000000..5895c94 --- /dev/null +++ b/customSDK/servicefabric/models/compose_deployment_status_info.py @@ -0,0 +1,44 @@ +# 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 msrest.serialization import Model + + +class ComposeDeploymentStatusInfo(Model): + """Information about a Service Fabric compose deployment. + + :param name: The name of the deployment. + :type name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param status: The status of the compose deployment. Possible values + include: 'Invalid', 'Provisioning', 'Creating', 'Ready', 'Unprovisioning', + 'Deleting', 'Failed', 'Upgrading' + :type status: str or ~azure.servicefabric.models.ComposeDeploymentStatus + :param status_details: The status details of compose deployment including + failure message. + :type status_details: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComposeDeploymentStatusInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.application_name = kwargs.get('application_name', None) + self.status = kwargs.get('status', None) + self.status_details = kwargs.get('status_details', None) diff --git a/customSDK/servicefabric/models/compose_deployment_status_info_py3.py b/customSDK/servicefabric/models/compose_deployment_status_info_py3.py new file mode 100644 index 0000000..3ffec70 --- /dev/null +++ b/customSDK/servicefabric/models/compose_deployment_status_info_py3.py @@ -0,0 +1,44 @@ +# 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 msrest.serialization import Model + + +class ComposeDeploymentStatusInfo(Model): + """Information about a Service Fabric compose deployment. + + :param name: The name of the deployment. + :type name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param status: The status of the compose deployment. Possible values + include: 'Invalid', 'Provisioning', 'Creating', 'Ready', 'Unprovisioning', + 'Deleting', 'Failed', 'Upgrading' + :type status: str or ~azure.servicefabric.models.ComposeDeploymentStatus + :param status_details: The status details of compose deployment including + failure message. + :type status_details: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, application_name: str=None, status=None, status_details: str=None, **kwargs) -> None: + super(ComposeDeploymentStatusInfo, self).__init__(**kwargs) + self.name = name + self.application_name = application_name + self.status = status + self.status_details = status_details diff --git a/customSDK/servicefabric/models/compose_deployment_upgrade_description.py b/customSDK/servicefabric/models/compose_deployment_upgrade_description.py new file mode 100644 index 0000000..fd92e49 --- /dev/null +++ b/customSDK/servicefabric/models/compose_deployment_upgrade_description.py @@ -0,0 +1,87 @@ +# 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 msrest.serialization import Model + + +class ComposeDeploymentUpgradeDescription(Model): + """Describes the parameters for a compose deployment upgrade. + + All required parameters must be populated in order to send to Azure. + + :param deployment_name: Required. The name of the deployment. + :type deployment_name: str + :param compose_file_content: Required. The content of the compose file + that describes the deployment to create. + :type compose_file_content: str + :param registry_credential: Credential information to connect to container + registry. + :type registry_credential: ~azure.servicefabric.models.RegistryCredential + :param upgrade_kind: Required. The kind of upgrade out of the following + possible values. Possible values include: 'Invalid', 'Rolling'. Default + value: "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param application_health_policy: Defines a health policy used to evaluate + the health of an application or one of its children entities. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + """ + + _validation = { + 'deployment_name': {'required': True}, + 'compose_file_content': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, + 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + } + + def __init__(self, **kwargs): + super(ComposeDeploymentUpgradeDescription, self).__init__(**kwargs) + self.deployment_name = kwargs.get('deployment_name', None) + self.compose_file_content = kwargs.get('compose_file_content', None) + self.registry_credential = kwargs.get('registry_credential', None) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) + self.force_restart = kwargs.get('force_restart', None) + self.monitoring_policy = kwargs.get('monitoring_policy', None) + self.application_health_policy = kwargs.get('application_health_policy', None) diff --git a/customSDK/servicefabric/models/compose_deployment_upgrade_description_py3.py b/customSDK/servicefabric/models/compose_deployment_upgrade_description_py3.py new file mode 100644 index 0000000..c8d33a7 --- /dev/null +++ b/customSDK/servicefabric/models/compose_deployment_upgrade_description_py3.py @@ -0,0 +1,87 @@ +# 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 msrest.serialization import Model + + +class ComposeDeploymentUpgradeDescription(Model): + """Describes the parameters for a compose deployment upgrade. + + All required parameters must be populated in order to send to Azure. + + :param deployment_name: Required. The name of the deployment. + :type deployment_name: str + :param compose_file_content: Required. The content of the compose file + that describes the deployment to create. + :type compose_file_content: str + :param registry_credential: Credential information to connect to container + registry. + :type registry_credential: ~azure.servicefabric.models.RegistryCredential + :param upgrade_kind: Required. The kind of upgrade out of the following + possible values. Possible values include: 'Invalid', 'Rolling'. Default + value: "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param application_health_policy: Defines a health policy used to evaluate + the health of an application or one of its children entities. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + """ + + _validation = { + 'deployment_name': {'required': True}, + 'compose_file_content': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, + 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + } + + def __init__(self, *, deployment_name: str, compose_file_content: str, registry_credential=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, monitoring_policy=None, application_health_policy=None, **kwargs) -> None: + super(ComposeDeploymentUpgradeDescription, self).__init__(**kwargs) + self.deployment_name = deployment_name + self.compose_file_content = compose_file_content + self.registry_credential = registry_credential + self.upgrade_kind = upgrade_kind + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.force_restart = force_restart + self.monitoring_policy = monitoring_policy + self.application_health_policy = application_health_policy diff --git a/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info.py b/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info.py new file mode 100644 index 0000000..be09178 --- /dev/null +++ b/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info.py @@ -0,0 +1,148 @@ +# 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 msrest.serialization import Model + + +class ComposeDeploymentUpgradeProgressInfo(Model): + """Describes the parameters for a compose deployment upgrade. + + :param deployment_name: The name of the target deployment. + :type deployment_name: str + :param application_name: The name of the target application, including the + 'fabric:' URI scheme. + :type application_name: str + :param upgrade_state: The state of the compose deployment upgrade. + Possible values include: 'Invalid', 'ProvisioningTarget', + 'RollingForwardInProgress', 'RollingForwardPending', + 'UnprovisioningCurrent', 'RollingForwardCompleted', + 'RollingBackInProgress', 'UnprovisioningTarget', 'RollingBackCompleted', + 'Failed' + :type upgrade_state: str or + ~azure.servicefabric.models.ComposeDeploymentUpgradeState + :param upgrade_status_details: Additional detailed information about the + status of the pending upgrade. + :type upgrade_status_details: str + :param upgrade_kind: The kind of upgrade out of the following possible + values. Possible values include: 'Invalid', 'Rolling'. Default value: + "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param application_health_policy: Defines a health policy used to evaluate + the health of an application or one of its children entities. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param target_application_type_version: The target application type + version (found in the application manifest) for the application upgrade. + :type target_application_type_version: str + :param upgrade_duration: The estimated amount of time that the overall + upgrade elapsed. It is first interpreted as a string representing an ISO + 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. + :type upgrade_duration: str + :param current_upgrade_domain_duration: The estimated amount of time spent + processing current Upgrade Domain. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type current_upgrade_domain_duration: str + :param application_unhealthy_evaluations: List of health evaluations that + resulted in the current aggregated health state. + :type application_unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param current_upgrade_domain_progress: Information about the current + in-progress upgrade domain. + :type current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :param start_timestamp_utc: The estimated UTC datetime when the upgrade + started. + :type start_timestamp_utc: str + :param failure_timestamp_utc: The estimated UTC datetime when the upgrade + failed and FailureAction was executed. + :type failure_timestamp_utc: str + :param failure_reason: The cause of an upgrade failure that resulted in + FailureAction being executed. Possible values include: 'None', + 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + 'OverallUpgradeTimeout' + :type failure_reason: str or ~azure.servicefabric.models.FailureReason + :param upgrade_domain_progress_at_failure: Information about the upgrade + domain progress at the time of upgrade failure. + :type upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo + :param application_upgrade_status_details: Additional details of + application upgrade including failure message. + :type application_upgrade_status_details: str + """ + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + 'current_upgrade_domain_duration': {'key': 'CurrentUpgradeDomainDuration', 'type': 'str'}, + 'application_unhealthy_evaluations': {'key': 'ApplicationUnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, + 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComposeDeploymentUpgradeProgressInfo, self).__init__(**kwargs) + self.deployment_name = kwargs.get('deployment_name', None) + self.application_name = kwargs.get('application_name', None) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.upgrade_status_details = kwargs.get('upgrade_status_details', None) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.force_restart = kwargs.get('force_restart', None) + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) + self.monitoring_policy = kwargs.get('monitoring_policy', None) + self.application_health_policy = kwargs.get('application_health_policy', None) + self.target_application_type_version = kwargs.get('target_application_type_version', None) + self.upgrade_duration = kwargs.get('upgrade_duration', None) + self.current_upgrade_domain_duration = kwargs.get('current_upgrade_domain_duration', None) + self.application_unhealthy_evaluations = kwargs.get('application_unhealthy_evaluations', None) + self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) + self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) + self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) + self.application_upgrade_status_details = kwargs.get('application_upgrade_status_details', None) diff --git a/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info_py3.py b/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info_py3.py new file mode 100644 index 0000000..f0cf118 --- /dev/null +++ b/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info_py3.py @@ -0,0 +1,148 @@ +# 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 msrest.serialization import Model + + +class ComposeDeploymentUpgradeProgressInfo(Model): + """Describes the parameters for a compose deployment upgrade. + + :param deployment_name: The name of the target deployment. + :type deployment_name: str + :param application_name: The name of the target application, including the + 'fabric:' URI scheme. + :type application_name: str + :param upgrade_state: The state of the compose deployment upgrade. + Possible values include: 'Invalid', 'ProvisioningTarget', + 'RollingForwardInProgress', 'RollingForwardPending', + 'UnprovisioningCurrent', 'RollingForwardCompleted', + 'RollingBackInProgress', 'UnprovisioningTarget', 'RollingBackCompleted', + 'Failed' + :type upgrade_state: str or + ~azure.servicefabric.models.ComposeDeploymentUpgradeState + :param upgrade_status_details: Additional detailed information about the + status of the pending upgrade. + :type upgrade_status_details: str + :param upgrade_kind: The kind of upgrade out of the following possible + values. Possible values include: 'Invalid', 'Rolling'. Default value: + "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param application_health_policy: Defines a health policy used to evaluate + the health of an application or one of its children entities. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param target_application_type_version: The target application type + version (found in the application manifest) for the application upgrade. + :type target_application_type_version: str + :param upgrade_duration: The estimated amount of time that the overall + upgrade elapsed. It is first interpreted as a string representing an ISO + 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. + :type upgrade_duration: str + :param current_upgrade_domain_duration: The estimated amount of time spent + processing current Upgrade Domain. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type current_upgrade_domain_duration: str + :param application_unhealthy_evaluations: List of health evaluations that + resulted in the current aggregated health state. + :type application_unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param current_upgrade_domain_progress: Information about the current + in-progress upgrade domain. + :type current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :param start_timestamp_utc: The estimated UTC datetime when the upgrade + started. + :type start_timestamp_utc: str + :param failure_timestamp_utc: The estimated UTC datetime when the upgrade + failed and FailureAction was executed. + :type failure_timestamp_utc: str + :param failure_reason: The cause of an upgrade failure that resulted in + FailureAction being executed. Possible values include: 'None', + 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + 'OverallUpgradeTimeout' + :type failure_reason: str or ~azure.servicefabric.models.FailureReason + :param upgrade_domain_progress_at_failure: Information about the upgrade + domain progress at the time of upgrade failure. + :type upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo + :param application_upgrade_status_details: Additional details of + application upgrade including failure message. + :type application_upgrade_status_details: str + """ + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + 'current_upgrade_domain_duration': {'key': 'CurrentUpgradeDomainDuration', 'type': 'str'}, + 'application_unhealthy_evaluations': {'key': 'ApplicationUnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, + 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, + } + + def __init__(self, *, deployment_name: str=None, application_name: str=None, upgrade_state=None, upgrade_status_details: str=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", force_restart: bool=None, upgrade_replica_set_check_timeout_in_seconds: int=None, monitoring_policy=None, application_health_policy=None, target_application_type_version: str=None, upgrade_duration: str=None, current_upgrade_domain_duration: str=None, application_unhealthy_evaluations=None, current_upgrade_domain_progress=None, start_timestamp_utc: str=None, failure_timestamp_utc: str=None, failure_reason=None, upgrade_domain_progress_at_failure=None, application_upgrade_status_details: str=None, **kwargs) -> None: + super(ComposeDeploymentUpgradeProgressInfo, self).__init__(**kwargs) + self.deployment_name = deployment_name + self.application_name = application_name + self.upgrade_state = upgrade_state + self.upgrade_status_details = upgrade_status_details + self.upgrade_kind = upgrade_kind + self.rolling_upgrade_mode = rolling_upgrade_mode + self.force_restart = force_restart + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.monitoring_policy = monitoring_policy + self.application_health_policy = application_health_policy + self.target_application_type_version = target_application_type_version + self.upgrade_duration = upgrade_duration + self.current_upgrade_domain_duration = current_upgrade_domain_duration + self.application_unhealthy_evaluations = application_unhealthy_evaluations + self.current_upgrade_domain_progress = current_upgrade_domain_progress + self.start_timestamp_utc = start_timestamp_utc + self.failure_timestamp_utc = failure_timestamp_utc + self.failure_reason = failure_reason + self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure + self.application_upgrade_status_details = application_upgrade_status_details diff --git a/customSDK/servicefabric/models/config_parameter_override.py b/customSDK/servicefabric/models/config_parameter_override.py new file mode 100644 index 0000000..b6e484e --- /dev/null +++ b/customSDK/servicefabric/models/config_parameter_override.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class ConfigParameterOverride(Model): + """Information about a configuration parameter override. + + All required parameters must be populated in order to send to Azure. + + :param section_name: Required. Name of the section for the parameter + override. + :type section_name: str + :param parameter_name: Required. Name of the parameter that has been + overridden. + :type parameter_name: str + :param parameter_value: Required. Value of the overridden parameter. + :type parameter_value: str + :param timeout: The duration until config override is considered as valid. + :type timeout: timedelta + :param persist_across_upgrade: A value that indicates whether config + override will be removed on upgrade or will still be considered as valid. + :type persist_across_upgrade: bool + """ + + _validation = { + 'section_name': {'required': True}, + 'parameter_name': {'required': True}, + 'parameter_value': {'required': True}, + } + + _attribute_map = { + 'section_name': {'key': 'SectionName', 'type': 'str'}, + 'parameter_name': {'key': 'ParameterName', 'type': 'str'}, + 'parameter_value': {'key': 'ParameterValue', 'type': 'str'}, + 'timeout': {'key': 'Timeout', 'type': 'duration'}, + 'persist_across_upgrade': {'key': 'PersistAcrossUpgrade', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ConfigParameterOverride, self).__init__(**kwargs) + self.section_name = kwargs.get('section_name', None) + self.parameter_name = kwargs.get('parameter_name', None) + self.parameter_value = kwargs.get('parameter_value', None) + self.timeout = kwargs.get('timeout', None) + self.persist_across_upgrade = kwargs.get('persist_across_upgrade', None) diff --git a/customSDK/servicefabric/models/config_parameter_override_py3.py b/customSDK/servicefabric/models/config_parameter_override_py3.py new file mode 100644 index 0000000..2bbc620 --- /dev/null +++ b/customSDK/servicefabric/models/config_parameter_override_py3.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class ConfigParameterOverride(Model): + """Information about a configuration parameter override. + + All required parameters must be populated in order to send to Azure. + + :param section_name: Required. Name of the section for the parameter + override. + :type section_name: str + :param parameter_name: Required. Name of the parameter that has been + overridden. + :type parameter_name: str + :param parameter_value: Required. Value of the overridden parameter. + :type parameter_value: str + :param timeout: The duration until config override is considered as valid. + :type timeout: timedelta + :param persist_across_upgrade: A value that indicates whether config + override will be removed on upgrade or will still be considered as valid. + :type persist_across_upgrade: bool + """ + + _validation = { + 'section_name': {'required': True}, + 'parameter_name': {'required': True}, + 'parameter_value': {'required': True}, + } + + _attribute_map = { + 'section_name': {'key': 'SectionName', 'type': 'str'}, + 'parameter_name': {'key': 'ParameterName', 'type': 'str'}, + 'parameter_value': {'key': 'ParameterValue', 'type': 'str'}, + 'timeout': {'key': 'Timeout', 'type': 'duration'}, + 'persist_across_upgrade': {'key': 'PersistAcrossUpgrade', 'type': 'bool'}, + } + + def __init__(self, *, section_name: str, parameter_name: str, parameter_value: str, timeout=None, persist_across_upgrade: bool=None, **kwargs) -> None: + super(ConfigParameterOverride, self).__init__(**kwargs) + self.section_name = section_name + self.parameter_name = parameter_name + self.parameter_value = parameter_value + self.timeout = timeout + self.persist_across_upgrade = persist_across_upgrade diff --git a/customSDK/servicefabric/models/container_api_request_body.py b/customSDK/servicefabric/models/container_api_request_body.py new file mode 100644 index 0000000..71b32cd --- /dev/null +++ b/customSDK/servicefabric/models/container_api_request_body.py @@ -0,0 +1,47 @@ +# 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 msrest.serialization import Model + + +class ContainerApiRequestBody(Model): + """parameters for making container API call. + + All required parameters must be populated in order to send to Azure. + + :param http_verb: HTTP verb of container REST API, defaults to "GET" + :type http_verb: str + :param uri_path: Required. URI path of container REST API + :type uri_path: str + :param content_type: Content type of container REST API request, defaults + to "application/json" + :type content_type: str + :param body: HTTP request body of container REST API + :type body: str + """ + + _validation = { + 'uri_path': {'required': True}, + } + + _attribute_map = { + 'http_verb': {'key': 'HttpVerb', 'type': 'str'}, + 'uri_path': {'key': 'UriPath', 'type': 'str'}, + 'content_type': {'key': 'Content-Type', 'type': 'str'}, + 'body': {'key': 'Body', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerApiRequestBody, self).__init__(**kwargs) + self.http_verb = kwargs.get('http_verb', None) + self.uri_path = kwargs.get('uri_path', None) + self.content_type = kwargs.get('content_type', None) + self.body = kwargs.get('body', None) diff --git a/customSDK/servicefabric/models/container_api_request_body_py3.py b/customSDK/servicefabric/models/container_api_request_body_py3.py new file mode 100644 index 0000000..2a44420 --- /dev/null +++ b/customSDK/servicefabric/models/container_api_request_body_py3.py @@ -0,0 +1,47 @@ +# 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 msrest.serialization import Model + + +class ContainerApiRequestBody(Model): + """parameters for making container API call. + + All required parameters must be populated in order to send to Azure. + + :param http_verb: HTTP verb of container REST API, defaults to "GET" + :type http_verb: str + :param uri_path: Required. URI path of container REST API + :type uri_path: str + :param content_type: Content type of container REST API request, defaults + to "application/json" + :type content_type: str + :param body: HTTP request body of container REST API + :type body: str + """ + + _validation = { + 'uri_path': {'required': True}, + } + + _attribute_map = { + 'http_verb': {'key': 'HttpVerb', 'type': 'str'}, + 'uri_path': {'key': 'UriPath', 'type': 'str'}, + 'content_type': {'key': 'Content-Type', 'type': 'str'}, + 'body': {'key': 'Body', 'type': 'str'}, + } + + def __init__(self, *, uri_path: str, http_verb: str=None, content_type: str=None, body: str=None, **kwargs) -> None: + super(ContainerApiRequestBody, self).__init__(**kwargs) + self.http_verb = http_verb + self.uri_path = uri_path + self.content_type = content_type + self.body = body diff --git a/customSDK/servicefabric/models/container_api_response.py b/customSDK/servicefabric/models/container_api_response.py new file mode 100644 index 0000000..1289e07 --- /dev/null +++ b/customSDK/servicefabric/models/container_api_response.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class ContainerApiResponse(Model): + """Response body that wraps container API result. + + All required parameters must be populated in order to send to Azure. + + :param container_api_result: Required. Container API result. + :type container_api_result: ~azure.servicefabric.models.ContainerApiResult + """ + + _validation = { + 'container_api_result': {'required': True}, + } + + _attribute_map = { + 'container_api_result': {'key': 'ContainerApiResult', 'type': 'ContainerApiResult'}, + } + + def __init__(self, **kwargs): + super(ContainerApiResponse, self).__init__(**kwargs) + self.container_api_result = kwargs.get('container_api_result', None) diff --git a/customSDK/servicefabric/models/container_api_response_py3.py b/customSDK/servicefabric/models/container_api_response_py3.py new file mode 100644 index 0000000..ce18615 --- /dev/null +++ b/customSDK/servicefabric/models/container_api_response_py3.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class ContainerApiResponse(Model): + """Response body that wraps container API result. + + All required parameters must be populated in order to send to Azure. + + :param container_api_result: Required. Container API result. + :type container_api_result: ~azure.servicefabric.models.ContainerApiResult + """ + + _validation = { + 'container_api_result': {'required': True}, + } + + _attribute_map = { + 'container_api_result': {'key': 'ContainerApiResult', 'type': 'ContainerApiResult'}, + } + + def __init__(self, *, container_api_result, **kwargs) -> None: + super(ContainerApiResponse, self).__init__(**kwargs) + self.container_api_result = container_api_result diff --git a/customSDK/servicefabric/models/container_api_result.py b/customSDK/servicefabric/models/container_api_result.py new file mode 100644 index 0000000..3fb88ba --- /dev/null +++ b/customSDK/servicefabric/models/container_api_result.py @@ -0,0 +1,47 @@ +# 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 msrest.serialization import Model + + +class ContainerApiResult(Model): + """Container API result. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. HTTP status code returned by the target container + API + :type status: int + :param content_type: HTTP content type + :type content_type: str + :param content_encoding: HTTP content encoding + :type content_encoding: str + :param body: container API result body + :type body: str + """ + + _validation = { + 'status': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'Status', 'type': 'int'}, + 'content_type': {'key': 'Content-Type', 'type': 'str'}, + 'content_encoding': {'key': 'Content-Encoding', 'type': 'str'}, + 'body': {'key': 'Body', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerApiResult, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.content_type = kwargs.get('content_type', None) + self.content_encoding = kwargs.get('content_encoding', None) + self.body = kwargs.get('body', None) diff --git a/customSDK/servicefabric/models/container_api_result_py3.py b/customSDK/servicefabric/models/container_api_result_py3.py new file mode 100644 index 0000000..c4b4372 --- /dev/null +++ b/customSDK/servicefabric/models/container_api_result_py3.py @@ -0,0 +1,47 @@ +# 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 msrest.serialization import Model + + +class ContainerApiResult(Model): + """Container API result. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. HTTP status code returned by the target container + API + :type status: int + :param content_type: HTTP content type + :type content_type: str + :param content_encoding: HTTP content encoding + :type content_encoding: str + :param body: container API result body + :type body: str + """ + + _validation = { + 'status': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'Status', 'type': 'int'}, + 'content_type': {'key': 'Content-Type', 'type': 'str'}, + 'content_encoding': {'key': 'Content-Encoding', 'type': 'str'}, + 'body': {'key': 'Body', 'type': 'str'}, + } + + def __init__(self, *, status: int, content_type: str=None, content_encoding: str=None, body: str=None, **kwargs) -> None: + super(ContainerApiResult, self).__init__(**kwargs) + self.status = status + self.content_type = content_type + self.content_encoding = content_encoding + self.body = body diff --git a/customSDK/servicefabric/models/container_code_package_properties.py b/customSDK/servicefabric/models/container_code_package_properties.py new file mode 100644 index 0000000..b72df93 --- /dev/null +++ b/customSDK/servicefabric/models/container_code_package_properties.py @@ -0,0 +1,118 @@ +# 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 msrest.serialization import Model + + +class ContainerCodePackageProperties(Model): + """Describes a container and its runtime properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the code package. + :type name: str + :param image: Required. The Container image to use. + :type image: str + :param image_registry_credential: Image registry credential. + :type image_registry_credential: + ~azure.servicefabric.models.ImageRegistryCredential + :param entry_point: Override for the default entry point in the container. + :type entry_point: str + :param commands: Command array to execute within the container in exec + form. + :type commands: list[str] + :param environment_variables: The environment variables to set in this + container + :type environment_variables: + list[~azure.servicefabric.models.EnvironmentVariable] + :param settings: The settings to set in this container. The setting file + path can be fetched from environment variable "Fabric_SettingPath". The + path for Windows container is "C:\\\\secrets". The path for Linux + container is "/var/secrets". + :type settings: list[~azure.servicefabric.models.Setting] + :param labels: The labels to set in this container. + :type labels: list[~azure.servicefabric.models.ContainerLabel] + :param endpoints: The endpoints exposed by this container. + :type endpoints: list[~azure.servicefabric.models.EndpointProperties] + :param resources: Required. The resources required by this container. + :type resources: ~azure.servicefabric.models.ResourceRequirements + :param volume_refs: Volumes to be attached to the container. The lifetime + of these volumes is independent of the application's lifetime. + :type volume_refs: list[~azure.servicefabric.models.VolumeReference] + :param volumes: Volumes to be attached to the container. The lifetime of + these volumes is scoped to the application's lifetime. + :type volumes: list[~azure.servicefabric.models.ApplicationScopedVolume] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :param reliable_collections_refs: A list of ReliableCollection resources + used by this particular code package. Please refer to + ReliableCollectionsRef for more details. + :type reliable_collections_refs: + list[~azure.servicefabric.models.ReliableCollectionsRef] + :ivar instance_view: Runtime information of a container instance. + :vartype instance_view: ~azure.servicefabric.models.ContainerInstanceView + :param liveness_probe: An array of liveness probes for a code package. It + determines when to restart a code package. + :type liveness_probe: list[~azure.servicefabric.models.Probe] + :param readiness_probe: An array of readiness probes for a code package. + It determines when to unpublish an endpoint. + :type readiness_probe: list[~azure.servicefabric.models.Probe] + """ + + _validation = { + 'name': {'required': True}, + 'image': {'required': True}, + 'resources': {'required': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'image': {'key': 'image', 'type': 'str'}, + 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, + 'entry_point': {'key': 'entryPoint', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[str]'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'}, + 'settings': {'key': 'settings', 'type': '[Setting]'}, + 'labels': {'key': 'labels', 'type': '[ContainerLabel]'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointProperties]'}, + 'resources': {'key': 'resources', 'type': 'ResourceRequirements'}, + 'volume_refs': {'key': 'volumeRefs', 'type': '[VolumeReference]'}, + 'volumes': {'key': 'volumes', 'type': '[ApplicationScopedVolume]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + 'reliable_collections_refs': {'key': 'reliableCollectionsRefs', 'type': '[ReliableCollectionsRef]'}, + 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, + 'liveness_probe': {'key': 'livenessProbe', 'type': '[Probe]'}, + 'readiness_probe': {'key': 'readinessProbe', 'type': '[Probe]'}, + } + + def __init__(self, **kwargs): + super(ContainerCodePackageProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.image = kwargs.get('image', None) + self.image_registry_credential = kwargs.get('image_registry_credential', None) + self.entry_point = kwargs.get('entry_point', None) + self.commands = kwargs.get('commands', None) + self.environment_variables = kwargs.get('environment_variables', None) + self.settings = kwargs.get('settings', None) + self.labels = kwargs.get('labels', None) + self.endpoints = kwargs.get('endpoints', None) + self.resources = kwargs.get('resources', None) + self.volume_refs = kwargs.get('volume_refs', None) + self.volumes = kwargs.get('volumes', None) + self.diagnostics = kwargs.get('diagnostics', None) + self.reliable_collections_refs = kwargs.get('reliable_collections_refs', None) + self.instance_view = None + self.liveness_probe = kwargs.get('liveness_probe', None) + self.readiness_probe = kwargs.get('readiness_probe', None) diff --git a/customSDK/servicefabric/models/container_code_package_properties_py3.py b/customSDK/servicefabric/models/container_code_package_properties_py3.py new file mode 100644 index 0000000..29327cb --- /dev/null +++ b/customSDK/servicefabric/models/container_code_package_properties_py3.py @@ -0,0 +1,118 @@ +# 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 msrest.serialization import Model + + +class ContainerCodePackageProperties(Model): + """Describes a container and its runtime properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the code package. + :type name: str + :param image: Required. The Container image to use. + :type image: str + :param image_registry_credential: Image registry credential. + :type image_registry_credential: + ~azure.servicefabric.models.ImageRegistryCredential + :param entry_point: Override for the default entry point in the container. + :type entry_point: str + :param commands: Command array to execute within the container in exec + form. + :type commands: list[str] + :param environment_variables: The environment variables to set in this + container + :type environment_variables: + list[~azure.servicefabric.models.EnvironmentVariable] + :param settings: The settings to set in this container. The setting file + path can be fetched from environment variable "Fabric_SettingPath". The + path for Windows container is "C:\\\\secrets". The path for Linux + container is "/var/secrets". + :type settings: list[~azure.servicefabric.models.Setting] + :param labels: The labels to set in this container. + :type labels: list[~azure.servicefabric.models.ContainerLabel] + :param endpoints: The endpoints exposed by this container. + :type endpoints: list[~azure.servicefabric.models.EndpointProperties] + :param resources: Required. The resources required by this container. + :type resources: ~azure.servicefabric.models.ResourceRequirements + :param volume_refs: Volumes to be attached to the container. The lifetime + of these volumes is independent of the application's lifetime. + :type volume_refs: list[~azure.servicefabric.models.VolumeReference] + :param volumes: Volumes to be attached to the container. The lifetime of + these volumes is scoped to the application's lifetime. + :type volumes: list[~azure.servicefabric.models.ApplicationScopedVolume] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :param reliable_collections_refs: A list of ReliableCollection resources + used by this particular code package. Please refer to + ReliableCollectionsRef for more details. + :type reliable_collections_refs: + list[~azure.servicefabric.models.ReliableCollectionsRef] + :ivar instance_view: Runtime information of a container instance. + :vartype instance_view: ~azure.servicefabric.models.ContainerInstanceView + :param liveness_probe: An array of liveness probes for a code package. It + determines when to restart a code package. + :type liveness_probe: list[~azure.servicefabric.models.Probe] + :param readiness_probe: An array of readiness probes for a code package. + It determines when to unpublish an endpoint. + :type readiness_probe: list[~azure.servicefabric.models.Probe] + """ + + _validation = { + 'name': {'required': True}, + 'image': {'required': True}, + 'resources': {'required': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'image': {'key': 'image', 'type': 'str'}, + 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, + 'entry_point': {'key': 'entryPoint', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[str]'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'}, + 'settings': {'key': 'settings', 'type': '[Setting]'}, + 'labels': {'key': 'labels', 'type': '[ContainerLabel]'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointProperties]'}, + 'resources': {'key': 'resources', 'type': 'ResourceRequirements'}, + 'volume_refs': {'key': 'volumeRefs', 'type': '[VolumeReference]'}, + 'volumes': {'key': 'volumes', 'type': '[ApplicationScopedVolume]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + 'reliable_collections_refs': {'key': 'reliableCollectionsRefs', 'type': '[ReliableCollectionsRef]'}, + 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, + 'liveness_probe': {'key': 'livenessProbe', 'type': '[Probe]'}, + 'readiness_probe': {'key': 'readinessProbe', 'type': '[Probe]'}, + } + + def __init__(self, *, name: str, image: str, resources, image_registry_credential=None, entry_point: str=None, commands=None, environment_variables=None, settings=None, labels=None, endpoints=None, volume_refs=None, volumes=None, diagnostics=None, reliable_collections_refs=None, liveness_probe=None, readiness_probe=None, **kwargs) -> None: + super(ContainerCodePackageProperties, self).__init__(**kwargs) + self.name = name + self.image = image + self.image_registry_credential = image_registry_credential + self.entry_point = entry_point + self.commands = commands + self.environment_variables = environment_variables + self.settings = settings + self.labels = labels + self.endpoints = endpoints + self.resources = resources + self.volume_refs = volume_refs + self.volumes = volumes + self.diagnostics = diagnostics + self.reliable_collections_refs = reliable_collections_refs + self.instance_view = None + self.liveness_probe = liveness_probe + self.readiness_probe = readiness_probe diff --git a/customSDK/servicefabric/models/container_event.py b/customSDK/servicefabric/models/container_event.py new file mode 100644 index 0000000..36bb437 --- /dev/null +++ b/customSDK/servicefabric/models/container_event.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class ContainerEvent(Model): + """A container event. + + :param name: The name of the container event. + :type name: str + :param count: The count of the event. + :type count: int + :param first_timestamp: Date/time of the first event. + :type first_timestamp: str + :param last_timestamp: Date/time of the last event. + :type last_timestamp: str + :param message: The event message + :type message: str + :param type: The event type. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, + 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerEvent, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', None) + self.first_timestamp = kwargs.get('first_timestamp', None) + self.last_timestamp = kwargs.get('last_timestamp', None) + self.message = kwargs.get('message', None) + self.type = kwargs.get('type', None) diff --git a/customSDK/servicefabric/models/container_event_py3.py b/customSDK/servicefabric/models/container_event_py3.py new file mode 100644 index 0000000..4851036 --- /dev/null +++ b/customSDK/servicefabric/models/container_event_py3.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class ContainerEvent(Model): + """A container event. + + :param name: The name of the container event. + :type name: str + :param count: The count of the event. + :type count: int + :param first_timestamp: Date/time of the first event. + :type first_timestamp: str + :param last_timestamp: Date/time of the last event. + :type last_timestamp: str + :param message: The event message + :type message: str + :param type: The event type. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, + 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, count: int=None, first_timestamp: str=None, last_timestamp: str=None, message: str=None, type: str=None, **kwargs) -> None: + super(ContainerEvent, self).__init__(**kwargs) + self.name = name + self.count = count + self.first_timestamp = first_timestamp + self.last_timestamp = last_timestamp + self.message = message + self.type = type diff --git a/customSDK/servicefabric/models/container_instance_event.py b/customSDK/servicefabric/models/container_instance_event.py new file mode 100644 index 0000000..1796cec --- /dev/null +++ b/customSDK/servicefabric/models/container_instance_event.py @@ -0,0 +1,50 @@ +# 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 .fabric_event import FabricEvent + + +class ContainerInstanceEvent(FabricEvent): + """Represents the base for all Container Events. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerInstanceEvent, self).__init__(**kwargs) + self.kind = 'ContainerInstanceEvent' diff --git a/customSDK/servicefabric/models/container_instance_event_py3.py b/customSDK/servicefabric/models/container_instance_event_py3.py new file mode 100644 index 0000000..82e227c --- /dev/null +++ b/customSDK/servicefabric/models/container_instance_event_py3.py @@ -0,0 +1,50 @@ +# 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 .fabric_event_py3 import FabricEvent + + +class ContainerInstanceEvent(FabricEvent): + """Represents the base for all Container Events. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ContainerInstanceEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ContainerInstanceEvent' diff --git a/customSDK/servicefabric/models/container_instance_view.py b/customSDK/servicefabric/models/container_instance_view.py new file mode 100644 index 0000000..74d0408 --- /dev/null +++ b/customSDK/servicefabric/models/container_instance_view.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class ContainerInstanceView(Model): + """Runtime information of a container instance. + + :param restart_count: The number of times the container has been + restarted. + :type restart_count: int + :param current_state: Current container instance state. + :type current_state: ~azure.servicefabric.models.ContainerState + :param previous_state: Previous container instance state. + :type previous_state: ~azure.servicefabric.models.ContainerState + :param events: The events of this container instance. + :type events: list[~azure.servicefabric.models.ContainerEvent] + """ + + _attribute_map = { + 'restart_count': {'key': 'restartCount', 'type': 'int'}, + 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, + 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, + 'events': {'key': 'events', 'type': '[ContainerEvent]'}, + } + + def __init__(self, **kwargs): + super(ContainerInstanceView, self).__init__(**kwargs) + self.restart_count = kwargs.get('restart_count', None) + self.current_state = kwargs.get('current_state', None) + self.previous_state = kwargs.get('previous_state', None) + self.events = kwargs.get('events', None) diff --git a/customSDK/servicefabric/models/container_instance_view_py3.py b/customSDK/servicefabric/models/container_instance_view_py3.py new file mode 100644 index 0000000..2f14ce0 --- /dev/null +++ b/customSDK/servicefabric/models/container_instance_view_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class ContainerInstanceView(Model): + """Runtime information of a container instance. + + :param restart_count: The number of times the container has been + restarted. + :type restart_count: int + :param current_state: Current container instance state. + :type current_state: ~azure.servicefabric.models.ContainerState + :param previous_state: Previous container instance state. + :type previous_state: ~azure.servicefabric.models.ContainerState + :param events: The events of this container instance. + :type events: list[~azure.servicefabric.models.ContainerEvent] + """ + + _attribute_map = { + 'restart_count': {'key': 'restartCount', 'type': 'int'}, + 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, + 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, + 'events': {'key': 'events', 'type': '[ContainerEvent]'}, + } + + def __init__(self, *, restart_count: int=None, current_state=None, previous_state=None, events=None, **kwargs) -> None: + super(ContainerInstanceView, self).__init__(**kwargs) + self.restart_count = restart_count + self.current_state = current_state + self.previous_state = previous_state + self.events = events diff --git a/customSDK/servicefabric/models/container_label.py b/customSDK/servicefabric/models/container_label.py new file mode 100644 index 0000000..f474f14 --- /dev/null +++ b/customSDK/servicefabric/models/container_label.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class ContainerLabel(Model): + """Describes a container label. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the container label. + :type name: str + :param value: Required. The value of the container label. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerLabel, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/container_label_py3.py b/customSDK/servicefabric/models/container_label_py3.py new file mode 100644 index 0000000..1183263 --- /dev/null +++ b/customSDK/servicefabric/models/container_label_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class ContainerLabel(Model): + """Describes a container label. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the container label. + :type name: str + :param value: Required. The value of the container label. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(ContainerLabel, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/customSDK/servicefabric/aio/__init__.py b/customSDK/servicefabric/models/container_logs.py similarity index 55% rename from customSDK/servicefabric/aio/__init__.py rename to customSDK/servicefabric/models/container_logs.py index c1e087e..d7c5ca9 100644 --- a/customSDK/servicefabric/aio/__init__.py +++ b/customSDK/servicefabric/models/container_logs.py @@ -9,5 +9,20 @@ # regenerated. # -------------------------------------------------------------------------- -from ._service_fabric_client_ap_is_async import ServiceFabricClientAPIs -__all__ = ['ServiceFabricClientAPIs'] +from msrest.serialization import Model + + +class ContainerLogs(Model): + """Container logs. + + :param content: Container logs. + :type content: str + """ + + _attribute_map = { + 'content': {'key': 'Content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerLogs, self).__init__(**kwargs) + self.content = kwargs.get('content', None) diff --git a/customSDK/servicefabric/models/container_logs_py3.py b/customSDK/servicefabric/models/container_logs_py3.py new file mode 100644 index 0000000..0290440 --- /dev/null +++ b/customSDK/servicefabric/models/container_logs_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class ContainerLogs(Model): + """Container logs. + + :param content: Container logs. + :type content: str + """ + + _attribute_map = { + 'content': {'key': 'Content', 'type': 'str'}, + } + + def __init__(self, *, content: str=None, **kwargs) -> None: + super(ContainerLogs, self).__init__(**kwargs) + self.content = content diff --git a/customSDK/servicefabric/models/container_state.py b/customSDK/servicefabric/models/container_state.py new file mode 100644 index 0000000..3e2c2bf --- /dev/null +++ b/customSDK/servicefabric/models/container_state.py @@ -0,0 +1,44 @@ +# 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 msrest.serialization import Model + + +class ContainerState(Model): + """The container state. + + :param state: The state of this container + :type state: str + :param start_time: Date/time when the container state started. + :type start_time: datetime + :param exit_code: The container exit code. + :type exit_code: str + :param finish_time: Date/time when the container state finished. + :type finish_time: datetime + :param detail_status: Human-readable status of this state. + :type detail_status: str + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'exit_code': {'key': 'exitCode', 'type': 'str'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'detail_status': {'key': 'detailStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerState, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.start_time = kwargs.get('start_time', None) + self.exit_code = kwargs.get('exit_code', None) + self.finish_time = kwargs.get('finish_time', None) + self.detail_status = kwargs.get('detail_status', None) diff --git a/customSDK/servicefabric/models/container_state_py3.py b/customSDK/servicefabric/models/container_state_py3.py new file mode 100644 index 0000000..eb2f519 --- /dev/null +++ b/customSDK/servicefabric/models/container_state_py3.py @@ -0,0 +1,44 @@ +# 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 msrest.serialization import Model + + +class ContainerState(Model): + """The container state. + + :param state: The state of this container + :type state: str + :param start_time: Date/time when the container state started. + :type start_time: datetime + :param exit_code: The container exit code. + :type exit_code: str + :param finish_time: Date/time when the container state finished. + :type finish_time: datetime + :param detail_status: Human-readable status of this state. + :type detail_status: str + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'exit_code': {'key': 'exitCode', 'type': 'str'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'detail_status': {'key': 'detailStatus', 'type': 'str'}, + } + + def __init__(self, *, state: str=None, start_time=None, exit_code: str=None, finish_time=None, detail_status: str=None, **kwargs) -> None: + super(ContainerState, self).__init__(**kwargs) + self.state = state + self.start_time = start_time + self.exit_code = exit_code + self.finish_time = finish_time + self.detail_status = detail_status diff --git a/customSDK/servicefabric/models/create_compose_deployment_description.py b/customSDK/servicefabric/models/create_compose_deployment_description.py new file mode 100644 index 0000000..dea010e --- /dev/null +++ b/customSDK/servicefabric/models/create_compose_deployment_description.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class CreateComposeDeploymentDescription(Model): + """Defines description for creating a Service Fabric compose deployment. + + All required parameters must be populated in order to send to Azure. + + :param deployment_name: Required. The name of the deployment. + :type deployment_name: str + :param compose_file_content: Required. The content of the compose file + that describes the deployment to create. + :type compose_file_content: str + :param registry_credential: Credential information to connect to container + registry. + :type registry_credential: ~azure.servicefabric.models.RegistryCredential + """ + + _validation = { + 'deployment_name': {'required': True}, + 'compose_file_content': {'required': True}, + } + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, + 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, + } + + def __init__(self, **kwargs): + super(CreateComposeDeploymentDescription, self).__init__(**kwargs) + self.deployment_name = kwargs.get('deployment_name', None) + self.compose_file_content = kwargs.get('compose_file_content', None) + self.registry_credential = kwargs.get('registry_credential', None) diff --git a/customSDK/servicefabric/models/create_compose_deployment_description_py3.py b/customSDK/servicefabric/models/create_compose_deployment_description_py3.py new file mode 100644 index 0000000..8a8f115 --- /dev/null +++ b/customSDK/servicefabric/models/create_compose_deployment_description_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class CreateComposeDeploymentDescription(Model): + """Defines description for creating a Service Fabric compose deployment. + + All required parameters must be populated in order to send to Azure. + + :param deployment_name: Required. The name of the deployment. + :type deployment_name: str + :param compose_file_content: Required. The content of the compose file + that describes the deployment to create. + :type compose_file_content: str + :param registry_credential: Credential information to connect to container + registry. + :type registry_credential: ~azure.servicefabric.models.RegistryCredential + """ + + _validation = { + 'deployment_name': {'required': True}, + 'compose_file_content': {'required': True}, + } + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, + 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, + } + + def __init__(self, *, deployment_name: str, compose_file_content: str, registry_credential=None, **kwargs) -> None: + super(CreateComposeDeploymentDescription, self).__init__(**kwargs) + self.deployment_name = deployment_name + self.compose_file_content = compose_file_content + self.registry_credential = registry_credential diff --git a/customSDK/servicefabric/models/current_upgrade_domain_progress_info.py b/customSDK/servicefabric/models/current_upgrade_domain_progress_info.py new file mode 100644 index 0000000..5ebe6d4 --- /dev/null +++ b/customSDK/servicefabric/models/current_upgrade_domain_progress_info.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class CurrentUpgradeDomainProgressInfo(Model): + """Information about the current in-progress upgrade domain. + + :param domain_name: The name of the upgrade domain + :type domain_name: str + :param node_upgrade_progress_list: List of upgrading nodes and their + statuses + :type node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__(self, **kwargs): + super(CurrentUpgradeDomainProgressInfo, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) diff --git a/customSDK/servicefabric/models/current_upgrade_domain_progress_info_py3.py b/customSDK/servicefabric/models/current_upgrade_domain_progress_info_py3.py new file mode 100644 index 0000000..66b961d --- /dev/null +++ b/customSDK/servicefabric/models/current_upgrade_domain_progress_info_py3.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class CurrentUpgradeDomainProgressInfo(Model): + """Information about the current in-progress upgrade domain. + + :param domain_name: The name of the upgrade domain + :type domain_name: str + :param node_upgrade_progress_list: List of upgrading nodes and their + statuses + :type node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: + super(CurrentUpgradeDomainProgressInfo, self).__init__(**kwargs) + self.domain_name = domain_name + self.node_upgrade_progress_list = node_upgrade_progress_list diff --git a/customSDK/servicefabric/models/deactivation_intent_description.py b/customSDK/servicefabric/models/deactivation_intent_description.py new file mode 100644 index 0000000..28dab1f --- /dev/null +++ b/customSDK/servicefabric/models/deactivation_intent_description.py @@ -0,0 +1,31 @@ +# 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 msrest.serialization import Model + + +class DeactivationIntentDescription(Model): + """Describes the intent or reason for deactivating the node. + + :param deactivation_intent: Describes the intent or reason for + deactivating the node. The possible values are following. Possible values + include: 'Pause', 'Restart', 'RemoveData' + :type deactivation_intent: str or + ~azure.servicefabric.models.DeactivationIntent + """ + + _attribute_map = { + 'deactivation_intent': {'key': 'DeactivationIntent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeactivationIntentDescription, self).__init__(**kwargs) + self.deactivation_intent = kwargs.get('deactivation_intent', None) diff --git a/customSDK/servicefabric/models/deactivation_intent_description_py3.py b/customSDK/servicefabric/models/deactivation_intent_description_py3.py new file mode 100644 index 0000000..b538427 --- /dev/null +++ b/customSDK/servicefabric/models/deactivation_intent_description_py3.py @@ -0,0 +1,31 @@ +# 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 msrest.serialization import Model + + +class DeactivationIntentDescription(Model): + """Describes the intent or reason for deactivating the node. + + :param deactivation_intent: Describes the intent or reason for + deactivating the node. The possible values are following. Possible values + include: 'Pause', 'Restart', 'RemoveData' + :type deactivation_intent: str or + ~azure.servicefabric.models.DeactivationIntent + """ + + _attribute_map = { + 'deactivation_intent': {'key': 'DeactivationIntent', 'type': 'str'}, + } + + def __init__(self, *, deactivation_intent=None, **kwargs) -> None: + super(DeactivationIntentDescription, self).__init__(**kwargs) + self.deactivation_intent = deactivation_intent diff --git a/customSDK/servicefabric/models/default_execution_policy.py b/customSDK/servicefabric/models/default_execution_policy.py new file mode 100644 index 0000000..2e6aa01 --- /dev/null +++ b/customSDK/servicefabric/models/default_execution_policy.py @@ -0,0 +1,34 @@ +# 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 .execution_policy import ExecutionPolicy + + +class DefaultExecutionPolicy(ExecutionPolicy): + """The default execution policy. Always restart the service if an exit occurs. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DefaultExecutionPolicy, self).__init__(**kwargs) + self.type = 'Default' diff --git a/customSDK/servicefabric/models/default_execution_policy_py3.py b/customSDK/servicefabric/models/default_execution_policy_py3.py new file mode 100644 index 0000000..bf278f5 --- /dev/null +++ b/customSDK/servicefabric/models/default_execution_policy_py3.py @@ -0,0 +1,34 @@ +# 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 .execution_policy_py3 import ExecutionPolicy + + +class DefaultExecutionPolicy(ExecutionPolicy): + """The default execution policy. Always restart the service if an exit occurs. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DefaultExecutionPolicy, self).__init__(**kwargs) + self.type = 'Default' diff --git a/customSDK/servicefabric/models/delete_property_batch_operation.py b/customSDK/servicefabric/models/delete_property_batch_operation.py new file mode 100644 index 0000000..f41dda1 --- /dev/null +++ b/customSDK/servicefabric/models/delete_property_batch_operation.py @@ -0,0 +1,41 @@ +# 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 .property_batch_operation import PropertyBatchOperation + + +class DeletePropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that deletes a specified property if it + exists. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletePropertyBatchOperation, self).__init__(**kwargs) + self.kind = 'Delete' diff --git a/customSDK/servicefabric/models/delete_property_batch_operation_py3.py b/customSDK/servicefabric/models/delete_property_batch_operation_py3.py new file mode 100644 index 0000000..28cdf2c --- /dev/null +++ b/customSDK/servicefabric/models/delete_property_batch_operation_py3.py @@ -0,0 +1,41 @@ +# 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 .property_batch_operation_py3 import PropertyBatchOperation + + +class DeletePropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that deletes a specified property if it + exists. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + def __init__(self, *, property_name: str, **kwargs) -> None: + super(DeletePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.kind = 'Delete' diff --git a/customSDK/servicefabric/models/delta_nodes_check_health_evaluation.py b/customSDK/servicefabric/models/delta_nodes_check_health_evaluation.py new file mode 100644 index 0000000..a619a7e --- /dev/null +++ b/customSDK/servicefabric/models/delta_nodes_check_health_evaluation.py @@ -0,0 +1,75 @@ +# 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 .health_evaluation import HealthEvaluation + + +class DeltaNodesCheckHealthEvaluation(HealthEvaluation): + """Represents health evaluation for delta nodes, containing health evaluations + for each unhealthy node that impacted current aggregated health state. + Can be returned during cluster upgrade when the aggregated health state of + the cluster is Warning or Error. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param baseline_error_count: Number of nodes with aggregated heath state + Error in the health store at the beginning of the cluster upgrade. + :type baseline_error_count: long + :param baseline_total_count: Total number of nodes in the health store at + the beginning of the cluster upgrade. + :type baseline_total_count: long + :param max_percent_delta_unhealthy_nodes: Maximum allowed percentage of + delta unhealthy nodes from the ClusterUpgradeHealthPolicy. + :type max_percent_delta_unhealthy_nodes: int + :param total_count: Total number of nodes in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. + Includes all the unhealthy NodeHealthEvaluation that impacted the + aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, + 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(DeltaNodesCheckHealthEvaluation, self).__init__(**kwargs) + self.baseline_error_count = kwargs.get('baseline_error_count', None) + self.baseline_total_count = kwargs.get('baseline_total_count', None) + self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'DeltaNodesCheck' diff --git a/customSDK/servicefabric/models/delta_nodes_check_health_evaluation_py3.py b/customSDK/servicefabric/models/delta_nodes_check_health_evaluation_py3.py new file mode 100644 index 0000000..7bbbc05 --- /dev/null +++ b/customSDK/servicefabric/models/delta_nodes_check_health_evaluation_py3.py @@ -0,0 +1,75 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class DeltaNodesCheckHealthEvaluation(HealthEvaluation): + """Represents health evaluation for delta nodes, containing health evaluations + for each unhealthy node that impacted current aggregated health state. + Can be returned during cluster upgrade when the aggregated health state of + the cluster is Warning or Error. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param baseline_error_count: Number of nodes with aggregated heath state + Error in the health store at the beginning of the cluster upgrade. + :type baseline_error_count: long + :param baseline_total_count: Total number of nodes in the health store at + the beginning of the cluster upgrade. + :type baseline_total_count: long + :param max_percent_delta_unhealthy_nodes: Maximum allowed percentage of + delta unhealthy nodes from the ClusterUpgradeHealthPolicy. + :type max_percent_delta_unhealthy_nodes: int + :param total_count: Total number of nodes in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. + Includes all the unhealthy NodeHealthEvaluation that impacted the + aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, + 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, baseline_error_count: int=None, baseline_total_count: int=None, max_percent_delta_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(DeltaNodesCheckHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.baseline_error_count = baseline_error_count + self.baseline_total_count = baseline_total_count + self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'DeltaNodesCheck' diff --git a/customSDK/servicefabric/models/deploy_service_package_to_node_description.py b/customSDK/servicefabric/models/deploy_service_package_to_node_description.py new file mode 100644 index 0000000..82050e1 --- /dev/null +++ b/customSDK/servicefabric/models/deploy_service_package_to_node_description.py @@ -0,0 +1,58 @@ +# 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 msrest.serialization import Model + + +class DeployServicePackageToNodeDescription(Model): + """Defines description for downloading packages associated with a service + manifest to image cache on a Service Fabric node. + + All required parameters must be populated in order to send to Azure. + + :param service_manifest_name: Required. The name of service manifest whose + packages need to be downloaded. + :type service_manifest_name: str + :param application_type_name: Required. The application type name as + defined in the application manifest. + :type application_type_name: str + :param application_type_version: Required. The version of the application + type as defined in the application manifest. + :type application_type_version: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param package_sharing_policy: List of package sharing policy information. + :type package_sharing_policy: + list[~azure.servicefabric.models.PackageSharingPolicyInfo] + """ + + _validation = { + 'service_manifest_name': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'node_name': {'required': True}, + } + + _attribute_map = { + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'package_sharing_policy': {'key': 'PackageSharingPolicy', 'type': '[PackageSharingPolicyInfo]'}, + } + + def __init__(self, **kwargs): + super(DeployServicePackageToNodeDescription, self).__init__(**kwargs) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.application_type_name = kwargs.get('application_type_name', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.node_name = kwargs.get('node_name', None) + self.package_sharing_policy = kwargs.get('package_sharing_policy', None) diff --git a/customSDK/servicefabric/models/deploy_service_package_to_node_description_py3.py b/customSDK/servicefabric/models/deploy_service_package_to_node_description_py3.py new file mode 100644 index 0000000..0b2e623 --- /dev/null +++ b/customSDK/servicefabric/models/deploy_service_package_to_node_description_py3.py @@ -0,0 +1,58 @@ +# 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 msrest.serialization import Model + + +class DeployServicePackageToNodeDescription(Model): + """Defines description for downloading packages associated with a service + manifest to image cache on a Service Fabric node. + + All required parameters must be populated in order to send to Azure. + + :param service_manifest_name: Required. The name of service manifest whose + packages need to be downloaded. + :type service_manifest_name: str + :param application_type_name: Required. The application type name as + defined in the application manifest. + :type application_type_name: str + :param application_type_version: Required. The version of the application + type as defined in the application manifest. + :type application_type_version: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param package_sharing_policy: List of package sharing policy information. + :type package_sharing_policy: + list[~azure.servicefabric.models.PackageSharingPolicyInfo] + """ + + _validation = { + 'service_manifest_name': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'node_name': {'required': True}, + } + + _attribute_map = { + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'package_sharing_policy': {'key': 'PackageSharingPolicy', 'type': '[PackageSharingPolicyInfo]'}, + } + + def __init__(self, *, service_manifest_name: str, application_type_name: str, application_type_version: str, node_name: str, package_sharing_policy=None, **kwargs) -> None: + super(DeployServicePackageToNodeDescription, self).__init__(**kwargs) + self.service_manifest_name = service_manifest_name + self.application_type_name = application_type_name + self.application_type_version = application_type_version + self.node_name = node_name + self.package_sharing_policy = package_sharing_policy diff --git a/customSDK/servicefabric/models/deployed_application_health.py b/customSDK/servicefabric/models/deployed_application_health.py new file mode 100644 index 0000000..a76e0fb --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health.py @@ -0,0 +1,62 @@ +# 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 .entity_health import EntityHealth + + +class DeployedApplicationHealth(EntityHealth): + """Information about the health of an application deployed on a Service Fabric + node. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param name: Name of the application deployed on the node whose health + information is described by this object. + :type name: str + :param node_name: Name of the node where this application is deployed. + :type node_name: str + :param deployed_service_package_health_states: Deployed service package + health states for the current deployed application as found in the health + store. + :type deployed_service_package_health_states: + list[~azure.servicefabric.models.DeployedServicePackageHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'deployed_service_package_health_states': {'key': 'DeployedServicePackageHealthStates', 'type': '[DeployedServicePackageHealthState]'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationHealth, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.node_name = kwargs.get('node_name', None) + self.deployed_service_package_health_states = kwargs.get('deployed_service_package_health_states', None) diff --git a/customSDK/servicefabric/models/deployed_application_health_evaluation.py b/customSDK/servicefabric/models/deployed_application_health_evaluation.py new file mode 100644 index 0000000..ea06a32 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_evaluation.py @@ -0,0 +1,64 @@ +# 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 .health_evaluation import HealthEvaluation + + +class DeployedApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a deployed application, containing + information about the data and the algorithm used by the health store to + evaluate health. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Name of the node where the application is deployed to. + :type node_name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the deployed application. + The types of the unhealthy evaluations can be + DeployedServicePackagesHealthEvaluation or EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationHealthEvaluation, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.application_name = kwargs.get('application_name', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'DeployedApplication' diff --git a/customSDK/servicefabric/models/deployed_application_health_evaluation_py3.py b/customSDK/servicefabric/models/deployed_application_health_evaluation_py3.py new file mode 100644 index 0000000..2cade0c --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_evaluation_py3.py @@ -0,0 +1,64 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class DeployedApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a deployed application, containing + information about the data and the algorithm used by the health store to + evaluate health. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Name of the node where the application is deployed to. + :type node_name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the deployed application. + The types of the unhealthy evaluations can be + DeployedServicePackagesHealthEvaluation or EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, node_name: str=None, application_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: + super(DeployedApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.node_name = node_name + self.application_name = application_name + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'DeployedApplication' diff --git a/customSDK/servicefabric/models/deployed_application_health_py3.py b/customSDK/servicefabric/models/deployed_application_health_py3.py new file mode 100644 index 0000000..fe011b3 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_py3.py @@ -0,0 +1,62 @@ +# 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 .entity_health_py3 import EntityHealth + + +class DeployedApplicationHealth(EntityHealth): + """Information about the health of an application deployed on a Service Fabric + node. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param name: Name of the application deployed on the node whose health + information is described by this object. + :type name: str + :param node_name: Name of the node where this application is deployed. + :type node_name: str + :param deployed_service_package_health_states: Deployed service package + health states for the current deployed application as found in the health + store. + :type deployed_service_package_health_states: + list[~azure.servicefabric.models.DeployedServicePackageHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'deployed_service_package_health_states': {'key': 'DeployedServicePackageHealthStates', 'type': '[DeployedServicePackageHealthState]'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, node_name: str=None, deployed_service_package_health_states=None, **kwargs) -> None: + super(DeployedApplicationHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.name = name + self.node_name = node_name + self.deployed_service_package_health_states = deployed_service_package_health_states diff --git a/customSDK/servicefabric/models/deployed_application_health_report_expired_event.py b/customSDK/servicefabric/models/deployed_application_health_report_expired_event.py new file mode 100644 index 0000000..5646f2d --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_report_expired_event.py @@ -0,0 +1,111 @@ +# 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 .application_event import ApplicationEvent + + +class DeployedApplicationHealthReportExpiredEvent(ApplicationEvent): + """Deployed Application Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_instance_id: Required. Id of Application instance. + :type application_instance_id: long + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationHealthReportExpiredEvent, self).__init__(**kwargs) + self.application_instance_id = kwargs.get('application_instance_id', None) + self.node_name = kwargs.get('node_name', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'DeployedApplicationHealthReportExpired' diff --git a/customSDK/servicefabric/models/deployed_application_health_report_expired_event_py3.py b/customSDK/servicefabric/models/deployed_application_health_report_expired_event_py3.py new file mode 100644 index 0000000..29489b6 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_report_expired_event_py3.py @@ -0,0 +1,111 @@ +# 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 .application_event_py3 import ApplicationEvent + + +class DeployedApplicationHealthReportExpiredEvent(ApplicationEvent): + """Deployed Application Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_instance_id: Required. Id of Application instance. + :type application_instance_id: long + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(DeployedApplicationHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_instance_id = application_instance_id + self.node_name = node_name + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'DeployedApplicationHealthReportExpired' diff --git a/customSDK/servicefabric/models/deployed_application_health_state.py b/customSDK/servicefabric/models/deployed_application_health_state.py new file mode 100644 index 0000000..6098de8 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_state.py @@ -0,0 +1,42 @@ +# 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 .entity_health_state import EntityHealthState + + +class DeployedApplicationHealthState(EntityHealthState): + """Represents the health state of a deployed application, which contains the + entity identifier and the aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param node_name: Name of the node on which the service package is + deployed. + :type node_name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationHealthState, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.application_name = kwargs.get('application_name', None) diff --git a/customSDK/servicefabric/models/deployed_application_health_state_chunk.py b/customSDK/servicefabric/models/deployed_application_health_state_chunk.py new file mode 100644 index 0000000..cc46bad --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_state_chunk.py @@ -0,0 +1,43 @@ +# 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 .entity_health_state_chunk import EntityHealthStateChunk + + +class DeployedApplicationHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a deployed application, which contains + the node where the application is deployed, the aggregated health state and + any deployed service packages that respect the chunk query description + filters. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of node where the application is deployed. + :type node_name: str + :param deployed_service_package_health_state_chunks: The list of deployed + service package health state chunks belonging to the deployed application + that respect the filters in the cluster health chunk query description. + :type deployed_service_package_health_state_chunks: + ~azure.servicefabric.models.DeployedServicePackageHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'deployed_service_package_health_state_chunks': {'key': 'DeployedServicePackageHealthStateChunks', 'type': 'DeployedServicePackageHealthStateChunkList'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationHealthStateChunk, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.deployed_service_package_health_state_chunks = kwargs.get('deployed_service_package_health_state_chunks', None) diff --git a/customSDK/servicefabric/models/deployed_application_health_state_chunk_list.py b/customSDK/servicefabric/models/deployed_application_health_state_chunk_list.py new file mode 100644 index 0000000..81b2792 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_state_chunk_list.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class DeployedApplicationHealthStateChunkList(Model): + """The list of deployed application health state chunks that respect the input + filters in the chunk query. Returned by get cluster health state chunks + query. + + :param items: The list of deployed application health state chunks that + respect the input filters in the chunk query. + :type items: + list[~azure.servicefabric.models.DeployedApplicationHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[DeployedApplicationHealthStateChunk]'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/deployed_application_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/deployed_application_health_state_chunk_list_py3.py new file mode 100644 index 0000000..74d8f23 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_state_chunk_list_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class DeployedApplicationHealthStateChunkList(Model): + """The list of deployed application health state chunks that respect the input + filters in the chunk query. Returned by get cluster health state chunks + query. + + :param items: The list of deployed application health state chunks that + respect the input filters in the chunk query. + :type items: + list[~azure.servicefabric.models.DeployedApplicationHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[DeployedApplicationHealthStateChunk]'}, + } + + def __init__(self, *, items=None, **kwargs) -> None: + super(DeployedApplicationHealthStateChunkList, self).__init__(**kwargs) + self.items = items diff --git a/customSDK/servicefabric/models/deployed_application_health_state_chunk_py3.py b/customSDK/servicefabric/models/deployed_application_health_state_chunk_py3.py new file mode 100644 index 0000000..e242b86 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_state_chunk_py3.py @@ -0,0 +1,43 @@ +# 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 .entity_health_state_chunk_py3 import EntityHealthStateChunk + + +class DeployedApplicationHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a deployed application, which contains + the node where the application is deployed, the aggregated health state and + any deployed service packages that respect the chunk query description + filters. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of node where the application is deployed. + :type node_name: str + :param deployed_service_package_health_state_chunks: The list of deployed + service package health state chunks belonging to the deployed application + that respect the filters in the cluster health chunk query description. + :type deployed_service_package_health_state_chunks: + ~azure.servicefabric.models.DeployedServicePackageHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'deployed_service_package_health_state_chunks': {'key': 'DeployedServicePackageHealthStateChunks', 'type': 'DeployedServicePackageHealthStateChunkList'}, + } + + def __init__(self, *, health_state=None, node_name: str=None, deployed_service_package_health_state_chunks=None, **kwargs) -> None: + super(DeployedApplicationHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.node_name = node_name + self.deployed_service_package_health_state_chunks = deployed_service_package_health_state_chunks diff --git a/customSDK/servicefabric/models/deployed_application_health_state_filter.py b/customSDK/servicefabric/models/deployed_application_health_state_filter.py new file mode 100644 index 0000000..00453b4 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_state_filter.py @@ -0,0 +1,90 @@ +# 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 msrest.serialization import Model + + +class DeployedApplicationHealthStateFilter(Model): + """Defines matching criteria to determine whether a deployed application + should be included as a child of an application in the cluster health + chunk. + The deployed applications are only returned if the parent application + matches a filter specified in the cluster health chunk query description. + One filter can match zero, one or multiple deployed applications, depending + on its properties. + + :param node_name_filter: The name of the node where the application is + deployed in order to match the filter. + If specified, the filter is applied only to the application deployed on + the specified node. + If the application is not deployed on the node with the specified name, no + deployed application is returned in the cluster health chunk based on this + filter. + Otherwise, the deployed application is included in the cluster health + chunk if it respects the other filter properties. + If not specified, all deployed applications that match the parent filters + (if any) are taken into consideration and matched against the other filter + members, like health state filter. + :type node_name_filter: str + :param health_state_filter: The filter for the health state of the + deployed applications. It allows selecting deployed applications if they + match the desired health states. + The possible values are integer value of one of the following health + states. Only deployed applications that match the filter are returned. All + deployed applications are used to evaluate the cluster aggregated health + state. + If not specified, default value is None, unless the node name is + specified. If the filter has default value and node name is specified, the + matching deployed application is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches deployed applications + with HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + :param deployed_service_package_filters: Defines a list of filters that + specify which deployed service packages to be included in the returned + cluster health chunk as children of the parent deployed application. The + deployed service packages are returned only if the parent deployed + application matches a filter. + If the list is empty, no deployed service packages are returned. All the + deployed service packages are used to evaluate the parent deployed + application aggregated health state, regardless of the input filters. + The deployed application filter may specify multiple deployed service + package filters. + For example, it can specify a filter to return all deployed service + packages with health state Error and another filter to always include a + deployed service package on a node. + :type deployed_service_package_filters: + list[~azure.servicefabric.models.DeployedServicePackageHealthStateFilter] + """ + + _attribute_map = { + 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'deployed_service_package_filters': {'key': 'DeployedServicePackageFilters', 'type': '[DeployedServicePackageHealthStateFilter]'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationHealthStateFilter, self).__init__(**kwargs) + self.node_name_filter = kwargs.get('node_name_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) + self.deployed_service_package_filters = kwargs.get('deployed_service_package_filters', None) diff --git a/customSDK/servicefabric/models/deployed_application_health_state_filter_py3.py b/customSDK/servicefabric/models/deployed_application_health_state_filter_py3.py new file mode 100644 index 0000000..4ced80a --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_state_filter_py3.py @@ -0,0 +1,90 @@ +# 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 msrest.serialization import Model + + +class DeployedApplicationHealthStateFilter(Model): + """Defines matching criteria to determine whether a deployed application + should be included as a child of an application in the cluster health + chunk. + The deployed applications are only returned if the parent application + matches a filter specified in the cluster health chunk query description. + One filter can match zero, one or multiple deployed applications, depending + on its properties. + + :param node_name_filter: The name of the node where the application is + deployed in order to match the filter. + If specified, the filter is applied only to the application deployed on + the specified node. + If the application is not deployed on the node with the specified name, no + deployed application is returned in the cluster health chunk based on this + filter. + Otherwise, the deployed application is included in the cluster health + chunk if it respects the other filter properties. + If not specified, all deployed applications that match the parent filters + (if any) are taken into consideration and matched against the other filter + members, like health state filter. + :type node_name_filter: str + :param health_state_filter: The filter for the health state of the + deployed applications. It allows selecting deployed applications if they + match the desired health states. + The possible values are integer value of one of the following health + states. Only deployed applications that match the filter are returned. All + deployed applications are used to evaluate the cluster aggregated health + state. + If not specified, default value is None, unless the node name is + specified. If the filter has default value and node name is specified, the + matching deployed application is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches deployed applications + with HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + :param deployed_service_package_filters: Defines a list of filters that + specify which deployed service packages to be included in the returned + cluster health chunk as children of the parent deployed application. The + deployed service packages are returned only if the parent deployed + application matches a filter. + If the list is empty, no deployed service packages are returned. All the + deployed service packages are used to evaluate the parent deployed + application aggregated health state, regardless of the input filters. + The deployed application filter may specify multiple deployed service + package filters. + For example, it can specify a filter to return all deployed service + packages with health state Error and another filter to always include a + deployed service package on a node. + :type deployed_service_package_filters: + list[~azure.servicefabric.models.DeployedServicePackageHealthStateFilter] + """ + + _attribute_map = { + 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'deployed_service_package_filters': {'key': 'DeployedServicePackageFilters', 'type': '[DeployedServicePackageHealthStateFilter]'}, + } + + def __init__(self, *, node_name_filter: str=None, health_state_filter: int=0, deployed_service_package_filters=None, **kwargs) -> None: + super(DeployedApplicationHealthStateFilter, self).__init__(**kwargs) + self.node_name_filter = node_name_filter + self.health_state_filter = health_state_filter + self.deployed_service_package_filters = deployed_service_package_filters diff --git a/customSDK/servicefabric/models/deployed_application_health_state_py3.py b/customSDK/servicefabric/models/deployed_application_health_state_py3.py new file mode 100644 index 0000000..370cf23 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_state_py3.py @@ -0,0 +1,42 @@ +# 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 .entity_health_state_py3 import EntityHealthState + + +class DeployedApplicationHealthState(EntityHealthState): + """Represents the health state of a deployed application, which contains the + entity identifier and the aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param node_name: Name of the node on which the service package is + deployed. + :type node_name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, node_name: str=None, application_name: str=None, **kwargs) -> None: + super(DeployedApplicationHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.node_name = node_name + self.application_name = application_name diff --git a/customSDK/servicefabric/models/deployed_application_info.py b/customSDK/servicefabric/models/deployed_application_info.py new file mode 100644 index 0000000..231f1a4 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_info.py @@ -0,0 +1,72 @@ +# 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 msrest.serialization import Model + + +class DeployedApplicationInfo(Model): + """Information about application deployed on the node. + + :param id: The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to + identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type id: str + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + :param type_name: The application type name as defined in the application + manifest. + :type type_name: str + :param status: The status of the application deployed on the node. + Following are the possible values. Possible values include: 'Invalid', + 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating' + :type status: str or ~azure.servicefabric.models.DeployedApplicationStatus + :param work_directory: The work directory of the application on the node. + The work directory can be used to store application data. + :type work_directory: str + :param log_directory: The log directory of the application on the node. + The log directory can be used to store application logs. + :type log_directory: str + :param temp_directory: The temp directory of the application on the node. + The code packages belonging to the application are forked with this + directory set as their temporary directory. + :type temp_directory: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'work_directory': {'key': 'WorkDirectory', 'type': 'str'}, + 'log_directory': {'key': 'LogDirectory', 'type': 'str'}, + 'temp_directory': {'key': 'TempDirectory', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_name = kwargs.get('type_name', None) + self.status = kwargs.get('status', None) + self.work_directory = kwargs.get('work_directory', None) + self.log_directory = kwargs.get('log_directory', None) + self.temp_directory = kwargs.get('temp_directory', None) + self.health_state = kwargs.get('health_state', None) diff --git a/customSDK/servicefabric/models/deployed_application_info_py3.py b/customSDK/servicefabric/models/deployed_application_info_py3.py new file mode 100644 index 0000000..e6d4b82 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_info_py3.py @@ -0,0 +1,72 @@ +# 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 msrest.serialization import Model + + +class DeployedApplicationInfo(Model): + """Information about application deployed on the node. + + :param id: The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to + identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type id: str + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + :param type_name: The application type name as defined in the application + manifest. + :type type_name: str + :param status: The status of the application deployed on the node. + Following are the possible values. Possible values include: 'Invalid', + 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating' + :type status: str or ~azure.servicefabric.models.DeployedApplicationStatus + :param work_directory: The work directory of the application on the node. + The work directory can be used to store application data. + :type work_directory: str + :param log_directory: The log directory of the application on the node. + The log directory can be used to store application logs. + :type log_directory: str + :param temp_directory: The temp directory of the application on the node. + The code packages belonging to the application are forked with this + directory set as their temporary directory. + :type temp_directory: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'work_directory': {'key': 'WorkDirectory', 'type': 'str'}, + 'log_directory': {'key': 'LogDirectory', 'type': 'str'}, + 'temp_directory': {'key': 'TempDirectory', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, type_name: str=None, status=None, work_directory: str=None, log_directory: str=None, temp_directory: str=None, health_state=None, **kwargs) -> None: + super(DeployedApplicationInfo, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_name = type_name + self.status = status + self.work_directory = work_directory + self.log_directory = log_directory + self.temp_directory = temp_directory + self.health_state = health_state diff --git a/customSDK/servicefabric/models/deployed_application_new_health_report_event.py b/customSDK/servicefabric/models/deployed_application_new_health_report_event.py new file mode 100644 index 0000000..297abe1 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_new_health_report_event.py @@ -0,0 +1,111 @@ +# 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 .application_event import ApplicationEvent + + +class DeployedApplicationNewHealthReportEvent(ApplicationEvent): + """Deployed Application Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_instance_id: Required. Id of Application instance. + :type application_instance_id: long + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationNewHealthReportEvent, self).__init__(**kwargs) + self.application_instance_id = kwargs.get('application_instance_id', None) + self.node_name = kwargs.get('node_name', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'DeployedApplicationNewHealthReport' diff --git a/customSDK/servicefabric/models/deployed_application_new_health_report_event_py3.py b/customSDK/servicefabric/models/deployed_application_new_health_report_event_py3.py new file mode 100644 index 0000000..7f83785 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_new_health_report_event_py3.py @@ -0,0 +1,111 @@ +# 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 .application_event_py3 import ApplicationEvent + + +class DeployedApplicationNewHealthReportEvent(ApplicationEvent): + """Deployed Application Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_instance_id: Required. Id of Application instance. + :type application_instance_id: long + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(DeployedApplicationNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_instance_id = application_instance_id + self.node_name = node_name + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'DeployedApplicationNewHealthReport' diff --git a/customSDK/servicefabric/models/deployed_applications_health_evaluation.py b/customSDK/servicefabric/models/deployed_applications_health_evaluation.py new file mode 100644 index 0000000..6d3f773 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_applications_health_evaluation.py @@ -0,0 +1,67 @@ +# 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 .health_evaluation import HealthEvaluation + + +class DeployedApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed applications, containing health + evaluations for each unhealthy deployed application that impacted current + aggregated health state. + Can be returned when evaluating application health and the aggregated + health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_deployed_applications: Maximum allowed + percentage of unhealthy deployed applications from the + ApplicationHealthPolicy. + :type max_percent_unhealthy_deployed_applications: int + :param total_count: Total number of deployed applications of the + application in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + DeployedApplicationHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationsHealthEvaluation, self).__init__(**kwargs) + self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'DeployedApplications' diff --git a/customSDK/servicefabric/models/deployed_applications_health_evaluation_py3.py b/customSDK/servicefabric/models/deployed_applications_health_evaluation_py3.py new file mode 100644 index 0000000..cb907db --- /dev/null +++ b/customSDK/servicefabric/models/deployed_applications_health_evaluation_py3.py @@ -0,0 +1,67 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class DeployedApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed applications, containing health + evaluations for each unhealthy deployed application that impacted current + aggregated health state. + Can be returned when evaluating application health and the aggregated + health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_deployed_applications: Maximum allowed + percentage of unhealthy deployed applications from the + ApplicationHealthPolicy. + :type max_percent_unhealthy_deployed_applications: int + :param total_count: Total number of deployed applications of the + application in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + DeployedApplicationHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_deployed_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(DeployedApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'DeployedApplications' diff --git a/customSDK/servicefabric/models/deployed_code_package_info.py b/customSDK/servicefabric/models/deployed_code_package_info.py new file mode 100644 index 0000000..0e4cdad --- /dev/null +++ b/customSDK/servicefabric/models/deployed_code_package_info.py @@ -0,0 +1,84 @@ +# 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 msrest.serialization import Model + + +class DeployedCodePackageInfo(Model): + """Information about code package deployed on a Service Fabric node. + + :param name: The name of the code package. + :type name: str + :param version: The version of the code package specified in service + manifest. + :type version: str + :param service_manifest_name: The name of service manifest that specified + this code package. + :type service_manifest_name: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param host_type: Specifies the type of host for main entry point of a + code package as specified in service manifest. Possible values include: + 'Invalid', 'ExeHost', 'ContainerHost' + :type host_type: str or ~azure.servicefabric.models.HostType + :param host_isolation_mode: Specifies the isolation mode of main entry + point of a code package when it's host type is ContainerHost. This is + specified as part of container host policies in application manifest while + importing service manifest. Possible values include: 'None', 'Process', + 'HyperV' + :type host_isolation_mode: str or + ~azure.servicefabric.models.HostIsolationMode + :param status: Specifies the status of a deployed application or service + package on a Service Fabric node. Possible values include: 'Invalid', + 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating', + 'RanToCompletion', 'Failed' + :type status: str or ~azure.servicefabric.models.DeploymentStatus + :param run_frequency_interval: The interval at which code package is run. + This is used for periodic code package. + :type run_frequency_interval: str + :param setup_entry_point: Information about setup or main entry point of a + code package deployed on a Service Fabric node. + :type setup_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint + :param main_entry_point: Information about setup or main entry point of a + code package deployed on a Service Fabric node. + :type main_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_type': {'key': 'HostType', 'type': 'str'}, + 'host_isolation_mode': {'key': 'HostIsolationMode', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'run_frequency_interval': {'key': 'RunFrequencyInterval', 'type': 'str'}, + 'setup_entry_point': {'key': 'SetupEntryPoint', 'type': 'CodePackageEntryPoint'}, + 'main_entry_point': {'key': 'MainEntryPoint', 'type': 'CodePackageEntryPoint'}, + } + + def __init__(self, **kwargs): + super(DeployedCodePackageInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.host_type = kwargs.get('host_type', None) + self.host_isolation_mode = kwargs.get('host_isolation_mode', None) + self.status = kwargs.get('status', None) + self.run_frequency_interval = kwargs.get('run_frequency_interval', None) + self.setup_entry_point = kwargs.get('setup_entry_point', None) + self.main_entry_point = kwargs.get('main_entry_point', None) diff --git a/customSDK/servicefabric/models/deployed_code_package_info_py3.py b/customSDK/servicefabric/models/deployed_code_package_info_py3.py new file mode 100644 index 0000000..8e4ef67 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_code_package_info_py3.py @@ -0,0 +1,84 @@ +# 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 msrest.serialization import Model + + +class DeployedCodePackageInfo(Model): + """Information about code package deployed on a Service Fabric node. + + :param name: The name of the code package. + :type name: str + :param version: The version of the code package specified in service + manifest. + :type version: str + :param service_manifest_name: The name of service manifest that specified + this code package. + :type service_manifest_name: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param host_type: Specifies the type of host for main entry point of a + code package as specified in service manifest. Possible values include: + 'Invalid', 'ExeHost', 'ContainerHost' + :type host_type: str or ~azure.servicefabric.models.HostType + :param host_isolation_mode: Specifies the isolation mode of main entry + point of a code package when it's host type is ContainerHost. This is + specified as part of container host policies in application manifest while + importing service manifest. Possible values include: 'None', 'Process', + 'HyperV' + :type host_isolation_mode: str or + ~azure.servicefabric.models.HostIsolationMode + :param status: Specifies the status of a deployed application or service + package on a Service Fabric node. Possible values include: 'Invalid', + 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating', + 'RanToCompletion', 'Failed' + :type status: str or ~azure.servicefabric.models.DeploymentStatus + :param run_frequency_interval: The interval at which code package is run. + This is used for periodic code package. + :type run_frequency_interval: str + :param setup_entry_point: Information about setup or main entry point of a + code package deployed on a Service Fabric node. + :type setup_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint + :param main_entry_point: Information about setup or main entry point of a + code package deployed on a Service Fabric node. + :type main_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_type': {'key': 'HostType', 'type': 'str'}, + 'host_isolation_mode': {'key': 'HostIsolationMode', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'run_frequency_interval': {'key': 'RunFrequencyInterval', 'type': 'str'}, + 'setup_entry_point': {'key': 'SetupEntryPoint', 'type': 'CodePackageEntryPoint'}, + 'main_entry_point': {'key': 'MainEntryPoint', 'type': 'CodePackageEntryPoint'}, + } + + def __init__(self, *, name: str=None, version: str=None, service_manifest_name: str=None, service_package_activation_id: str=None, host_type=None, host_isolation_mode=None, status=None, run_frequency_interval: str=None, setup_entry_point=None, main_entry_point=None, **kwargs) -> None: + super(DeployedCodePackageInfo, self).__init__(**kwargs) + self.name = name + self.version = version + self.service_manifest_name = service_manifest_name + self.service_package_activation_id = service_package_activation_id + self.host_type = host_type + self.host_isolation_mode = host_isolation_mode + self.status = status + self.run_frequency_interval = run_frequency_interval + self.setup_entry_point = setup_entry_point + self.main_entry_point = main_entry_point diff --git a/customSDK/servicefabric/models/deployed_service_package_health.py b/customSDK/servicefabric/models/deployed_service_package_health.py new file mode 100644 index 0000000..e45f95d --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health.py @@ -0,0 +1,59 @@ +# 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 .entity_health import EntityHealth + + +class DeployedServicePackageHealth(EntityHealth): + """Information about the health of a service package for a specific + application deployed on a Service Fabric node. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_manifest_name: Name of the service manifest. + :type service_manifest_name: str + :param node_name: Name of the node where this service package is deployed. + :type node_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageHealth, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.node_name = kwargs.get('node_name', None) diff --git a/customSDK/servicefabric/models/deployed_service_package_health_evaluation.py b/customSDK/servicefabric/models/deployed_service_package_health_evaluation.py new file mode 100644 index 0000000..3af5f8b --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_evaluation.py @@ -0,0 +1,68 @@ +# 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 .health_evaluation import HealthEvaluation + + +class DeployedServicePackageHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a deployed service package, containing + information about the data and the algorithm used by health store to + evaluate health. The evaluation is returned only when the aggregated health + state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_manifest_name: The name of the service manifest. + :type service_manifest_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state. The type of the unhealthy evaluations + can be EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageHealthEvaluation, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.application_name = kwargs.get('application_name', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'DeployedServicePackage' diff --git a/customSDK/servicefabric/models/deployed_service_package_health_evaluation_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_evaluation_py3.py new file mode 100644 index 0000000..6450f7d --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_evaluation_py3.py @@ -0,0 +1,68 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class DeployedServicePackageHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a deployed service package, containing + information about the data and the algorithm used by health store to + evaluate health. The evaluation is returned only when the aggregated health + state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_manifest_name: The name of the service manifest. + :type service_manifest_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state. The type of the unhealthy evaluations + can be EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, node_name: str=None, application_name: str=None, service_manifest_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: + super(DeployedServicePackageHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.node_name = node_name + self.application_name = application_name + self.service_manifest_name = service_manifest_name + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'DeployedServicePackage' diff --git a/customSDK/servicefabric/models/deployed_service_package_health_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_py3.py new file mode 100644 index 0000000..5c6a180 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_py3.py @@ -0,0 +1,59 @@ +# 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 .entity_health_py3 import EntityHealth + + +class DeployedServicePackageHealth(EntityHealth): + """Information about the health of a service package for a specific + application deployed on a Service Fabric node. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_manifest_name: Name of the service manifest. + :type service_manifest_name: str + :param node_name: Name of the node where this service package is deployed. + :type node_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, application_name: str=None, service_manifest_name: str=None, node_name: str=None, **kwargs) -> None: + super(DeployedServicePackageHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.application_name = application_name + self.service_manifest_name = service_manifest_name + self.node_name = node_name diff --git a/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event.py b/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event.py new file mode 100644 index 0000000..b8af144 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event.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 .application_event import ApplicationEvent + + +class DeployedServicePackageHealthReportExpiredEvent(ApplicationEvent): + """Deployed Service Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param service_manifest: Required. Service manifest name. + :type service_manifest: str + :param service_package_instance_id: Required. Id of Service package + instance. + :type service_package_instance_id: long + :param service_package_activation_id: Required. Id of Service package + activation. + :type service_package_activation_id: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'service_manifest': {'required': True}, + 'service_package_instance_id': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_manifest': {'key': 'ServiceManifest', 'type': 'str'}, + 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageHealthReportExpiredEvent, self).__init__(**kwargs) + self.service_manifest = kwargs.get('service_manifest', None) + self.service_package_instance_id = kwargs.get('service_package_instance_id', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.node_name = kwargs.get('node_name', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'DeployedServicePackageHealthReportExpired' diff --git a/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event_py3.py new file mode 100644 index 0000000..28e8f9d --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event_py3.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 .application_event_py3 import ApplicationEvent + + +class DeployedServicePackageHealthReportExpiredEvent(ApplicationEvent): + """Deployed Service Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param service_manifest: Required. Service manifest name. + :type service_manifest: str + :param service_package_instance_id: Required. Id of Service package + instance. + :type service_package_instance_id: long + :param service_package_activation_id: Required. Id of Service package + activation. + :type service_package_activation_id: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'service_manifest': {'required': True}, + 'service_package_instance_id': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_manifest': {'key': 'ServiceManifest', 'type': 'str'}, + 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_manifest: str, service_package_instance_id: int, service_package_activation_id: str, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(DeployedServicePackageHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.service_manifest = service_manifest + self.service_package_instance_id = service_package_instance_id + self.service_package_activation_id = service_package_activation_id + self.node_name = node_name + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'DeployedServicePackageHealthReportExpired' diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state.py b/customSDK/servicefabric/models/deployed_service_package_health_state.py new file mode 100644 index 0000000..e9e6271 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_state.py @@ -0,0 +1,56 @@ +# 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 .entity_health_state import EntityHealthState + + +class DeployedServicePackageHealthState(EntityHealthState): + """Represents the health state of a deployed service package, containing the + entity identifier and the aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param node_name: Name of the node on which the service package is + deployed. + :type node_name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_manifest_name: Name of the manifest describing the service + package. + :type service_manifest_name: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageHealthState, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.application_name = kwargs.get('application_name', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_chunk.py b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk.py new file mode 100644 index 0000000..0bbf966 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk.py @@ -0,0 +1,44 @@ +# 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 .entity_health_state_chunk import EntityHealthStateChunk + + +class DeployedServicePackageHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a deployed service package, which + contains the service manifest name and the service package aggregated + health state. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_manifest_name: The name of the service manifest. + :type service_manifest_name: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageHealthStateChunk, self).__init__(**kwargs) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list.py b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list.py new file mode 100644 index 0000000..5b453e4 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class DeployedServicePackageHealthStateChunkList(Model): + """The list of deployed service package health state chunks that respect the + input filters in the chunk query. Returned by get cluster health state + chunks query. + + :param items: The list of deployed service package health state chunks + that respect the input filters in the chunk query. + :type items: + list[~azure.servicefabric.models.DeployedServicePackageHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[DeployedServicePackageHealthStateChunk]'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list_py3.py new file mode 100644 index 0000000..fe435a6 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class DeployedServicePackageHealthStateChunkList(Model): + """The list of deployed service package health state chunks that respect the + input filters in the chunk query. Returned by get cluster health state + chunks query. + + :param items: The list of deployed service package health state chunks + that respect the input filters in the chunk query. + :type items: + list[~azure.servicefabric.models.DeployedServicePackageHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[DeployedServicePackageHealthStateChunk]'}, + } + + def __init__(self, *, items=None, **kwargs) -> None: + super(DeployedServicePackageHealthStateChunkList, self).__init__(**kwargs) + self.items = items diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_py3.py new file mode 100644 index 0000000..1911d40 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_py3.py @@ -0,0 +1,44 @@ +# 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 .entity_health_state_chunk_py3 import EntityHealthStateChunk + + +class DeployedServicePackageHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a deployed service package, which + contains the service manifest name and the service package aggregated + health state. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_manifest_name: The name of the service manifest. + :type service_manifest_name: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, *, health_state=None, service_manifest_name: str=None, service_package_activation_id: str=None, **kwargs) -> None: + super(DeployedServicePackageHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.service_manifest_name = service_manifest_name + self.service_package_activation_id = service_package_activation_id diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_filter.py b/customSDK/servicefabric/models/deployed_service_package_health_state_filter.py new file mode 100644 index 0000000..5dc2269 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_state_filter.py @@ -0,0 +1,84 @@ +# 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 msrest.serialization import Model + + +class DeployedServicePackageHealthStateFilter(Model): + """Defines matching criteria to determine whether a deployed service package + should be included as a child of a deployed application in the cluster + health chunk. + The deployed service packages are only returned if the parent entities + match a filter specified in the cluster health chunk query description. The + parent deployed application and its parent application must be included in + the cluster health chunk. + One filter can match zero, one or multiple deployed service packages, + depending on its properties. + + :param service_manifest_name_filter: The name of the service manifest + which identifies the deployed service packages that matches the filter. + If specified, the filter is applied only to the specified deployed service + packages, if any. + If no deployed service packages with specified manifest name exist, + nothing is returned in the cluster health chunk based on this filter. + If any deployed service package exists, they are included in the cluster + health chunk if it respects the other filter properties. + If not specified, all deployed service packages that match the parent + filters (if any) are taken into consideration and matched against the + other filter members, like health state filter. + :type service_manifest_name_filter: str + :param service_package_activation_id_filter: The activation ID of a + deployed service package that matches the filter. + If not specified, the filter applies to all deployed service packages that + match the other parameters. + If specified, the filter matches only the deployed service package with + the specified activation ID. + :type service_package_activation_id_filter: str + :param health_state_filter: The filter for the health state of the + deployed service packages. It allows selecting deployed service packages + if they match the desired health states. + The possible values are integer value of one of the following health + states. Only deployed service packages that match the filter are returned. + All deployed service packages are used to evaluate the parent deployed + application aggregated health state. + If not specified, default value is None, unless the deployed service + package ID is specified. If the filter has default value and deployed + service package ID is specified, the matching deployed service package is + returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches deployed service + packages with HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + """ + + _attribute_map = { + 'service_manifest_name_filter': {'key': 'ServiceManifestNameFilter', 'type': 'str'}, + 'service_package_activation_id_filter': {'key': 'ServicePackageActivationIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageHealthStateFilter, self).__init__(**kwargs) + self.service_manifest_name_filter = kwargs.get('service_manifest_name_filter', None) + self.service_package_activation_id_filter = kwargs.get('service_package_activation_id_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_filter_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_state_filter_py3.py new file mode 100644 index 0000000..a4af676 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_state_filter_py3.py @@ -0,0 +1,84 @@ +# 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 msrest.serialization import Model + + +class DeployedServicePackageHealthStateFilter(Model): + """Defines matching criteria to determine whether a deployed service package + should be included as a child of a deployed application in the cluster + health chunk. + The deployed service packages are only returned if the parent entities + match a filter specified in the cluster health chunk query description. The + parent deployed application and its parent application must be included in + the cluster health chunk. + One filter can match zero, one or multiple deployed service packages, + depending on its properties. + + :param service_manifest_name_filter: The name of the service manifest + which identifies the deployed service packages that matches the filter. + If specified, the filter is applied only to the specified deployed service + packages, if any. + If no deployed service packages with specified manifest name exist, + nothing is returned in the cluster health chunk based on this filter. + If any deployed service package exists, they are included in the cluster + health chunk if it respects the other filter properties. + If not specified, all deployed service packages that match the parent + filters (if any) are taken into consideration and matched against the + other filter members, like health state filter. + :type service_manifest_name_filter: str + :param service_package_activation_id_filter: The activation ID of a + deployed service package that matches the filter. + If not specified, the filter applies to all deployed service packages that + match the other parameters. + If specified, the filter matches only the deployed service package with + the specified activation ID. + :type service_package_activation_id_filter: str + :param health_state_filter: The filter for the health state of the + deployed service packages. It allows selecting deployed service packages + if they match the desired health states. + The possible values are integer value of one of the following health + states. Only deployed service packages that match the filter are returned. + All deployed service packages are used to evaluate the parent deployed + application aggregated health state. + If not specified, default value is None, unless the deployed service + package ID is specified. If the filter has default value and deployed + service package ID is specified, the matching deployed service package is + returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches deployed service + packages with HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + """ + + _attribute_map = { + 'service_manifest_name_filter': {'key': 'ServiceManifestNameFilter', 'type': 'str'}, + 'service_package_activation_id_filter': {'key': 'ServicePackageActivationIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__(self, *, service_manifest_name_filter: str=None, service_package_activation_id_filter: str=None, health_state_filter: int=0, **kwargs) -> None: + super(DeployedServicePackageHealthStateFilter, self).__init__(**kwargs) + self.service_manifest_name_filter = service_manifest_name_filter + self.service_package_activation_id_filter = service_package_activation_id_filter + self.health_state_filter = health_state_filter diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_state_py3.py new file mode 100644 index 0000000..365b0c4 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_state_py3.py @@ -0,0 +1,56 @@ +# 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 .entity_health_state_py3 import EntityHealthState + + +class DeployedServicePackageHealthState(EntityHealthState): + """Represents the health state of a deployed service package, containing the + entity identifier and the aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param node_name: Name of the node on which the service package is + deployed. + :type node_name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_manifest_name: Name of the manifest describing the service + package. + :type service_manifest_name: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, node_name: str=None, application_name: str=None, service_manifest_name: str=None, service_package_activation_id: str=None, **kwargs) -> None: + super(DeployedServicePackageHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.node_name = node_name + self.application_name = application_name + self.service_manifest_name = service_manifest_name + self.service_package_activation_id = service_package_activation_id diff --git a/customSDK/servicefabric/models/deployed_service_package_info.py b/customSDK/servicefabric/models/deployed_service_package_info.py new file mode 100644 index 0000000..0feff70 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_info.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class DeployedServicePackageInfo(Model): + """Information about service package deployed on a Service Fabric node. + + :param name: The name of the service package as specified in the service + manifest. + :type name: str + :param version: The version of the service package specified in service + manifest. + :type version: str + :param status: Specifies the status of a deployed application or service + package on a Service Fabric node. Possible values include: 'Invalid', + 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating', + 'RanToCompletion', 'Failed' + :type status: str or ~azure.servicefabric.models.DeploymentStatus + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + self.status = kwargs.get('status', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) diff --git a/customSDK/servicefabric/models/deployed_service_package_info_py3.py b/customSDK/servicefabric/models/deployed_service_package_info_py3.py new file mode 100644 index 0000000..477a33a --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_info_py3.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class DeployedServicePackageInfo(Model): + """Information about service package deployed on a Service Fabric node. + + :param name: The name of the service package as specified in the service + manifest. + :type name: str + :param version: The version of the service package specified in service + manifest. + :type version: str + :param status: Specifies the status of a deployed application or service + package on a Service Fabric node. Possible values include: 'Invalid', + 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating', + 'RanToCompletion', 'Failed' + :type status: str or ~azure.servicefabric.models.DeploymentStatus + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, version: str=None, status=None, service_package_activation_id: str=None, **kwargs) -> None: + super(DeployedServicePackageInfo, self).__init__(**kwargs) + self.name = name + self.version = version + self.status = status + self.service_package_activation_id = service_package_activation_id diff --git a/customSDK/servicefabric/models/deployed_service_package_new_health_report_event.py b/customSDK/servicefabric/models/deployed_service_package_new_health_report_event.py new file mode 100644 index 0000000..7449788 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_new_health_report_event.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 .application_event import ApplicationEvent + + +class DeployedServicePackageNewHealthReportEvent(ApplicationEvent): + """Deployed Service Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param service_manifest_name: Required. Service manifest name. + :type service_manifest_name: str + :param service_package_instance_id: Required. Id of Service package + instance. + :type service_package_instance_id: long + :param service_package_activation_id: Required. Id of Service package + activation. + :type service_package_activation_id: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'service_manifest_name': {'required': True}, + 'service_package_instance_id': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageNewHealthReportEvent, self).__init__(**kwargs) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.service_package_instance_id = kwargs.get('service_package_instance_id', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.node_name = kwargs.get('node_name', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'DeployedServicePackageNewHealthReport' diff --git a/customSDK/servicefabric/models/deployed_service_package_new_health_report_event_py3.py b/customSDK/servicefabric/models/deployed_service_package_new_health_report_event_py3.py new file mode 100644 index 0000000..487a295 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_new_health_report_event_py3.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 .application_event_py3 import ApplicationEvent + + +class DeployedServicePackageNewHealthReportEvent(ApplicationEvent): + """Deployed Service Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param service_manifest_name: Required. Service manifest name. + :type service_manifest_name: str + :param service_package_instance_id: Required. Id of Service package + instance. + :type service_package_instance_id: long + :param service_package_activation_id: Required. Id of Service package + activation. + :type service_package_activation_id: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'service_manifest_name': {'required': True}, + 'service_package_instance_id': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_manifest_name: str, service_package_instance_id: int, service_package_activation_id: str, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(DeployedServicePackageNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.service_manifest_name = service_manifest_name + self.service_package_instance_id = service_package_instance_id + self.service_package_activation_id = service_package_activation_id + self.node_name = node_name + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'DeployedServicePackageNewHealthReport' diff --git a/customSDK/servicefabric/models/deployed_service_packages_health_evaluation.py b/customSDK/servicefabric/models/deployed_service_packages_health_evaluation.py new file mode 100644 index 0000000..2820b65 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_packages_health_evaluation.py @@ -0,0 +1,62 @@ +# 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 .health_evaluation import HealthEvaluation + + +class DeployedServicePackagesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed service packages, containing + health evaluations for each unhealthy deployed service package that + impacted current aggregated health state. Can be returned when evaluating + deployed application health and the aggregated health state is either Error + or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param total_count: Total number of deployed service packages of the + deployed application in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + DeployedServicePackageHealthEvaluation that impacted the aggregated + health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackagesHealthEvaluation, self).__init__(**kwargs) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'DeployedServicePackages' diff --git a/customSDK/servicefabric/models/deployed_service_packages_health_evaluation_py3.py b/customSDK/servicefabric/models/deployed_service_packages_health_evaluation_py3.py new file mode 100644 index 0000000..04c20ab --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_packages_health_evaluation_py3.py @@ -0,0 +1,62 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class DeployedServicePackagesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed service packages, containing + health evaluations for each unhealthy deployed service package that + impacted current aggregated health state. Can be returned when evaluating + deployed application health and the aggregated health state is either Error + or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param total_count: Total number of deployed service packages of the + deployed application in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + DeployedServicePackageHealthEvaluation that impacted the aggregated + health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(DeployedServicePackagesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'DeployedServicePackages' diff --git a/customSDK/servicefabric/models/deployed_service_replica_detail_info.py b/customSDK/servicefabric/models/deployed_service_replica_detail_info.py new file mode 100644 index 0000000..2d01b8a --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_replica_detail_info.py @@ -0,0 +1,73 @@ +# 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 msrest.serialization import Model + + +class DeployedServiceReplicaDetailInfo(Model): + """Information about a Service Fabric service replica deployed on a node. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeployedStatefulServiceReplicaDetailInfo, + DeployedStatelessServiceInstanceDetailInfo + + All required parameters must be populated in order to send to Azure. + + :param service_name: Full hierarchical name of the service in URI format + starting with `fabric:`. + :type service_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param current_service_operation: Specifies the current active life-cycle + operation on a stateful service replica or stateless service instance. + Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', + 'Abort' + :type current_service_operation: str or + ~azure.servicefabric.models.ServiceOperationName + :param current_service_operation_start_time_utc: The start time of the + current service operation in UTC format. + :type current_service_operation_start_time_utc: datetime + :param reported_load: List of load reported by replica. + :type reported_load: + list[~azure.servicefabric.models.LoadMetricReportInfo] + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaDetailInfo', 'Stateless': 'DeployedStatelessServiceInstanceDetailInfo'} + } + + def __init__(self, **kwargs): + super(DeployedServiceReplicaDetailInfo, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) + self.current_service_operation = kwargs.get('current_service_operation', None) + self.current_service_operation_start_time_utc = kwargs.get('current_service_operation_start_time_utc', None) + self.reported_load = kwargs.get('reported_load', None) + self.service_kind = None diff --git a/customSDK/servicefabric/models/deployed_service_replica_detail_info_py3.py b/customSDK/servicefabric/models/deployed_service_replica_detail_info_py3.py new file mode 100644 index 0000000..9e2b751 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_replica_detail_info_py3.py @@ -0,0 +1,73 @@ +# 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 msrest.serialization import Model + + +class DeployedServiceReplicaDetailInfo(Model): + """Information about a Service Fabric service replica deployed on a node. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeployedStatefulServiceReplicaDetailInfo, + DeployedStatelessServiceInstanceDetailInfo + + All required parameters must be populated in order to send to Azure. + + :param service_name: Full hierarchical name of the service in URI format + starting with `fabric:`. + :type service_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param current_service_operation: Specifies the current active life-cycle + operation on a stateful service replica or stateless service instance. + Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', + 'Abort' + :type current_service_operation: str or + ~azure.servicefabric.models.ServiceOperationName + :param current_service_operation_start_time_utc: The start time of the + current service operation in UTC format. + :type current_service_operation_start_time_utc: datetime + :param reported_load: List of load reported by replica. + :type reported_load: + list[~azure.servicefabric.models.LoadMetricReportInfo] + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaDetailInfo', 'Stateless': 'DeployedStatelessServiceInstanceDetailInfo'} + } + + def __init__(self, *, service_name: str=None, partition_id: str=None, current_service_operation=None, current_service_operation_start_time_utc=None, reported_load=None, **kwargs) -> None: + super(DeployedServiceReplicaDetailInfo, self).__init__(**kwargs) + self.service_name = service_name + self.partition_id = partition_id + self.current_service_operation = current_service_operation + self.current_service_operation_start_time_utc = current_service_operation_start_time_utc + self.reported_load = reported_load + self.service_kind = None diff --git a/customSDK/servicefabric/models/deployed_service_replica_info.py b/customSDK/servicefabric/models/deployed_service_replica_info.py new file mode 100644 index 0000000..0c521cc --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_replica_info.py @@ -0,0 +1,96 @@ +# 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 msrest.serialization import Model + + +class DeployedServiceReplicaInfo(Model): + """Information about a Service Fabric service replica deployed on a node. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeployedStatefulServiceReplicaInfo, + DeployedStatelessServiceInstanceInfo + + All required parameters must be populated in order to send to Azure. + + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param code_package_name: The name of the code package that hosts this + replica. + :type code_package_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param address: The last address returned by the replica in Open or + ChangeRole. + :type address: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param host_process_id: Host process ID of the process that is hosting the + replica. This will be zero if the replica is down. In hyper-v containers + this host process ID will be from different kernel. + :type host_process_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaInfo', 'Stateless': 'DeployedStatelessServiceInstanceInfo'} + } + + def __init__(self, **kwargs): + super(DeployedServiceReplicaInfo, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.service_type_name = kwargs.get('service_type_name', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.code_package_name = kwargs.get('code_package_name', None) + self.partition_id = kwargs.get('partition_id', None) + self.replica_status = kwargs.get('replica_status', None) + self.address = kwargs.get('address', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.host_process_id = kwargs.get('host_process_id', None) + self.service_kind = None diff --git a/customSDK/servicefabric/models/deployed_service_replica_info_py3.py b/customSDK/servicefabric/models/deployed_service_replica_info_py3.py new file mode 100644 index 0000000..7cec5b7 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_replica_info_py3.py @@ -0,0 +1,96 @@ +# 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 msrest.serialization import Model + + +class DeployedServiceReplicaInfo(Model): + """Information about a Service Fabric service replica deployed on a node. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeployedStatefulServiceReplicaInfo, + DeployedStatelessServiceInstanceInfo + + All required parameters must be populated in order to send to Azure. + + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param code_package_name: The name of the code package that hosts this + replica. + :type code_package_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param address: The last address returned by the replica in Open or + ChangeRole. + :type address: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param host_process_id: Host process ID of the process that is hosting the + replica. This will be zero if the replica is down. In hyper-v containers + this host process ID will be from different kernel. + :type host_process_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaInfo', 'Stateless': 'DeployedStatelessServiceInstanceInfo'} + } + + def __init__(self, *, service_name: str=None, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, partition_id: str=None, replica_status=None, address: str=None, service_package_activation_id: str=None, host_process_id: str=None, **kwargs) -> None: + super(DeployedServiceReplicaInfo, self).__init__(**kwargs) + self.service_name = service_name + self.service_type_name = service_type_name + self.service_manifest_name = service_manifest_name + self.code_package_name = code_package_name + self.partition_id = partition_id + self.replica_status = replica_status + self.address = address + self.service_package_activation_id = service_package_activation_id + self.host_process_id = host_process_id + self.service_kind = None diff --git a/customSDK/servicefabric/models/deployed_service_type_info.py b/customSDK/servicefabric/models/deployed_service_type_info.py new file mode 100644 index 0000000..f46f04c --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_type_info.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class DeployedServiceTypeInfo(Model): + """Information about service type deployed on a node, information such as the + status of the service type registration on a node. + + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param code_package_name: The name of the code package that registered the + service type. + :type code_package_name: str + :param status: The status of the service type registration on the node. + Possible values include: 'Invalid', 'Disabled', 'Enabled', 'Registered' + :type status: str or + ~azure.servicefabric.models.ServiceTypeRegistrationStatus + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + """ + + _attribute_map = { + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeployedServiceTypeInfo, self).__init__(**kwargs) + self.service_type_name = kwargs.get('service_type_name', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.code_package_name = kwargs.get('code_package_name', None) + self.status = kwargs.get('status', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) diff --git a/customSDK/servicefabric/models/deployed_service_type_info_py3.py b/customSDK/servicefabric/models/deployed_service_type_info_py3.py new file mode 100644 index 0000000..f749665 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_type_info_py3.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class DeployedServiceTypeInfo(Model): + """Information about service type deployed on a node, information such as the + status of the service type registration on a node. + + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param code_package_name: The name of the code package that registered the + service type. + :type code_package_name: str + :param status: The status of the service type registration on the node. + Possible values include: 'Invalid', 'Disabled', 'Enabled', 'Registered' + :type status: str or + ~azure.servicefabric.models.ServiceTypeRegistrationStatus + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + """ + + _attribute_map = { + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, *, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, status=None, service_package_activation_id: str=None, **kwargs) -> None: + super(DeployedServiceTypeInfo, self).__init__(**kwargs) + self.service_type_name = service_type_name + self.service_manifest_name = service_manifest_name + self.code_package_name = code_package_name + self.status = status + self.service_package_activation_id = service_package_activation_id diff --git a/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info.py b/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info.py new file mode 100644 index 0000000..03c6166 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info.py @@ -0,0 +1,114 @@ +# 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 .deployed_service_replica_detail_info import DeployedServiceReplicaDetailInfo + + +class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo): + """Information about a stateful replica running in a code package. Note + DeployedServiceReplicaQueryResult will contain duplicate data like + ServiceKind, ServiceName, PartitionId and replicaId. + + All required parameters must be populated in order to send to Azure. + + :param service_name: Full hierarchical name of the service in URI format + starting with `fabric:`. + :type service_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param current_service_operation: Specifies the current active life-cycle + operation on a stateful service replica or stateless service instance. + Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', + 'Abort' + :type current_service_operation: str or + ~azure.servicefabric.models.ServiceOperationName + :param current_service_operation_start_time_utc: The start time of the + current service operation in UTC format. + :type current_service_operation_start_time_utc: datetime + :param reported_load: List of load reported by replica. + :type reported_load: + list[~azure.servicefabric.models.LoadMetricReportInfo] + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + :param current_replicator_operation: Specifies the operation currently + being executed by the Replicator. Possible values include: 'Invalid', + 'None', 'Open', 'ChangeRole', 'UpdateEpoch', 'Close', 'Abort', + 'OnDataLoss', 'WaitForCatchup', 'Build' + :type current_replicator_operation: str or + ~azure.servicefabric.models.ReplicatorOperationName + :param read_status: Specifies the access status of the partition. Possible + values include: 'Invalid', 'Granted', 'ReconfigurationPending', + 'NotPrimary', 'NoWriteQuorum' + :type read_status: str or + ~azure.servicefabric.models.PartitionAccessStatus + :param write_status: Specifies the access status of the partition. + Possible values include: 'Invalid', 'Granted', 'ReconfigurationPending', + 'NotPrimary', 'NoWriteQuorum' + :type write_status: str or + ~azure.servicefabric.models.PartitionAccessStatus + :param replicator_status: Represents a base class for primary or secondary + replicator status. + Contains information about the service fabric replicator like the + replication/copy queue utilization, last acknowledgement received + timestamp, etc. + :type replicator_status: ~azure.servicefabric.models.ReplicatorStatus + :param replica_status: Key value store related information for the + replica. + :type replica_status: + ~azure.servicefabric.models.KeyValueStoreReplicaStatus + :param deployed_service_replica_query_result: Information about a stateful + service replica deployed on a node. + :type deployed_service_replica_query_result: + ~azure.servicefabric.models.DeployedStatefulServiceReplicaInfo + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'current_replicator_operation': {'key': 'CurrentReplicatorOperation', 'type': 'str'}, + 'read_status': {'key': 'ReadStatus', 'type': 'str'}, + 'write_status': {'key': 'WriteStatus', 'type': 'str'}, + 'replicator_status': {'key': 'ReplicatorStatus', 'type': 'ReplicatorStatus'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'KeyValueStoreReplicaStatus'}, + 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatefulServiceReplicaInfo'}, + } + + def __init__(self, **kwargs): + super(DeployedStatefulServiceReplicaDetailInfo, self).__init__(**kwargs) + self.replica_id = kwargs.get('replica_id', None) + self.current_replicator_operation = kwargs.get('current_replicator_operation', None) + self.read_status = kwargs.get('read_status', None) + self.write_status = kwargs.get('write_status', None) + self.replicator_status = kwargs.get('replicator_status', None) + self.replica_status = kwargs.get('replica_status', None) + self.deployed_service_replica_query_result = kwargs.get('deployed_service_replica_query_result', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info_py3.py b/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info_py3.py new file mode 100644 index 0000000..fe98aad --- /dev/null +++ b/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info_py3.py @@ -0,0 +1,114 @@ +# 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 .deployed_service_replica_detail_info_py3 import DeployedServiceReplicaDetailInfo + + +class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo): + """Information about a stateful replica running in a code package. Note + DeployedServiceReplicaQueryResult will contain duplicate data like + ServiceKind, ServiceName, PartitionId and replicaId. + + All required parameters must be populated in order to send to Azure. + + :param service_name: Full hierarchical name of the service in URI format + starting with `fabric:`. + :type service_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param current_service_operation: Specifies the current active life-cycle + operation on a stateful service replica or stateless service instance. + Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', + 'Abort' + :type current_service_operation: str or + ~azure.servicefabric.models.ServiceOperationName + :param current_service_operation_start_time_utc: The start time of the + current service operation in UTC format. + :type current_service_operation_start_time_utc: datetime + :param reported_load: List of load reported by replica. + :type reported_load: + list[~azure.servicefabric.models.LoadMetricReportInfo] + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + :param current_replicator_operation: Specifies the operation currently + being executed by the Replicator. Possible values include: 'Invalid', + 'None', 'Open', 'ChangeRole', 'UpdateEpoch', 'Close', 'Abort', + 'OnDataLoss', 'WaitForCatchup', 'Build' + :type current_replicator_operation: str or + ~azure.servicefabric.models.ReplicatorOperationName + :param read_status: Specifies the access status of the partition. Possible + values include: 'Invalid', 'Granted', 'ReconfigurationPending', + 'NotPrimary', 'NoWriteQuorum' + :type read_status: str or + ~azure.servicefabric.models.PartitionAccessStatus + :param write_status: Specifies the access status of the partition. + Possible values include: 'Invalid', 'Granted', 'ReconfigurationPending', + 'NotPrimary', 'NoWriteQuorum' + :type write_status: str or + ~azure.servicefabric.models.PartitionAccessStatus + :param replicator_status: Represents a base class for primary or secondary + replicator status. + Contains information about the service fabric replicator like the + replication/copy queue utilization, last acknowledgement received + timestamp, etc. + :type replicator_status: ~azure.servicefabric.models.ReplicatorStatus + :param replica_status: Key value store related information for the + replica. + :type replica_status: + ~azure.servicefabric.models.KeyValueStoreReplicaStatus + :param deployed_service_replica_query_result: Information about a stateful + service replica deployed on a node. + :type deployed_service_replica_query_result: + ~azure.servicefabric.models.DeployedStatefulServiceReplicaInfo + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'current_replicator_operation': {'key': 'CurrentReplicatorOperation', 'type': 'str'}, + 'read_status': {'key': 'ReadStatus', 'type': 'str'}, + 'write_status': {'key': 'WriteStatus', 'type': 'str'}, + 'replicator_status': {'key': 'ReplicatorStatus', 'type': 'ReplicatorStatus'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'KeyValueStoreReplicaStatus'}, + 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatefulServiceReplicaInfo'}, + } + + def __init__(self, *, service_name: str=None, partition_id: str=None, current_service_operation=None, current_service_operation_start_time_utc=None, reported_load=None, replica_id: str=None, current_replicator_operation=None, read_status=None, write_status=None, replicator_status=None, replica_status=None, deployed_service_replica_query_result=None, **kwargs) -> None: + super(DeployedStatefulServiceReplicaDetailInfo, self).__init__(service_name=service_name, partition_id=partition_id, current_service_operation=current_service_operation, current_service_operation_start_time_utc=current_service_operation_start_time_utc, reported_load=reported_load, **kwargs) + self.replica_id = replica_id + self.current_replicator_operation = current_replicator_operation + self.read_status = read_status + self.write_status = write_status + self.replicator_status = replicator_status + self.replica_status = replica_status + self.deployed_service_replica_query_result = deployed_service_replica_query_result + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/deployed_stateful_service_replica_info.py b/customSDK/servicefabric/models/deployed_stateful_service_replica_info.py new file mode 100644 index 0000000..f4e6340 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_stateful_service_replica_info.py @@ -0,0 +1,102 @@ +# 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 .deployed_service_replica_info import DeployedServiceReplicaInfo + + +class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): + """Information about a stateful service replica deployed on a node. + + All required parameters must be populated in order to send to Azure. + + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param code_package_name: The name of the code package that hosts this + replica. + :type code_package_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param address: The last address returned by the replica in Open or + ChangeRole. + :type address: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param host_process_id: Host process ID of the process that is hosting the + replica. This will be zero if the replica is down. In hyper-v containers + this host process ID will be from different kernel. + :type host_process_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + :param replica_role: The role of a replica of a stateful service. Possible + values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', + 'ActiveSecondary' + :type replica_role: str or ~azure.servicefabric.models.ReplicaRole + :param reconfiguration_information: Information about current + reconfiguration like phase, type, previous configuration role of replica + and reconfiguration start date time. + :type reconfiguration_information: + ~azure.servicefabric.models.ReconfigurationInformation + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, + 'reconfiguration_information': {'key': 'ReconfigurationInformation', 'type': 'ReconfigurationInformation'}, + } + + def __init__(self, **kwargs): + super(DeployedStatefulServiceReplicaInfo, self).__init__(**kwargs) + self.replica_id = kwargs.get('replica_id', None) + self.replica_role = kwargs.get('replica_role', None) + self.reconfiguration_information = kwargs.get('reconfiguration_information', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/deployed_stateful_service_replica_info_py3.py b/customSDK/servicefabric/models/deployed_stateful_service_replica_info_py3.py new file mode 100644 index 0000000..2d1b6ec --- /dev/null +++ b/customSDK/servicefabric/models/deployed_stateful_service_replica_info_py3.py @@ -0,0 +1,102 @@ +# 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 .deployed_service_replica_info_py3 import DeployedServiceReplicaInfo + + +class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): + """Information about a stateful service replica deployed on a node. + + All required parameters must be populated in order to send to Azure. + + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param code_package_name: The name of the code package that hosts this + replica. + :type code_package_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param address: The last address returned by the replica in Open or + ChangeRole. + :type address: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param host_process_id: Host process ID of the process that is hosting the + replica. This will be zero if the replica is down. In hyper-v containers + this host process ID will be from different kernel. + :type host_process_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + :param replica_role: The role of a replica of a stateful service. Possible + values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', + 'ActiveSecondary' + :type replica_role: str or ~azure.servicefabric.models.ReplicaRole + :param reconfiguration_information: Information about current + reconfiguration like phase, type, previous configuration role of replica + and reconfiguration start date time. + :type reconfiguration_information: + ~azure.servicefabric.models.ReconfigurationInformation + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, + 'reconfiguration_information': {'key': 'ReconfigurationInformation', 'type': 'ReconfigurationInformation'}, + } + + def __init__(self, *, service_name: str=None, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, partition_id: str=None, replica_status=None, address: str=None, service_package_activation_id: str=None, host_process_id: str=None, replica_id: str=None, replica_role=None, reconfiguration_information=None, **kwargs) -> None: + super(DeployedStatefulServiceReplicaInfo, self).__init__(service_name=service_name, service_type_name=service_type_name, service_manifest_name=service_manifest_name, code_package_name=code_package_name, partition_id=partition_id, replica_status=replica_status, address=address, service_package_activation_id=service_package_activation_id, host_process_id=host_process_id, **kwargs) + self.replica_id = replica_id + self.replica_role = replica_role + self.reconfiguration_information = reconfiguration_information + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info.py b/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info.py new file mode 100644 index 0000000..4f06117 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info.py @@ -0,0 +1,76 @@ +# 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 .deployed_service_replica_detail_info import DeployedServiceReplicaDetailInfo + + +class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInfo): + """Information about a stateless instance running in a code package. Note that + DeployedServiceReplicaQueryResult will contain duplicate data like + ServiceKind, ServiceName, PartitionId and InstanceId. + + All required parameters must be populated in order to send to Azure. + + :param service_name: Full hierarchical name of the service in URI format + starting with `fabric:`. + :type service_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param current_service_operation: Specifies the current active life-cycle + operation on a stateful service replica or stateless service instance. + Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', + 'Abort' + :type current_service_operation: str or + ~azure.servicefabric.models.ServiceOperationName + :param current_service_operation_start_time_utc: The start time of the + current service operation in UTC format. + :type current_service_operation_start_time_utc: datetime + :param reported_load: List of load reported by replica. + :type reported_load: + list[~azure.servicefabric.models.LoadMetricReportInfo] + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_id: Id of a stateless service instance. InstanceId is used + by Service Fabric to uniquely identify an instance of a partition of a + stateless service. It is unique within a partition and does not change for + the lifetime of the instance. If the instance has failed over on the same + or different node, it will get a different value for the InstanceId. + :type instance_id: str + :param deployed_service_replica_query_result: Information about a + stateless service instance deployed on a node. + :type deployed_service_replica_query_result: + ~azure.servicefabric.models.DeployedStatelessServiceInstanceInfo + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatelessServiceInstanceInfo'}, + } + + def __init__(self, **kwargs): + super(DeployedStatelessServiceInstanceDetailInfo, self).__init__(**kwargs) + self.instance_id = kwargs.get('instance_id', None) + self.deployed_service_replica_query_result = kwargs.get('deployed_service_replica_query_result', None) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info_py3.py b/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info_py3.py new file mode 100644 index 0000000..3bbb72b --- /dev/null +++ b/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info_py3.py @@ -0,0 +1,76 @@ +# 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 .deployed_service_replica_detail_info_py3 import DeployedServiceReplicaDetailInfo + + +class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInfo): + """Information about a stateless instance running in a code package. Note that + DeployedServiceReplicaQueryResult will contain duplicate data like + ServiceKind, ServiceName, PartitionId and InstanceId. + + All required parameters must be populated in order to send to Azure. + + :param service_name: Full hierarchical name of the service in URI format + starting with `fabric:`. + :type service_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param current_service_operation: Specifies the current active life-cycle + operation on a stateful service replica or stateless service instance. + Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', + 'Abort' + :type current_service_operation: str or + ~azure.servicefabric.models.ServiceOperationName + :param current_service_operation_start_time_utc: The start time of the + current service operation in UTC format. + :type current_service_operation_start_time_utc: datetime + :param reported_load: List of load reported by replica. + :type reported_load: + list[~azure.servicefabric.models.LoadMetricReportInfo] + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_id: Id of a stateless service instance. InstanceId is used + by Service Fabric to uniquely identify an instance of a partition of a + stateless service. It is unique within a partition and does not change for + the lifetime of the instance. If the instance has failed over on the same + or different node, it will get a different value for the InstanceId. + :type instance_id: str + :param deployed_service_replica_query_result: Information about a + stateless service instance deployed on a node. + :type deployed_service_replica_query_result: + ~azure.servicefabric.models.DeployedStatelessServiceInstanceInfo + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatelessServiceInstanceInfo'}, + } + + def __init__(self, *, service_name: str=None, partition_id: str=None, current_service_operation=None, current_service_operation_start_time_utc=None, reported_load=None, instance_id: str=None, deployed_service_replica_query_result=None, **kwargs) -> None: + super(DeployedStatelessServiceInstanceDetailInfo, self).__init__(service_name=service_name, partition_id=partition_id, current_service_operation=current_service_operation, current_service_operation_start_time_utc=current_service_operation_start_time_utc, reported_load=reported_load, **kwargs) + self.instance_id = instance_id + self.deployed_service_replica_query_result = deployed_service_replica_query_result + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/deployed_stateless_service_instance_info.py b/customSDK/servicefabric/models/deployed_stateless_service_instance_info.py new file mode 100644 index 0000000..80bf5fe --- /dev/null +++ b/customSDK/servicefabric/models/deployed_stateless_service_instance_info.py @@ -0,0 +1,87 @@ +# 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 .deployed_service_replica_info import DeployedServiceReplicaInfo + + +class DeployedStatelessServiceInstanceInfo(DeployedServiceReplicaInfo): + """Information about a stateless service instance deployed on a node. + + All required parameters must be populated in order to send to Azure. + + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param code_package_name: The name of the code package that hosts this + replica. + :type code_package_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param address: The last address returned by the replica in Open or + ChangeRole. + :type address: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param host_process_id: Host process ID of the process that is hosting the + replica. This will be zero if the replica is down. In hyper-v containers + this host process ID will be from different kernel. + :type host_process_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_id: Id of a stateless service instance. InstanceId is used + by Service Fabric to uniquely identify an instance of a partition of a + stateless service. It is unique within a partition and does not change for + the lifetime of the instance. If the instance has failed over on the same + or different node, it will get a different value for the InstanceId. + :type instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeployedStatelessServiceInstanceInfo, self).__init__(**kwargs) + self.instance_id = kwargs.get('instance_id', None) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/deployed_stateless_service_instance_info_py3.py b/customSDK/servicefabric/models/deployed_stateless_service_instance_info_py3.py new file mode 100644 index 0000000..906c530 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_stateless_service_instance_info_py3.py @@ -0,0 +1,87 @@ +# 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 .deployed_service_replica_info_py3 import DeployedServiceReplicaInfo + + +class DeployedStatelessServiceInstanceInfo(DeployedServiceReplicaInfo): + """Information about a stateless service instance deployed on a node. + + All required parameters must be populated in order to send to Azure. + + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param code_package_name: The name of the code package that hosts this + replica. + :type code_package_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param address: The last address returned by the replica in Open or + ChangeRole. + :type address: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param host_process_id: Host process ID of the process that is hosting the + replica. This will be zero if the replica is down. In hyper-v containers + this host process ID will be from different kernel. + :type host_process_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_id: Id of a stateless service instance. InstanceId is used + by Service Fabric to uniquely identify an instance of a partition of a + stateless service. It is unique within a partition and does not change for + the lifetime of the instance. If the instance has failed over on the same + or different node, it will get a different value for the InstanceId. + :type instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__(self, *, service_name: str=None, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, partition_id: str=None, replica_status=None, address: str=None, service_package_activation_id: str=None, host_process_id: str=None, instance_id: str=None, **kwargs) -> None: + super(DeployedStatelessServiceInstanceInfo, self).__init__(service_name=service_name, service_type_name=service_type_name, service_manifest_name=service_manifest_name, code_package_name=code_package_name, partition_id=partition_id, replica_status=replica_status, address=address, service_package_activation_id=service_package_activation_id, host_process_id=host_process_id, **kwargs) + self.instance_id = instance_id + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/diagnostics_description.py b/customSDK/servicefabric/models/diagnostics_description.py new file mode 100644 index 0000000..8c4e0a8 --- /dev/null +++ b/customSDK/servicefabric/models/diagnostics_description.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class DiagnosticsDescription(Model): + """Describes the diagnostics options available. + + :param sinks: List of supported sinks that can be referenced. + :type sinks: list[~azure.servicefabric.models.DiagnosticsSinkProperties] + :param enabled: Status of whether or not sinks are enabled. + :type enabled: bool + :param default_sink_refs: The sinks to be used if diagnostics is enabled. + Sink choices can be overridden at the service and code package level. + :type default_sink_refs: list[str] + """ + + _attribute_map = { + 'sinks': {'key': 'sinks', 'type': '[DiagnosticsSinkProperties]'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'default_sink_refs': {'key': 'defaultSinkRefs', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DiagnosticsDescription, self).__init__(**kwargs) + self.sinks = kwargs.get('sinks', None) + self.enabled = kwargs.get('enabled', None) + self.default_sink_refs = kwargs.get('default_sink_refs', None) diff --git a/customSDK/servicefabric/models/diagnostics_description_py3.py b/customSDK/servicefabric/models/diagnostics_description_py3.py new file mode 100644 index 0000000..6ff42af --- /dev/null +++ b/customSDK/servicefabric/models/diagnostics_description_py3.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class DiagnosticsDescription(Model): + """Describes the diagnostics options available. + + :param sinks: List of supported sinks that can be referenced. + :type sinks: list[~azure.servicefabric.models.DiagnosticsSinkProperties] + :param enabled: Status of whether or not sinks are enabled. + :type enabled: bool + :param default_sink_refs: The sinks to be used if diagnostics is enabled. + Sink choices can be overridden at the service and code package level. + :type default_sink_refs: list[str] + """ + + _attribute_map = { + 'sinks': {'key': 'sinks', 'type': '[DiagnosticsSinkProperties]'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'default_sink_refs': {'key': 'defaultSinkRefs', 'type': '[str]'}, + } + + def __init__(self, *, sinks=None, enabled: bool=None, default_sink_refs=None, **kwargs) -> None: + super(DiagnosticsDescription, self).__init__(**kwargs) + self.sinks = sinks + self.enabled = enabled + self.default_sink_refs = default_sink_refs diff --git a/customSDK/servicefabric/models/diagnostics_ref.py b/customSDK/servicefabric/models/diagnostics_ref.py new file mode 100644 index 0000000..3d4c803 --- /dev/null +++ b/customSDK/servicefabric/models/diagnostics_ref.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class DiagnosticsRef(Model): + """Reference to sinks in DiagnosticsDescription. + + :param enabled: Status of whether or not sinks are enabled. + :type enabled: bool + :param sink_refs: List of sinks to be used if enabled. References the list + of sinks in DiagnosticsDescription. + :type sink_refs: list[str] + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'sink_refs': {'key': 'sinkRefs', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DiagnosticsRef, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.sink_refs = kwargs.get('sink_refs', None) diff --git a/customSDK/servicefabric/models/diagnostics_ref_py3.py b/customSDK/servicefabric/models/diagnostics_ref_py3.py new file mode 100644 index 0000000..f11fbf2 --- /dev/null +++ b/customSDK/servicefabric/models/diagnostics_ref_py3.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class DiagnosticsRef(Model): + """Reference to sinks in DiagnosticsDescription. + + :param enabled: Status of whether or not sinks are enabled. + :type enabled: bool + :param sink_refs: List of sinks to be used if enabled. References the list + of sinks in DiagnosticsDescription. + :type sink_refs: list[str] + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'sink_refs': {'key': 'sinkRefs', 'type': '[str]'}, + } + + def __init__(self, *, enabled: bool=None, sink_refs=None, **kwargs) -> None: + super(DiagnosticsRef, self).__init__(**kwargs) + self.enabled = enabled + self.sink_refs = sink_refs diff --git a/customSDK/servicefabric/models/diagnostics_sink_properties.py b/customSDK/servicefabric/models/diagnostics_sink_properties.py new file mode 100644 index 0000000..63da00f --- /dev/null +++ b/customSDK/servicefabric/models/diagnostics_sink_properties.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class DiagnosticsSinkProperties(Model): + """Properties of a DiagnosticsSink. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureInternalMonitoringPipelineSinkDescription + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the sink. This value is referenced by + DiagnosticsReferenceDescription + :type name: str + :param description: A description of the sink. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AzureInternalMonitoringPipeline': 'AzureInternalMonitoringPipelineSinkDescription'} + } + + def __init__(self, **kwargs): + super(DiagnosticsSinkProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.kind = None diff --git a/customSDK/servicefabric/models/diagnostics_sink_properties_py3.py b/customSDK/servicefabric/models/diagnostics_sink_properties_py3.py new file mode 100644 index 0000000..123512a --- /dev/null +++ b/customSDK/servicefabric/models/diagnostics_sink_properties_py3.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class DiagnosticsSinkProperties(Model): + """Properties of a DiagnosticsSink. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureInternalMonitoringPipelineSinkDescription + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the sink. This value is referenced by + DiagnosticsReferenceDescription + :type name: str + :param description: A description of the sink. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AzureInternalMonitoringPipeline': 'AzureInternalMonitoringPipelineSinkDescription'} + } + + def __init__(self, *, name: str=None, description: str=None, **kwargs) -> None: + super(DiagnosticsSinkProperties, self).__init__(**kwargs) + self.name = name + self.description = description + self.kind = None diff --git a/customSDK/servicefabric/models/disable_backup_description.py b/customSDK/servicefabric/models/disable_backup_description.py new file mode 100644 index 0000000..3834793 --- /dev/null +++ b/customSDK/servicefabric/models/disable_backup_description.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class DisableBackupDescription(Model): + """It describes the body parameters while disabling backup of a backup + entity(Application/Service/Partition). + + All required parameters must be populated in order to send to Azure. + + :param clean_backup: Required. Boolean flag to delete backups. It can be + set to true for deleting all the backups which were created for the backup + entity that is getting disabled for backup. + :type clean_backup: bool + """ + + _validation = { + 'clean_backup': {'required': True}, + } + + _attribute_map = { + 'clean_backup': {'key': 'CleanBackup', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DisableBackupDescription, self).__init__(**kwargs) + self.clean_backup = kwargs.get('clean_backup', None) diff --git a/customSDK/servicefabric/models/disable_backup_description_py3.py b/customSDK/servicefabric/models/disable_backup_description_py3.py new file mode 100644 index 0000000..ad03ecd --- /dev/null +++ b/customSDK/servicefabric/models/disable_backup_description_py3.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class DisableBackupDescription(Model): + """It describes the body parameters while disabling backup of a backup + entity(Application/Service/Partition). + + All required parameters must be populated in order to send to Azure. + + :param clean_backup: Required. Boolean flag to delete backups. It can be + set to true for deleting all the backups which were created for the backup + entity that is getting disabled for backup. + :type clean_backup: bool + """ + + _validation = { + 'clean_backup': {'required': True}, + } + + _attribute_map = { + 'clean_backup': {'key': 'CleanBackup', 'type': 'bool'}, + } + + def __init__(self, *, clean_backup: bool, **kwargs) -> None: + super(DisableBackupDescription, self).__init__(**kwargs) + self.clean_backup = clean_backup diff --git a/customSDK/servicefabric/models/disk_info.py b/customSDK/servicefabric/models/disk_info.py new file mode 100644 index 0000000..2486a4c --- /dev/null +++ b/customSDK/servicefabric/models/disk_info.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class DiskInfo(Model): + """Information about the disk. + + :param capacity: the disk size in bytes + :type capacity: str + :param available_space: the available disk space in bytes + :type available_space: str + """ + + _attribute_map = { + 'capacity': {'key': 'Capacity', 'type': 'str'}, + 'available_space': {'key': 'AvailableSpace', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiskInfo, self).__init__(**kwargs) + self.capacity = kwargs.get('capacity', None) + self.available_space = kwargs.get('available_space', None) diff --git a/customSDK/servicefabric/models/disk_info_py3.py b/customSDK/servicefabric/models/disk_info_py3.py new file mode 100644 index 0000000..6af696a --- /dev/null +++ b/customSDK/servicefabric/models/disk_info_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class DiskInfo(Model): + """Information about the disk. + + :param capacity: the disk size in bytes + :type capacity: str + :param available_space: the available disk space in bytes + :type available_space: str + """ + + _attribute_map = { + 'capacity': {'key': 'Capacity', 'type': 'str'}, + 'available_space': {'key': 'AvailableSpace', 'type': 'str'}, + } + + def __init__(self, *, capacity: str=None, available_space: str=None, **kwargs) -> None: + super(DiskInfo, self).__init__(**kwargs) + self.capacity = capacity + self.available_space = available_space diff --git a/customSDK/servicefabric/models/double_property_value.py b/customSDK/servicefabric/models/double_property_value.py new file mode 100644 index 0000000..4643e92 --- /dev/null +++ b/customSDK/servicefabric/models/double_property_value.py @@ -0,0 +1,39 @@ +# 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 .property_value import PropertyValue + + +class DoublePropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Double. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. The data of the property value. + :type data: float + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(DoublePropertyValue, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.kind = 'Double' diff --git a/customSDK/servicefabric/models/double_property_value_py3.py b/customSDK/servicefabric/models/double_property_value_py3.py new file mode 100644 index 0000000..2b0f6f0 --- /dev/null +++ b/customSDK/servicefabric/models/double_property_value_py3.py @@ -0,0 +1,39 @@ +# 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 .property_value_py3 import PropertyValue + + +class DoublePropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Double. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. The data of the property value. + :type data: float + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'float'}, + } + + def __init__(self, *, data: float, **kwargs) -> None: + super(DoublePropertyValue, self).__init__(**kwargs) + self.data = data + self.kind = 'Double' diff --git a/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description.py b/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description.py new file mode 100644 index 0000000..a974525 --- /dev/null +++ b/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description.py @@ -0,0 +1,50 @@ +# 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 .backup_storage_description import BackupStorageDescription + + +class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Dsms Azure blob store used for storing and + enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param storage_credentials_source_location: Required. The source location + of the storage credentials to connect to the Dsms Azure blob store. + :type storage_credentials_source_location: str + :param container_name: Required. The name of the container in the blob + store to store and enumerate backups from. + :type container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'storage_credentials_source_location': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'storage_credentials_source_location': {'key': 'StorageCredentialsSourceLocation', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DsmsAzureBlobBackupStorageDescription, self).__init__(**kwargs) + self.storage_credentials_source_location = kwargs.get('storage_credentials_source_location', None) + self.container_name = kwargs.get('container_name', None) + self.storage_kind = 'DsmsAzureBlobStore' diff --git a/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description_py3.py b/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description_py3.py new file mode 100644 index 0000000..8419de8 --- /dev/null +++ b/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description_py3.py @@ -0,0 +1,50 @@ +# 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 .backup_storage_description_py3 import BackupStorageDescription + + +class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Dsms Azure blob store used for storing and + enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param storage_credentials_source_location: Required. The source location + of the storage credentials to connect to the Dsms Azure blob store. + :type storage_credentials_source_location: str + :param container_name: Required. The name of the container in the blob + store to store and enumerate backups from. + :type container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'storage_credentials_source_location': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'storage_credentials_source_location': {'key': 'StorageCredentialsSourceLocation', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, *, storage_credentials_source_location: str, container_name: str, friendly_name: str=None, **kwargs) -> None: + super(DsmsAzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) + self.storage_credentials_source_location = storage_credentials_source_location + self.container_name = container_name + self.storage_kind = 'DsmsAzureBlobStore' diff --git a/customSDK/servicefabric/models/enable_backup_description.py b/customSDK/servicefabric/models/enable_backup_description.py new file mode 100644 index 0000000..a9439c8 --- /dev/null +++ b/customSDK/servicefabric/models/enable_backup_description.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class EnableBackupDescription(Model): + """Specifies the parameters needed to enable periodic backup. + + All required parameters must be populated in order to send to Azure. + + :param backup_policy_name: Required. Name of the backup policy to be used + for enabling periodic backups. + :type backup_policy_name: str + """ + + _validation = { + 'backup_policy_name': {'required': True}, + } + + _attribute_map = { + 'backup_policy_name': {'key': 'BackupPolicyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnableBackupDescription, self).__init__(**kwargs) + self.backup_policy_name = kwargs.get('backup_policy_name', None) diff --git a/customSDK/servicefabric/models/enable_backup_description_py3.py b/customSDK/servicefabric/models/enable_backup_description_py3.py new file mode 100644 index 0000000..4518352 --- /dev/null +++ b/customSDK/servicefabric/models/enable_backup_description_py3.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class EnableBackupDescription(Model): + """Specifies the parameters needed to enable periodic backup. + + All required parameters must be populated in order to send to Azure. + + :param backup_policy_name: Required. Name of the backup policy to be used + for enabling periodic backups. + :type backup_policy_name: str + """ + + _validation = { + 'backup_policy_name': {'required': True}, + } + + _attribute_map = { + 'backup_policy_name': {'key': 'BackupPolicyName', 'type': 'str'}, + } + + def __init__(self, *, backup_policy_name: str, **kwargs) -> None: + super(EnableBackupDescription, self).__init__(**kwargs) + self.backup_policy_name = backup_policy_name diff --git a/customSDK/servicefabric/models/endpoint_properties.py b/customSDK/servicefabric/models/endpoint_properties.py new file mode 100644 index 0000000..fe53d35 --- /dev/null +++ b/customSDK/servicefabric/models/endpoint_properties.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class EndpointProperties(Model): + """Describes a container endpoint. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the endpoint. + :type name: str + :param port: Port used by the container. + :type port: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(EndpointProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.port = kwargs.get('port', None) diff --git a/customSDK/servicefabric/models/endpoint_properties_py3.py b/customSDK/servicefabric/models/endpoint_properties_py3.py new file mode 100644 index 0000000..d614425 --- /dev/null +++ b/customSDK/servicefabric/models/endpoint_properties_py3.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class EndpointProperties(Model): + """Describes a container endpoint. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the endpoint. + :type name: str + :param port: Port used by the container. + :type port: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, *, name: str, port: int=None, **kwargs) -> None: + super(EndpointProperties, self).__init__(**kwargs) + self.name = name + self.port = port diff --git a/customSDK/servicefabric/models/endpoint_ref.py b/customSDK/servicefabric/models/endpoint_ref.py new file mode 100644 index 0000000..3740b8c --- /dev/null +++ b/customSDK/servicefabric/models/endpoint_ref.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class EndpointRef(Model): + """Describes a reference to a service endpoint. + + :param name: Name of the endpoint. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EndpointRef, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/endpoint_ref_py3.py b/customSDK/servicefabric/models/endpoint_ref_py3.py new file mode 100644 index 0000000..28999f8 --- /dev/null +++ b/customSDK/servicefabric/models/endpoint_ref_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class EndpointRef(Model): + """Describes a reference to a service endpoint. + + :param name: Name of the endpoint. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(EndpointRef, self).__init__(**kwargs) + self.name = name diff --git a/customSDK/servicefabric/models/ensure_availability_safety_check.py b/customSDK/servicefabric/models/ensure_availability_safety_check.py new file mode 100644 index 0000000..e432ba6 --- /dev/null +++ b/customSDK/servicefabric/models/ensure_availability_safety_check.py @@ -0,0 +1,40 @@ +# 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 .partition_safety_check import PartitionSafetyCheck + + +class EnsureAvailabilitySafetyCheck(PartitionSafetyCheck): + """Safety check that waits to ensure the availability of the partition. It + waits until there are replicas available such that bringing down this + replica will not cause availability loss for the partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnsureAvailabilitySafetyCheck, self).__init__(**kwargs) + self.kind = 'EnsureAvailability' diff --git a/customSDK/servicefabric/models/ensure_availability_safety_check_py3.py b/customSDK/servicefabric/models/ensure_availability_safety_check_py3.py new file mode 100644 index 0000000..72de0dc --- /dev/null +++ b/customSDK/servicefabric/models/ensure_availability_safety_check_py3.py @@ -0,0 +1,40 @@ +# 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 .partition_safety_check_py3 import PartitionSafetyCheck + + +class EnsureAvailabilitySafetyCheck(PartitionSafetyCheck): + """Safety check that waits to ensure the availability of the partition. It + waits until there are replicas available such that bringing down this + replica will not cause availability loss for the partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, partition_id: str=None, **kwargs) -> None: + super(EnsureAvailabilitySafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'EnsureAvailability' diff --git a/customSDK/servicefabric/models/ensure_partition_quorum_safety_check.py b/customSDK/servicefabric/models/ensure_partition_quorum_safety_check.py new file mode 100644 index 0000000..7315ac2 --- /dev/null +++ b/customSDK/servicefabric/models/ensure_partition_quorum_safety_check.py @@ -0,0 +1,39 @@ +# 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 .partition_safety_check import PartitionSafetyCheck + + +class EnsurePartitionQuorumSafetyCheck(PartitionSafetyCheck): + """Safety check that ensures that a quorum of replicas are not lost for a + partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnsurePartitionQuorumSafetyCheck, self).__init__(**kwargs) + self.kind = 'EnsurePartitionQuorum' diff --git a/customSDK/servicefabric/models/ensure_partition_quorum_safety_check_py3.py b/customSDK/servicefabric/models/ensure_partition_quorum_safety_check_py3.py new file mode 100644 index 0000000..532d5e8 --- /dev/null +++ b/customSDK/servicefabric/models/ensure_partition_quorum_safety_check_py3.py @@ -0,0 +1,39 @@ +# 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 .partition_safety_check_py3 import PartitionSafetyCheck + + +class EnsurePartitionQuorumSafetyCheck(PartitionSafetyCheck): + """Safety check that ensures that a quorum of replicas are not lost for a + partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, partition_id: str=None, **kwargs) -> None: + super(EnsurePartitionQuorumSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'EnsurePartitionQuorum' diff --git a/customSDK/servicefabric/models/entity_health.py b/customSDK/servicefabric/models/entity_health.py new file mode 100644 index 0000000..dc944cc --- /dev/null +++ b/customSDK/servicefabric/models/entity_health.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class EntityHealth(Model): + """Health information common to all entities in the cluster. It contains the + aggregated health state, health events and unhealthy evaluation. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + } + + def __init__(self, **kwargs): + super(EntityHealth, self).__init__(**kwargs) + self.aggregated_health_state = kwargs.get('aggregated_health_state', None) + self.health_events = kwargs.get('health_events', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.health_statistics = kwargs.get('health_statistics', None) diff --git a/customSDK/servicefabric/models/entity_health_py3.py b/customSDK/servicefabric/models/entity_health_py3.py new file mode 100644 index 0000000..a253cd8 --- /dev/null +++ b/customSDK/servicefabric/models/entity_health_py3.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class EntityHealth(Model): + """Health information common to all entities in the cluster. It contains the + aggregated health state, health events and unhealthy evaluation. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, **kwargs) -> None: + super(EntityHealth, self).__init__(**kwargs) + self.aggregated_health_state = aggregated_health_state + self.health_events = health_events + self.unhealthy_evaluations = unhealthy_evaluations + self.health_statistics = health_statistics diff --git a/customSDK/servicefabric/models/entity_health_state.py b/customSDK/servicefabric/models/entity_health_state.py new file mode 100644 index 0000000..521a7b9 --- /dev/null +++ b/customSDK/servicefabric/models/entity_health_state.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class EntityHealthState(Model): + """A base type for the health state of various entities in the cluster. It + contains the aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EntityHealthState, self).__init__(**kwargs) + self.aggregated_health_state = kwargs.get('aggregated_health_state', None) diff --git a/customSDK/servicefabric/models/entity_health_state_chunk.py b/customSDK/servicefabric/models/entity_health_state_chunk.py new file mode 100644 index 0000000..bf6fcd7 --- /dev/null +++ b/customSDK/servicefabric/models/entity_health_state_chunk.py @@ -0,0 +1,31 @@ +# 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 msrest.serialization import Model + + +class EntityHealthStateChunk(Model): + """A base type for the health state chunk of various entities in the cluster. + It contains the aggregated health state. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EntityHealthStateChunk, self).__init__(**kwargs) + self.health_state = kwargs.get('health_state', None) diff --git a/customSDK/servicefabric/models/entity_health_state_chunk_list.py b/customSDK/servicefabric/models/entity_health_state_chunk_list.py new file mode 100644 index 0000000..963811d --- /dev/null +++ b/customSDK/servicefabric/models/entity_health_state_chunk_list.py @@ -0,0 +1,30 @@ +# 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 msrest.serialization import Model + + +class EntityHealthStateChunkList(Model): + """A base type for the list of health state chunks found in the cluster. It + contains the total number of health states that match the input filters. + + :param total_count: Total number of entity health state objects that match + the specified filters from the cluster health chunk query description. + :type total_count: long + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(EntityHealthStateChunkList, self).__init__(**kwargs) + self.total_count = kwargs.get('total_count', None) diff --git a/customSDK/servicefabric/models/entity_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/entity_health_state_chunk_list_py3.py new file mode 100644 index 0000000..3cdaa76 --- /dev/null +++ b/customSDK/servicefabric/models/entity_health_state_chunk_list_py3.py @@ -0,0 +1,30 @@ +# 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 msrest.serialization import Model + + +class EntityHealthStateChunkList(Model): + """A base type for the list of health state chunks found in the cluster. It + contains the total number of health states that match the input filters. + + :param total_count: Total number of entity health state objects that match + the specified filters from the cluster health chunk query description. + :type total_count: long + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + } + + def __init__(self, *, total_count: int=None, **kwargs) -> None: + super(EntityHealthStateChunkList, self).__init__(**kwargs) + self.total_count = total_count diff --git a/customSDK/servicefabric/models/entity_health_state_chunk_py3.py b/customSDK/servicefabric/models/entity_health_state_chunk_py3.py new file mode 100644 index 0000000..f0b5c39 --- /dev/null +++ b/customSDK/servicefabric/models/entity_health_state_chunk_py3.py @@ -0,0 +1,31 @@ +# 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 msrest.serialization import Model + + +class EntityHealthStateChunk(Model): + """A base type for the health state chunk of various entities in the cluster. + It contains the aggregated health state. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + } + + def __init__(self, *, health_state=None, **kwargs) -> None: + super(EntityHealthStateChunk, self).__init__(**kwargs) + self.health_state = health_state diff --git a/customSDK/servicefabric/models/entity_health_state_py3.py b/customSDK/servicefabric/models/entity_health_state_py3.py new file mode 100644 index 0000000..0dcce95 --- /dev/null +++ b/customSDK/servicefabric/models/entity_health_state_py3.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class EntityHealthState(Model): + """A base type for the health state of various entities in the cluster. It + contains the aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, **kwargs) -> None: + super(EntityHealthState, self).__init__(**kwargs) + self.aggregated_health_state = aggregated_health_state diff --git a/customSDK/servicefabric/models/entity_kind_health_state_count.py b/customSDK/servicefabric/models/entity_kind_health_state_count.py new file mode 100644 index 0000000..bec50a6 --- /dev/null +++ b/customSDK/servicefabric/models/entity_kind_health_state_count.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class EntityKindHealthStateCount(Model): + """Represents health state count for entities of the specified entity kind. + + :param entity_kind: The entity kind for which health states are evaluated. + Possible values include: 'Invalid', 'Node', 'Partition', 'Service', + 'Application', 'Replica', 'DeployedApplication', 'DeployedServicePackage', + 'Cluster' + :type entity_kind: str or ~azure.servicefabric.models.EntityKind + :param health_state_count: The health state count for the entities of the + specified kind. + :type health_state_count: ~azure.servicefabric.models.HealthStateCount + """ + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'health_state_count': {'key': 'HealthStateCount', 'type': 'HealthStateCount'}, + } + + def __init__(self, **kwargs): + super(EntityKindHealthStateCount, self).__init__(**kwargs) + self.entity_kind = kwargs.get('entity_kind', None) + self.health_state_count = kwargs.get('health_state_count', None) diff --git a/customSDK/servicefabric/models/entity_kind_health_state_count_py3.py b/customSDK/servicefabric/models/entity_kind_health_state_count_py3.py new file mode 100644 index 0000000..a7ff937 --- /dev/null +++ b/customSDK/servicefabric/models/entity_kind_health_state_count_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class EntityKindHealthStateCount(Model): + """Represents health state count for entities of the specified entity kind. + + :param entity_kind: The entity kind for which health states are evaluated. + Possible values include: 'Invalid', 'Node', 'Partition', 'Service', + 'Application', 'Replica', 'DeployedApplication', 'DeployedServicePackage', + 'Cluster' + :type entity_kind: str or ~azure.servicefabric.models.EntityKind + :param health_state_count: The health state count for the entities of the + specified kind. + :type health_state_count: ~azure.servicefabric.models.HealthStateCount + """ + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'health_state_count': {'key': 'HealthStateCount', 'type': 'HealthStateCount'}, + } + + def __init__(self, *, entity_kind=None, health_state_count=None, **kwargs) -> None: + super(EntityKindHealthStateCount, self).__init__(**kwargs) + self.entity_kind = entity_kind + self.health_state_count = health_state_count diff --git a/customSDK/servicefabric/models/environment_variable.py b/customSDK/servicefabric/models/environment_variable.py new file mode 100644 index 0000000..7993e54 --- /dev/null +++ b/customSDK/servicefabric/models/environment_variable.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class EnvironmentVariable(Model): + """Describes an environment variable for the container. + + :param type: The type of the environment variable being given in value. + Possible values include: 'ClearText', 'KeyVaultReference', + 'SecretValueReference'. Default value: "ClearText" . + :type type: str or ~azure.servicefabric.models.EnvironmentVariableType + :param name: The name of the environment variable. + :type name: str + :param value: The value of the environment variable, will be processed + based on the type provided. + :type value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnvironmentVariable, self).__init__(**kwargs) + self.type = kwargs.get('type', "ClearText") + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/environment_variable_py3.py b/customSDK/servicefabric/models/environment_variable_py3.py new file mode 100644 index 0000000..f0515a9 --- /dev/null +++ b/customSDK/servicefabric/models/environment_variable_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class EnvironmentVariable(Model): + """Describes an environment variable for the container. + + :param type: The type of the environment variable being given in value. + Possible values include: 'ClearText', 'KeyVaultReference', + 'SecretValueReference'. Default value: "ClearText" . + :type type: str or ~azure.servicefabric.models.EnvironmentVariableType + :param name: The name of the environment variable. + :type name: str + :param value: The value of the environment variable, will be processed + based on the type provided. + :type value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, type="ClearText", name: str=None, value: str=None, **kwargs) -> None: + super(EnvironmentVariable, self).__init__(**kwargs) + self.type = type + self.name = name + self.value = value diff --git a/customSDK/servicefabric/models/epoch.py b/customSDK/servicefabric/models/epoch.py new file mode 100644 index 0000000..951ff5c --- /dev/null +++ b/customSDK/servicefabric/models/epoch.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class Epoch(Model): + """An Epoch is a configuration number for the partition as a whole. When the + configuration of the replica set changes, for example when the Primary + replica changes, the operations that are replicated from the new Primary + replica are said to be a new Epoch from the ones which were sent by the old + Primary replica. + + :param configuration_version: The current configuration number of this + Epoch. The configuration number is an increasing value that is updated + whenever the configuration of this replica set changes. + :type configuration_version: str + :param data_loss_version: The current data loss number of this Epoch. The + data loss number property is an increasing value which is updated whenever + data loss is suspected, as when loss of a quorum of replicas in the + replica set that includes the Primary replica. + :type data_loss_version: str + """ + + _attribute_map = { + 'configuration_version': {'key': 'ConfigurationVersion', 'type': 'str'}, + 'data_loss_version': {'key': 'DataLossVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Epoch, self).__init__(**kwargs) + self.configuration_version = kwargs.get('configuration_version', None) + self.data_loss_version = kwargs.get('data_loss_version', None) diff --git a/customSDK/servicefabric/models/epoch_py3.py b/customSDK/servicefabric/models/epoch_py3.py new file mode 100644 index 0000000..2d9ef95 --- /dev/null +++ b/customSDK/servicefabric/models/epoch_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class Epoch(Model): + """An Epoch is a configuration number for the partition as a whole. When the + configuration of the replica set changes, for example when the Primary + replica changes, the operations that are replicated from the new Primary + replica are said to be a new Epoch from the ones which were sent by the old + Primary replica. + + :param configuration_version: The current configuration number of this + Epoch. The configuration number is an increasing value that is updated + whenever the configuration of this replica set changes. + :type configuration_version: str + :param data_loss_version: The current data loss number of this Epoch. The + data loss number property is an increasing value which is updated whenever + data loss is suspected, as when loss of a quorum of replicas in the + replica set that includes the Primary replica. + :type data_loss_version: str + """ + + _attribute_map = { + 'configuration_version': {'key': 'ConfigurationVersion', 'type': 'str'}, + 'data_loss_version': {'key': 'DataLossVersion', 'type': 'str'}, + } + + def __init__(self, *, configuration_version: str=None, data_loss_version: str=None, **kwargs) -> None: + super(Epoch, self).__init__(**kwargs) + self.configuration_version = configuration_version + self.data_loss_version = data_loss_version diff --git a/customSDK/servicefabric/models/event_health_evaluation.py b/customSDK/servicefabric/models/event_health_evaluation.py new file mode 100644 index 0000000..00debb2 --- /dev/null +++ b/customSDK/servicefabric/models/event_health_evaluation.py @@ -0,0 +1,60 @@ +# 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 .health_evaluation import HealthEvaluation + + +class EventHealthEvaluation(HealthEvaluation): + """Represents health evaluation of a HealthEvent that was reported on the + entity. + The health evaluation is returned when evaluating health of an entity + results in Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param consider_warning_as_error: Indicates whether warnings are treated + with the same severity as errors. The field is specified in the health + policy used to evaluate the entity. + :type consider_warning_as_error: bool + :param unhealthy_event: Represents health information reported on a health + entity, such as cluster, application or node, with additional metadata + added by the Health Manager. + :type unhealthy_event: ~azure.servicefabric.models.HealthEvent + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'unhealthy_event': {'key': 'UnhealthyEvent', 'type': 'HealthEvent'}, + } + + def __init__(self, **kwargs): + super(EventHealthEvaluation, self).__init__(**kwargs) + self.consider_warning_as_error = kwargs.get('consider_warning_as_error', None) + self.unhealthy_event = kwargs.get('unhealthy_event', None) + self.kind = 'Event' diff --git a/customSDK/servicefabric/models/event_health_evaluation_py3.py b/customSDK/servicefabric/models/event_health_evaluation_py3.py new file mode 100644 index 0000000..5198e6a --- /dev/null +++ b/customSDK/servicefabric/models/event_health_evaluation_py3.py @@ -0,0 +1,60 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class EventHealthEvaluation(HealthEvaluation): + """Represents health evaluation of a HealthEvent that was reported on the + entity. + The health evaluation is returned when evaluating health of an entity + results in Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param consider_warning_as_error: Indicates whether warnings are treated + with the same severity as errors. The field is specified in the health + policy used to evaluate the entity. + :type consider_warning_as_error: bool + :param unhealthy_event: Represents health information reported on a health + entity, such as cluster, application or node, with additional metadata + added by the Health Manager. + :type unhealthy_event: ~azure.servicefabric.models.HealthEvent + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'unhealthy_event': {'key': 'UnhealthyEvent', 'type': 'HealthEvent'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, consider_warning_as_error: bool=None, unhealthy_event=None, **kwargs) -> None: + super(EventHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.consider_warning_as_error = consider_warning_as_error + self.unhealthy_event = unhealthy_event + self.kind = 'Event' diff --git a/customSDK/servicefabric/models/executing_faults_chaos_event.py b/customSDK/servicefabric/models/executing_faults_chaos_event.py new file mode 100644 index 0000000..501f145 --- /dev/null +++ b/customSDK/servicefabric/models/executing_faults_chaos_event.py @@ -0,0 +1,46 @@ +# 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 .chaos_event import ChaosEvent + + +class ExecutingFaultsChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos has decided on the + faults for an iteration. This Chaos event contains the details of the + faults as a list of strings. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param faults: List of string description of the faults that Chaos decided + to execute in an iteration. + :type faults: list[str] + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'faults': {'key': 'Faults', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ExecutingFaultsChaosEvent, self).__init__(**kwargs) + self.faults = kwargs.get('faults', None) + self.kind = 'ExecutingFaults' diff --git a/customSDK/servicefabric/models/executing_faults_chaos_event_py3.py b/customSDK/servicefabric/models/executing_faults_chaos_event_py3.py new file mode 100644 index 0000000..12947de --- /dev/null +++ b/customSDK/servicefabric/models/executing_faults_chaos_event_py3.py @@ -0,0 +1,46 @@ +# 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 .chaos_event_py3 import ChaosEvent + + +class ExecutingFaultsChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos has decided on the + faults for an iteration. This Chaos event contains the details of the + faults as a list of strings. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param faults: List of string description of the faults that Chaos decided + to execute in an iteration. + :type faults: list[str] + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'faults': {'key': 'Faults', 'type': '[str]'}, + } + + def __init__(self, *, time_stamp_utc, faults=None, **kwargs) -> None: + super(ExecutingFaultsChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.faults = faults + self.kind = 'ExecutingFaults' diff --git a/customSDK/servicefabric/models/execution_policy.py b/customSDK/servicefabric/models/execution_policy.py new file mode 100644 index 0000000..d03ba11 --- /dev/null +++ b/customSDK/servicefabric/models/execution_policy.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class ExecutionPolicy(Model): + """The execution policy of the service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DefaultExecutionPolicy, RunToCompletionExecutionPolicy + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Default': 'DefaultExecutionPolicy', 'RunToCompletion': 'RunToCompletionExecutionPolicy'} + } + + def __init__(self, **kwargs): + super(ExecutionPolicy, self).__init__(**kwargs) + self.type = None diff --git a/customSDK/servicefabric/models/execution_policy_py3.py b/customSDK/servicefabric/models/execution_policy_py3.py new file mode 100644 index 0000000..8dcdcf2 --- /dev/null +++ b/customSDK/servicefabric/models/execution_policy_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class ExecutionPolicy(Model): + """The execution policy of the service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DefaultExecutionPolicy, RunToCompletionExecutionPolicy + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Default': 'DefaultExecutionPolicy', 'RunToCompletion': 'RunToCompletionExecutionPolicy'} + } + + def __init__(self, **kwargs) -> None: + super(ExecutionPolicy, self).__init__(**kwargs) + self.type = None diff --git a/customSDK/servicefabric/models/external_store_provision_application_type_description.py b/customSDK/servicefabric/models/external_store_provision_application_type_description.py new file mode 100644 index 0000000..35ac961 --- /dev/null +++ b/customSDK/servicefabric/models/external_store_provision_application_type_description.py @@ -0,0 +1,68 @@ +# 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 .provision_application_type_description_base import ProvisionApplicationTypeDescriptionBase + + +class ExternalStoreProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): + """Describes the operation to register or provision an application type using + an application package from an external store instead of a package uploaded + to the Service Fabric image store. + + All required parameters must be populated in order to send to Azure. + + :param async_property: Required. Indicates whether or not provisioning + should occur asynchronously. When set to true, the provision operation + returns when the request is accepted by the system, and the provision + operation continues without any timeout limit. The default value is false. + For large application packages, we recommend setting the value to true. + :type async_property: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_package_download_uri: Required. The path to the + '.sfpkg' application package from where the application package can be + downloaded using HTTP or HTTPS protocols. The application package can be + stored in an external store that provides GET operation to download the + file. Supported protocols are HTTP and HTTPS, and the path must allow READ + access. + :type application_package_download_uri: str + :param application_type_name: Required. The application type name + represents the name of the application type found in the application + manifest. + :type application_type_name: str + :param application_type_version: Required. The application type version + represents the version of the application type found in the application + manifest. + :type application_type_version: str + """ + + _validation = { + 'async_property': {'required': True}, + 'kind': {'required': True}, + 'application_package_download_uri': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'async_property': {'key': 'Async', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_package_download_uri': {'key': 'ApplicationPackageDownloadUri', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExternalStoreProvisionApplicationTypeDescription, self).__init__(**kwargs) + self.application_package_download_uri = kwargs.get('application_package_download_uri', None) + self.application_type_name = kwargs.get('application_type_name', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.kind = 'ExternalStore' diff --git a/customSDK/servicefabric/models/external_store_provision_application_type_description_py3.py b/customSDK/servicefabric/models/external_store_provision_application_type_description_py3.py new file mode 100644 index 0000000..2573d5e --- /dev/null +++ b/customSDK/servicefabric/models/external_store_provision_application_type_description_py3.py @@ -0,0 +1,68 @@ +# 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 .provision_application_type_description_base_py3 import ProvisionApplicationTypeDescriptionBase + + +class ExternalStoreProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): + """Describes the operation to register or provision an application type using + an application package from an external store instead of a package uploaded + to the Service Fabric image store. + + All required parameters must be populated in order to send to Azure. + + :param async_property: Required. Indicates whether or not provisioning + should occur asynchronously. When set to true, the provision operation + returns when the request is accepted by the system, and the provision + operation continues without any timeout limit. The default value is false. + For large application packages, we recommend setting the value to true. + :type async_property: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_package_download_uri: Required. The path to the + '.sfpkg' application package from where the application package can be + downloaded using HTTP or HTTPS protocols. The application package can be + stored in an external store that provides GET operation to download the + file. Supported protocols are HTTP and HTTPS, and the path must allow READ + access. + :type application_package_download_uri: str + :param application_type_name: Required. The application type name + represents the name of the application type found in the application + manifest. + :type application_type_name: str + :param application_type_version: Required. The application type version + represents the version of the application type found in the application + manifest. + :type application_type_version: str + """ + + _validation = { + 'async_property': {'required': True}, + 'kind': {'required': True}, + 'application_package_download_uri': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'async_property': {'key': 'Async', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_package_download_uri': {'key': 'ApplicationPackageDownloadUri', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + } + + def __init__(self, *, async_property: bool, application_package_download_uri: str, application_type_name: str, application_type_version: str, **kwargs) -> None: + super(ExternalStoreProvisionApplicationTypeDescription, self).__init__(async_property=async_property, **kwargs) + self.application_package_download_uri = application_package_download_uri + self.application_type_name = application_type_name + self.application_type_version = application_type_version + self.kind = 'ExternalStore' diff --git a/customSDK/servicefabric/models/fabric_code_version_info.py b/customSDK/servicefabric/models/fabric_code_version_info.py new file mode 100644 index 0000000..f0d30e3 --- /dev/null +++ b/customSDK/servicefabric/models/fabric_code_version_info.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class FabricCodeVersionInfo(Model): + """Information about a Service Fabric code version. + + :param code_version: The product version of Service Fabric. + :type code_version: str + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FabricCodeVersionInfo, self).__init__(**kwargs) + self.code_version = kwargs.get('code_version', None) diff --git a/customSDK/servicefabric/models/fabric_code_version_info_py3.py b/customSDK/servicefabric/models/fabric_code_version_info_py3.py new file mode 100644 index 0000000..427f8cc --- /dev/null +++ b/customSDK/servicefabric/models/fabric_code_version_info_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class FabricCodeVersionInfo(Model): + """Information about a Service Fabric code version. + + :param code_version: The product version of Service Fabric. + :type code_version: str + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + } + + def __init__(self, *, code_version: str=None, **kwargs) -> None: + super(FabricCodeVersionInfo, self).__init__(**kwargs) + self.code_version = code_version diff --git a/customSDK/servicefabric/models/fabric_config_version_info.py b/customSDK/servicefabric/models/fabric_config_version_info.py new file mode 100644 index 0000000..d02e1a3 --- /dev/null +++ b/customSDK/servicefabric/models/fabric_config_version_info.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class FabricConfigVersionInfo(Model): + """Information about a Service Fabric config version. + + :param config_version: The config version of Service Fabric. + :type config_version: str + """ + + _attribute_map = { + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FabricConfigVersionInfo, self).__init__(**kwargs) + self.config_version = kwargs.get('config_version', None) diff --git a/customSDK/servicefabric/models/fabric_config_version_info_py3.py b/customSDK/servicefabric/models/fabric_config_version_info_py3.py new file mode 100644 index 0000000..5a226d5 --- /dev/null +++ b/customSDK/servicefabric/models/fabric_config_version_info_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class FabricConfigVersionInfo(Model): + """Information about a Service Fabric config version. + + :param config_version: The config version of Service Fabric. + :type config_version: str + """ + + _attribute_map = { + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + } + + def __init__(self, *, config_version: str=None, **kwargs) -> None: + super(FabricConfigVersionInfo, self).__init__(**kwargs) + self.config_version = config_version diff --git a/customSDK/servicefabric/models/fabric_error.py b/customSDK/servicefabric/models/fabric_error.py new file mode 100644 index 0000000..cd15833 --- /dev/null +++ b/customSDK/servicefabric/models/fabric_error.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class FabricError(Model): + """The REST API operations for Service Fabric return standard HTTP status + codes. This type defines the additional information returned from the + Service Fabric API operations that are not successful. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. Error object containing error code and error + message. + :type error: ~azure.servicefabric.models.FabricErrorError + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'Error', 'type': 'FabricErrorError'}, + } + + def __init__(self, **kwargs): + super(FabricError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class FabricErrorException(HttpOperationError): + """Server responsed with exception of type: 'FabricError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(FabricErrorException, self).__init__(deserialize, response, 'FabricError', *args) diff --git a/customSDK/servicefabric/models/fabric_error_error.py b/customSDK/servicefabric/models/fabric_error_error.py new file mode 100644 index 0000000..9216b6c --- /dev/null +++ b/customSDK/servicefabric/models/fabric_error_error.py @@ -0,0 +1,193 @@ +# 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 msrest.serialization import Model + + +class FabricErrorError(Model): + """Error object containing error code and error message. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Defines the fabric error codes that be returned as + part of the error object in response to Service Fabric API operations that + are not successful. Following are the error code values that can be + returned for a specific HTTP status code. + - Possible values of the error code for HTTP status code 400 (Bad Request) + - "FABRIC_E_INVALID_PARTITION_KEY" + - "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" + - "FABRIC_E_INVALID_ADDRESS" + - "FABRIC_E_APPLICATION_NOT_UPGRADING" + - "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" + - "FABRIC_E_FABRIC_NOT_UPGRADING" + - "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" + - "FABRIC_E_INVALID_CONFIGURATION" + - "FABRIC_E_INVALID_NAME_URI" + - "FABRIC_E_PATH_TOO_LONG" + - "FABRIC_E_KEY_TOO_LARGE" + - "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" + - "FABRIC_E_INVALID_ATOMIC_GROUP" + - "FABRIC_E_VALUE_EMPTY" + - "FABRIC_E_BACKUP_IS_ENABLED" + - "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" + - "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" + - "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" + - "E_INVALIDARG" + - Possible values of the error code for HTTP status code 404 (Not Found) + - "FABRIC_E_NODE_NOT_FOUND" + - "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" + - "FABRIC_E_APPLICATION_NOT_FOUND" + - "FABRIC_E_SERVICE_TYPE_NOT_FOUND" + - "FABRIC_E_SERVICE_DOES_NOT_EXIST" + - "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" + - "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" + - "FABRIC_E_PARTITION_NOT_FOUND" + - "FABRIC_E_REPLICA_DOES_NOT_EXIST" + - "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" + - "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" + - "FABRIC_E_DIRECTORY_NOT_FOUND" + - "FABRIC_E_FABRIC_VERSION_NOT_FOUND" + - "FABRIC_E_FILE_NOT_FOUND" + - "FABRIC_E_NAME_DOES_NOT_EXIST" + - "FABRIC_E_PROPERTY_DOES_NOT_EXIST" + - "FABRIC_E_ENUMERATION_COMPLETED" + - "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" + - "FABRIC_E_KEY_NOT_FOUND" + - "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" + - "FABRIC_E_BACKUP_NOT_ENABLED" + - "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" + - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" + - Possible values of the error code for HTTP status code 409 (Conflict) + - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" + - "FABRIC_E_APPLICATION_ALREADY_EXISTS" + - "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" + - "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" + - "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" + - "FABRIC_E_SERVICE_ALREADY_EXISTS" + - "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" + - "FABRIC_E_APPLICATION_TYPE_IN_USE" + - "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" + - "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" + - "FABRIC_E_FABRIC_VERSION_IN_USE" + - "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" + - "FABRIC_E_NAME_ALREADY_EXISTS" + - "FABRIC_E_NAME_NOT_EMPTY" + - "FABRIC_E_PROPERTY_CHECK_FAILED" + - "FABRIC_E_SERVICE_METADATA_MISMATCH" + - "FABRIC_E_SERVICE_TYPE_MISMATCH" + - "FABRIC_E_HEALTH_STALE_REPORT" + - "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" + - "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" + - "FABRIC_E_INSTANCE_ID_MISMATCH" + - "FABRIC_E_BACKUP_IN_PROGRESS" + - "FABRIC_E_RESTORE_IN_PROGRESS" + - "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" + - Possible values of the error code for HTTP status code 413 (Request + Entity Too Large) + - "FABRIC_E_VALUE_TOO_LARGE" + - Possible values of the error code for HTTP status code 500 (Internal + Server Error) + - "FABRIC_E_NODE_IS_UP" + - "E_FAIL" + - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" + - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" + - "FABRIC_E_VOLUME_ALREADY_EXISTS" + - "FABRIC_E_VOLUME_NOT_FOUND" + - "SerializationError" + - Possible values of the error code for HTTP status code 503 (Service + Unavailable) + - "FABRIC_E_NO_WRITE_QUORUM" + - "FABRIC_E_NOT_PRIMARY" + - "FABRIC_E_NOT_READY" + - "FABRIC_E_RECONFIGURATION_PENDING" + - "FABRIC_E_SERVICE_OFFLINE" + - "E_ABORT" + - "FABRIC_E_VALUE_TOO_LARGE" + - Possible values of the error code for HTTP status code 504 (Gateway + Timeout) + - "FABRIC_E_COMMUNICATION_ERROR" + - "FABRIC_E_OPERATION_NOT_COMPLETE" + - "FABRIC_E_TIMEOUT". Possible values include: + 'FABRIC_E_INVALID_PARTITION_KEY', + 'FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR', 'FABRIC_E_INVALID_ADDRESS', + 'FABRIC_E_APPLICATION_NOT_UPGRADING', + 'FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR', + 'FABRIC_E_FABRIC_NOT_UPGRADING', + 'FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR', + 'FABRIC_E_INVALID_CONFIGURATION', 'FABRIC_E_INVALID_NAME_URI', + 'FABRIC_E_PATH_TOO_LONG', 'FABRIC_E_KEY_TOO_LARGE', + 'FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED', + 'FABRIC_E_INVALID_ATOMIC_GROUP', 'FABRIC_E_VALUE_EMPTY', + 'FABRIC_E_NODE_NOT_FOUND', 'FABRIC_E_APPLICATION_TYPE_NOT_FOUND', + 'FABRIC_E_APPLICATION_NOT_FOUND', 'FABRIC_E_SERVICE_TYPE_NOT_FOUND', + 'FABRIC_E_SERVICE_DOES_NOT_EXIST', + 'FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND', + 'FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND', + 'FABRIC_E_PARTITION_NOT_FOUND', 'FABRIC_E_REPLICA_DOES_NOT_EXIST', + 'FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST', + 'FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND', + 'FABRIC_E_DIRECTORY_NOT_FOUND', 'FABRIC_E_FABRIC_VERSION_NOT_FOUND', + 'FABRIC_E_FILE_NOT_FOUND', 'FABRIC_E_NAME_DOES_NOT_EXIST', + 'FABRIC_E_PROPERTY_DOES_NOT_EXIST', 'FABRIC_E_ENUMERATION_COMPLETED', + 'FABRIC_E_SERVICE_MANIFEST_NOT_FOUND', 'FABRIC_E_KEY_NOT_FOUND', + 'FABRIC_E_HEALTH_ENTITY_NOT_FOUND', + 'FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS', + 'FABRIC_E_APPLICATION_ALREADY_EXISTS', + 'FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION', + 'FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS', + 'FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS', + 'FABRIC_E_SERVICE_ALREADY_EXISTS', + 'FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS', + 'FABRIC_E_APPLICATION_TYPE_IN_USE', + 'FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION', + 'FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS', + 'FABRIC_E_FABRIC_VERSION_IN_USE', 'FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS', + 'FABRIC_E_NAME_ALREADY_EXISTS', 'FABRIC_E_NAME_NOT_EMPTY', + 'FABRIC_E_PROPERTY_CHECK_FAILED', 'FABRIC_E_SERVICE_METADATA_MISMATCH', + 'FABRIC_E_SERVICE_TYPE_MISMATCH', 'FABRIC_E_HEALTH_STALE_REPORT', + 'FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED', + 'FABRIC_E_NODE_HAS_NOT_STOPPED_YET', 'FABRIC_E_INSTANCE_ID_MISMATCH', + 'FABRIC_E_VALUE_TOO_LARGE', 'FABRIC_E_NO_WRITE_QUORUM', + 'FABRIC_E_NOT_PRIMARY', 'FABRIC_E_NOT_READY', + 'FABRIC_E_RECONFIGURATION_PENDING', 'FABRIC_E_SERVICE_OFFLINE', 'E_ABORT', + 'FABRIC_E_COMMUNICATION_ERROR', 'FABRIC_E_OPERATION_NOT_COMPLETE', + 'FABRIC_E_TIMEOUT', 'FABRIC_E_NODE_IS_UP', 'E_FAIL', + 'FABRIC_E_BACKUP_IS_ENABLED', + 'FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH', + 'FABRIC_E_INVALID_FOR_STATELESS_SERVICES', 'FABRIC_E_BACKUP_NOT_ENABLED', + 'FABRIC_E_BACKUP_POLICY_NOT_EXISTING', + 'FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING', + 'FABRIC_E_BACKUP_IN_PROGRESS', 'FABRIC_E_RESTORE_IN_PROGRESS', + 'FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING', + 'FABRIC_E_INVALID_SERVICE_SCALING_POLICY', 'E_INVALIDARG', + 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS', + 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND', + 'FABRIC_E_VOLUME_ALREADY_EXISTS', 'FABRIC_E_VOLUME_NOT_FOUND', + 'SerializationError', 'FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR' + :type code: str or ~azure.servicefabric.models.FabricErrorCodes + :param message: Error message. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'Code', 'type': 'str'}, + 'message': {'key': 'Message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FabricErrorError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/customSDK/servicefabric/models/fabric_error_error_py3.py b/customSDK/servicefabric/models/fabric_error_error_py3.py new file mode 100644 index 0000000..b502418 --- /dev/null +++ b/customSDK/servicefabric/models/fabric_error_error_py3.py @@ -0,0 +1,193 @@ +# 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 msrest.serialization import Model + + +class FabricErrorError(Model): + """Error object containing error code and error message. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Defines the fabric error codes that be returned as + part of the error object in response to Service Fabric API operations that + are not successful. Following are the error code values that can be + returned for a specific HTTP status code. + - Possible values of the error code for HTTP status code 400 (Bad Request) + - "FABRIC_E_INVALID_PARTITION_KEY" + - "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" + - "FABRIC_E_INVALID_ADDRESS" + - "FABRIC_E_APPLICATION_NOT_UPGRADING" + - "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" + - "FABRIC_E_FABRIC_NOT_UPGRADING" + - "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" + - "FABRIC_E_INVALID_CONFIGURATION" + - "FABRIC_E_INVALID_NAME_URI" + - "FABRIC_E_PATH_TOO_LONG" + - "FABRIC_E_KEY_TOO_LARGE" + - "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" + - "FABRIC_E_INVALID_ATOMIC_GROUP" + - "FABRIC_E_VALUE_EMPTY" + - "FABRIC_E_BACKUP_IS_ENABLED" + - "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" + - "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" + - "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" + - "E_INVALIDARG" + - Possible values of the error code for HTTP status code 404 (Not Found) + - "FABRIC_E_NODE_NOT_FOUND" + - "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" + - "FABRIC_E_APPLICATION_NOT_FOUND" + - "FABRIC_E_SERVICE_TYPE_NOT_FOUND" + - "FABRIC_E_SERVICE_DOES_NOT_EXIST" + - "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" + - "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" + - "FABRIC_E_PARTITION_NOT_FOUND" + - "FABRIC_E_REPLICA_DOES_NOT_EXIST" + - "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" + - "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" + - "FABRIC_E_DIRECTORY_NOT_FOUND" + - "FABRIC_E_FABRIC_VERSION_NOT_FOUND" + - "FABRIC_E_FILE_NOT_FOUND" + - "FABRIC_E_NAME_DOES_NOT_EXIST" + - "FABRIC_E_PROPERTY_DOES_NOT_EXIST" + - "FABRIC_E_ENUMERATION_COMPLETED" + - "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" + - "FABRIC_E_KEY_NOT_FOUND" + - "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" + - "FABRIC_E_BACKUP_NOT_ENABLED" + - "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" + - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" + - Possible values of the error code for HTTP status code 409 (Conflict) + - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" + - "FABRIC_E_APPLICATION_ALREADY_EXISTS" + - "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" + - "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" + - "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" + - "FABRIC_E_SERVICE_ALREADY_EXISTS" + - "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" + - "FABRIC_E_APPLICATION_TYPE_IN_USE" + - "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" + - "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" + - "FABRIC_E_FABRIC_VERSION_IN_USE" + - "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" + - "FABRIC_E_NAME_ALREADY_EXISTS" + - "FABRIC_E_NAME_NOT_EMPTY" + - "FABRIC_E_PROPERTY_CHECK_FAILED" + - "FABRIC_E_SERVICE_METADATA_MISMATCH" + - "FABRIC_E_SERVICE_TYPE_MISMATCH" + - "FABRIC_E_HEALTH_STALE_REPORT" + - "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" + - "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" + - "FABRIC_E_INSTANCE_ID_MISMATCH" + - "FABRIC_E_BACKUP_IN_PROGRESS" + - "FABRIC_E_RESTORE_IN_PROGRESS" + - "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" + - Possible values of the error code for HTTP status code 413 (Request + Entity Too Large) + - "FABRIC_E_VALUE_TOO_LARGE" + - Possible values of the error code for HTTP status code 500 (Internal + Server Error) + - "FABRIC_E_NODE_IS_UP" + - "E_FAIL" + - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" + - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" + - "FABRIC_E_VOLUME_ALREADY_EXISTS" + - "FABRIC_E_VOLUME_NOT_FOUND" + - "SerializationError" + - Possible values of the error code for HTTP status code 503 (Service + Unavailable) + - "FABRIC_E_NO_WRITE_QUORUM" + - "FABRIC_E_NOT_PRIMARY" + - "FABRIC_E_NOT_READY" + - "FABRIC_E_RECONFIGURATION_PENDING" + - "FABRIC_E_SERVICE_OFFLINE" + - "E_ABORT" + - "FABRIC_E_VALUE_TOO_LARGE" + - Possible values of the error code for HTTP status code 504 (Gateway + Timeout) + - "FABRIC_E_COMMUNICATION_ERROR" + - "FABRIC_E_OPERATION_NOT_COMPLETE" + - "FABRIC_E_TIMEOUT". Possible values include: + 'FABRIC_E_INVALID_PARTITION_KEY', + 'FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR', 'FABRIC_E_INVALID_ADDRESS', + 'FABRIC_E_APPLICATION_NOT_UPGRADING', + 'FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR', + 'FABRIC_E_FABRIC_NOT_UPGRADING', + 'FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR', + 'FABRIC_E_INVALID_CONFIGURATION', 'FABRIC_E_INVALID_NAME_URI', + 'FABRIC_E_PATH_TOO_LONG', 'FABRIC_E_KEY_TOO_LARGE', + 'FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED', + 'FABRIC_E_INVALID_ATOMIC_GROUP', 'FABRIC_E_VALUE_EMPTY', + 'FABRIC_E_NODE_NOT_FOUND', 'FABRIC_E_APPLICATION_TYPE_NOT_FOUND', + 'FABRIC_E_APPLICATION_NOT_FOUND', 'FABRIC_E_SERVICE_TYPE_NOT_FOUND', + 'FABRIC_E_SERVICE_DOES_NOT_EXIST', + 'FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND', + 'FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND', + 'FABRIC_E_PARTITION_NOT_FOUND', 'FABRIC_E_REPLICA_DOES_NOT_EXIST', + 'FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST', + 'FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND', + 'FABRIC_E_DIRECTORY_NOT_FOUND', 'FABRIC_E_FABRIC_VERSION_NOT_FOUND', + 'FABRIC_E_FILE_NOT_FOUND', 'FABRIC_E_NAME_DOES_NOT_EXIST', + 'FABRIC_E_PROPERTY_DOES_NOT_EXIST', 'FABRIC_E_ENUMERATION_COMPLETED', + 'FABRIC_E_SERVICE_MANIFEST_NOT_FOUND', 'FABRIC_E_KEY_NOT_FOUND', + 'FABRIC_E_HEALTH_ENTITY_NOT_FOUND', + 'FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS', + 'FABRIC_E_APPLICATION_ALREADY_EXISTS', + 'FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION', + 'FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS', + 'FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS', + 'FABRIC_E_SERVICE_ALREADY_EXISTS', + 'FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS', + 'FABRIC_E_APPLICATION_TYPE_IN_USE', + 'FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION', + 'FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS', + 'FABRIC_E_FABRIC_VERSION_IN_USE', 'FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS', + 'FABRIC_E_NAME_ALREADY_EXISTS', 'FABRIC_E_NAME_NOT_EMPTY', + 'FABRIC_E_PROPERTY_CHECK_FAILED', 'FABRIC_E_SERVICE_METADATA_MISMATCH', + 'FABRIC_E_SERVICE_TYPE_MISMATCH', 'FABRIC_E_HEALTH_STALE_REPORT', + 'FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED', + 'FABRIC_E_NODE_HAS_NOT_STOPPED_YET', 'FABRIC_E_INSTANCE_ID_MISMATCH', + 'FABRIC_E_VALUE_TOO_LARGE', 'FABRIC_E_NO_WRITE_QUORUM', + 'FABRIC_E_NOT_PRIMARY', 'FABRIC_E_NOT_READY', + 'FABRIC_E_RECONFIGURATION_PENDING', 'FABRIC_E_SERVICE_OFFLINE', 'E_ABORT', + 'FABRIC_E_COMMUNICATION_ERROR', 'FABRIC_E_OPERATION_NOT_COMPLETE', + 'FABRIC_E_TIMEOUT', 'FABRIC_E_NODE_IS_UP', 'E_FAIL', + 'FABRIC_E_BACKUP_IS_ENABLED', + 'FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH', + 'FABRIC_E_INVALID_FOR_STATELESS_SERVICES', 'FABRIC_E_BACKUP_NOT_ENABLED', + 'FABRIC_E_BACKUP_POLICY_NOT_EXISTING', + 'FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING', + 'FABRIC_E_BACKUP_IN_PROGRESS', 'FABRIC_E_RESTORE_IN_PROGRESS', + 'FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING', + 'FABRIC_E_INVALID_SERVICE_SCALING_POLICY', 'E_INVALIDARG', + 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS', + 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND', + 'FABRIC_E_VOLUME_ALREADY_EXISTS', 'FABRIC_E_VOLUME_NOT_FOUND', + 'SerializationError', 'FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR' + :type code: str or ~azure.servicefabric.models.FabricErrorCodes + :param message: Error message. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'Code', 'type': 'str'}, + 'message': {'key': 'Message', 'type': 'str'}, + } + + def __init__(self, *, code, message: str=None, **kwargs) -> None: + super(FabricErrorError, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/customSDK/servicefabric/models/fabric_error_py3.py b/customSDK/servicefabric/models/fabric_error_py3.py new file mode 100644 index 0000000..f156cc8 --- /dev/null +++ b/customSDK/servicefabric/models/fabric_error_py3.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class FabricError(Model): + """The REST API operations for Service Fabric return standard HTTP status + codes. This type defines the additional information returned from the + Service Fabric API operations that are not successful. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. Error object containing error code and error + message. + :type error: ~azure.servicefabric.models.FabricErrorError + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'Error', 'type': 'FabricErrorError'}, + } + + def __init__(self, *, error, **kwargs) -> None: + super(FabricError, self).__init__(**kwargs) + self.error = error + + +class FabricErrorException(HttpOperationError): + """Server responsed with exception of type: 'FabricError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(FabricErrorException, self).__init__(deserialize, response, 'FabricError', *args) diff --git a/customSDK/servicefabric/models/fabric_event.py b/customSDK/servicefabric/models/fabric_event.py new file mode 100644 index 0000000..6c15194 --- /dev/null +++ b/customSDK/servicefabric/models/fabric_event.py @@ -0,0 +1,62 @@ +# 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 msrest.serialization import Model + + +class FabricEvent(Model): + """Represents the base for all Fabric Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationEvent, ClusterEvent, ContainerInstanceEvent, + NodeEvent, PartitionEvent, ReplicaEvent, ServiceEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ApplicationEvent': 'ApplicationEvent', 'ClusterEvent': 'ClusterEvent', 'ContainerInstanceEvent': 'ContainerInstanceEvent', 'NodeEvent': 'NodeEvent', 'PartitionEvent': 'PartitionEvent', 'ReplicaEvent': 'ReplicaEvent', 'ServiceEvent': 'ServiceEvent'} + } + + def __init__(self, **kwargs): + super(FabricEvent, self).__init__(**kwargs) + self.event_instance_id = kwargs.get('event_instance_id', None) + self.category = kwargs.get('category', None) + self.time_stamp = kwargs.get('time_stamp', None) + self.has_correlated_events = kwargs.get('has_correlated_events', None) + self.kind = None diff --git a/customSDK/servicefabric/models/fabric_event_py3.py b/customSDK/servicefabric/models/fabric_event_py3.py new file mode 100644 index 0000000..118bce4 --- /dev/null +++ b/customSDK/servicefabric/models/fabric_event_py3.py @@ -0,0 +1,62 @@ +# 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 msrest.serialization import Model + + +class FabricEvent(Model): + """Represents the base for all Fabric Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationEvent, ClusterEvent, ContainerInstanceEvent, + NodeEvent, PartitionEvent, ReplicaEvent, ServiceEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ApplicationEvent': 'ApplicationEvent', 'ClusterEvent': 'ClusterEvent', 'ContainerInstanceEvent': 'ContainerInstanceEvent', 'NodeEvent': 'NodeEvent', 'PartitionEvent': 'PartitionEvent', 'ReplicaEvent': 'ReplicaEvent', 'ServiceEvent': 'ServiceEvent'} + } + + def __init__(self, *, event_instance_id: str, time_stamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(FabricEvent, self).__init__(**kwargs) + self.event_instance_id = event_instance_id + self.category = category + self.time_stamp = time_stamp + self.has_correlated_events = has_correlated_events + self.kind = None diff --git a/customSDK/servicefabric/models/failed_property_batch_info.py b/customSDK/servicefabric/models/failed_property_batch_info.py new file mode 100644 index 0000000..3c02124 --- /dev/null +++ b/customSDK/servicefabric/models/failed_property_batch_info.py @@ -0,0 +1,46 @@ +# 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 .property_batch_info import PropertyBatchInfo + + +class FailedPropertyBatchInfo(PropertyBatchInfo): + """Derived from PropertyBatchInfo. Represents the property batch failing. + Contains information about the specific batch failure. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param error_message: The error message of the failed operation. Describes + the exception thrown due to the first unsuccessful operation in the + property batch. + :type error_message: str + :param operation_index: The index of the unsuccessful operation in the + property batch. + :type operation_index: int + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'error_message': {'key': 'ErrorMessage', 'type': 'str'}, + 'operation_index': {'key': 'OperationIndex', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(FailedPropertyBatchInfo, self).__init__(**kwargs) + self.error_message = kwargs.get('error_message', None) + self.operation_index = kwargs.get('operation_index', None) + self.kind = 'Failed' diff --git a/customSDK/servicefabric/models/failed_property_batch_info_py3.py b/customSDK/servicefabric/models/failed_property_batch_info_py3.py new file mode 100644 index 0000000..cbfa0f9 --- /dev/null +++ b/customSDK/servicefabric/models/failed_property_batch_info_py3.py @@ -0,0 +1,46 @@ +# 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 .property_batch_info_py3 import PropertyBatchInfo + + +class FailedPropertyBatchInfo(PropertyBatchInfo): + """Derived from PropertyBatchInfo. Represents the property batch failing. + Contains information about the specific batch failure. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param error_message: The error message of the failed operation. Describes + the exception thrown due to the first unsuccessful operation in the + property batch. + :type error_message: str + :param operation_index: The index of the unsuccessful operation in the + property batch. + :type operation_index: int + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'error_message': {'key': 'ErrorMessage', 'type': 'str'}, + 'operation_index': {'key': 'OperationIndex', 'type': 'int'}, + } + + def __init__(self, *, error_message: str=None, operation_index: int=None, **kwargs) -> None: + super(FailedPropertyBatchInfo, self).__init__(**kwargs) + self.error_message = error_message + self.operation_index = operation_index + self.kind = 'Failed' diff --git a/customSDK/servicefabric/models/failed_upgrade_domain_progress_object.py b/customSDK/servicefabric/models/failed_upgrade_domain_progress_object.py new file mode 100644 index 0000000..884f3a5 --- /dev/null +++ b/customSDK/servicefabric/models/failed_upgrade_domain_progress_object.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class FailedUpgradeDomainProgressObject(Model): + """The detailed upgrade progress for nodes in the current upgrade domain at + the point of failure. + + :param domain_name: The name of the upgrade domain + :type domain_name: str + :param node_upgrade_progress_list: List of upgrading nodes and their + statuses + :type node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__(self, **kwargs): + super(FailedUpgradeDomainProgressObject, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) diff --git a/customSDK/servicefabric/models/failed_upgrade_domain_progress_object_py3.py b/customSDK/servicefabric/models/failed_upgrade_domain_progress_object_py3.py new file mode 100644 index 0000000..a7a4c99 --- /dev/null +++ b/customSDK/servicefabric/models/failed_upgrade_domain_progress_object_py3.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class FailedUpgradeDomainProgressObject(Model): + """The detailed upgrade progress for nodes in the current upgrade domain at + the point of failure. + + :param domain_name: The name of the upgrade domain + :type domain_name: str + :param node_upgrade_progress_list: List of upgrading nodes and their + statuses + :type node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: + super(FailedUpgradeDomainProgressObject, self).__init__(**kwargs) + self.domain_name = domain_name + self.node_upgrade_progress_list = node_upgrade_progress_list diff --git a/customSDK/servicefabric/models/failure_upgrade_domain_progress_info.py b/customSDK/servicefabric/models/failure_upgrade_domain_progress_info.py new file mode 100644 index 0000000..81f565f --- /dev/null +++ b/customSDK/servicefabric/models/failure_upgrade_domain_progress_info.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class FailureUpgradeDomainProgressInfo(Model): + """Information about the upgrade domain progress at the time of upgrade + failure. + + :param domain_name: The name of the upgrade domain + :type domain_name: str + :param node_upgrade_progress_list: List of upgrading nodes and their + statuses + :type node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__(self, **kwargs): + super(FailureUpgradeDomainProgressInfo, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) diff --git a/customSDK/servicefabric/models/failure_upgrade_domain_progress_info_py3.py b/customSDK/servicefabric/models/failure_upgrade_domain_progress_info_py3.py new file mode 100644 index 0000000..1ab6671 --- /dev/null +++ b/customSDK/servicefabric/models/failure_upgrade_domain_progress_info_py3.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class FailureUpgradeDomainProgressInfo(Model): + """Information about the upgrade domain progress at the time of upgrade + failure. + + :param domain_name: The name of the upgrade domain + :type domain_name: str + :param node_upgrade_progress_list: List of upgrading nodes and their + statuses + :type node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: + super(FailureUpgradeDomainProgressInfo, self).__init__(**kwargs) + self.domain_name = domain_name + self.node_upgrade_progress_list = node_upgrade_progress_list diff --git a/customSDK/servicefabric/models/file_info.py b/customSDK/servicefabric/models/file_info.py new file mode 100644 index 0000000..7c3ae99 --- /dev/null +++ b/customSDK/servicefabric/models/file_info.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class FileInfo(Model): + """Information about a image store file. + + :param file_size: The size of file in bytes. + :type file_size: str + :param file_version: Information about the version of image store file. + :type file_version: ~azure.servicefabric.models.FileVersion + :param modified_date: The date and time when the image store file was last + modified. + :type modified_date: datetime + :param store_relative_path: The file path relative to the image store root + path. + :type store_relative_path: str + """ + + _attribute_map = { + 'file_size': {'key': 'FileSize', 'type': 'str'}, + 'file_version': {'key': 'FileVersion', 'type': 'FileVersion'}, + 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FileInfo, self).__init__(**kwargs) + self.file_size = kwargs.get('file_size', None) + self.file_version = kwargs.get('file_version', None) + self.modified_date = kwargs.get('modified_date', None) + self.store_relative_path = kwargs.get('store_relative_path', None) diff --git a/customSDK/servicefabric/models/file_info_py3.py b/customSDK/servicefabric/models/file_info_py3.py new file mode 100644 index 0000000..1ac3bd5 --- /dev/null +++ b/customSDK/servicefabric/models/file_info_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class FileInfo(Model): + """Information about a image store file. + + :param file_size: The size of file in bytes. + :type file_size: str + :param file_version: Information about the version of image store file. + :type file_version: ~azure.servicefabric.models.FileVersion + :param modified_date: The date and time when the image store file was last + modified. + :type modified_date: datetime + :param store_relative_path: The file path relative to the image store root + path. + :type store_relative_path: str + """ + + _attribute_map = { + 'file_size': {'key': 'FileSize', 'type': 'str'}, + 'file_version': {'key': 'FileVersion', 'type': 'FileVersion'}, + 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + } + + def __init__(self, *, file_size: str=None, file_version=None, modified_date=None, store_relative_path: str=None, **kwargs) -> None: + super(FileInfo, self).__init__(**kwargs) + self.file_size = file_size + self.file_version = file_version + self.modified_date = modified_date + self.store_relative_path = store_relative_path diff --git a/customSDK/servicefabric/models/file_share_backup_storage_description.py b/customSDK/servicefabric/models/file_share_backup_storage_description.py new file mode 100644 index 0000000..3c96d9b --- /dev/null +++ b/customSDK/servicefabric/models/file_share_backup_storage_description.py @@ -0,0 +1,60 @@ +# 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 .backup_storage_description import BackupStorageDescription + + +class FileShareBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for file share storage used for storing or + enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param path: Required. UNC path of the file share where to store or + enumerate backups from. + :type path: str + :param primary_user_name: Primary user name to access the file share. + :type primary_user_name: str + :param primary_password: Primary password to access the share location. + :type primary_password: str + :param secondary_user_name: Secondary user name to access the file share. + :type secondary_user_name: str + :param secondary_password: Secondary password to access the share location + :type secondary_password: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'path': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'path': {'key': 'Path', 'type': 'str'}, + 'primary_user_name': {'key': 'PrimaryUserName', 'type': 'str'}, + 'primary_password': {'key': 'PrimaryPassword', 'type': 'str'}, + 'secondary_user_name': {'key': 'SecondaryUserName', 'type': 'str'}, + 'secondary_password': {'key': 'SecondaryPassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FileShareBackupStorageDescription, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.primary_user_name = kwargs.get('primary_user_name', None) + self.primary_password = kwargs.get('primary_password', None) + self.secondary_user_name = kwargs.get('secondary_user_name', None) + self.secondary_password = kwargs.get('secondary_password', None) + self.storage_kind = 'FileShare' diff --git a/customSDK/servicefabric/models/file_share_backup_storage_description_py3.py b/customSDK/servicefabric/models/file_share_backup_storage_description_py3.py new file mode 100644 index 0000000..ec9cc25 --- /dev/null +++ b/customSDK/servicefabric/models/file_share_backup_storage_description_py3.py @@ -0,0 +1,60 @@ +# 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 .backup_storage_description_py3 import BackupStorageDescription + + +class FileShareBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for file share storage used for storing or + enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param path: Required. UNC path of the file share where to store or + enumerate backups from. + :type path: str + :param primary_user_name: Primary user name to access the file share. + :type primary_user_name: str + :param primary_password: Primary password to access the share location. + :type primary_password: str + :param secondary_user_name: Secondary user name to access the file share. + :type secondary_user_name: str + :param secondary_password: Secondary password to access the share location + :type secondary_password: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'path': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'path': {'key': 'Path', 'type': 'str'}, + 'primary_user_name': {'key': 'PrimaryUserName', 'type': 'str'}, + 'primary_password': {'key': 'PrimaryPassword', 'type': 'str'}, + 'secondary_user_name': {'key': 'SecondaryUserName', 'type': 'str'}, + 'secondary_password': {'key': 'SecondaryPassword', 'type': 'str'}, + } + + def __init__(self, *, path: str, friendly_name: str=None, primary_user_name: str=None, primary_password: str=None, secondary_user_name: str=None, secondary_password: str=None, **kwargs) -> None: + super(FileShareBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) + self.path = path + self.primary_user_name = primary_user_name + self.primary_password = primary_password + self.secondary_user_name = secondary_user_name + self.secondary_password = secondary_password + self.storage_kind = 'FileShare' diff --git a/customSDK/servicefabric/models/file_version.py b/customSDK/servicefabric/models/file_version.py new file mode 100644 index 0000000..c1f479c --- /dev/null +++ b/customSDK/servicefabric/models/file_version.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class FileVersion(Model): + """Information about the version of image store file. + + :param version_number: The current image store version number for the file + is used in image store for checking whether it need to be updated. + :type version_number: str + :param epoch_data_loss_number: The epoch data loss number of image store + replica when this file entry was updated or created. + :type epoch_data_loss_number: str + :param epoch_configuration_number: The epoch configuration version number + of the image store replica when this file entry was created or updated. + :type epoch_configuration_number: str + """ + + _attribute_map = { + 'version_number': {'key': 'VersionNumber', 'type': 'str'}, + 'epoch_data_loss_number': {'key': 'EpochDataLossNumber', 'type': 'str'}, + 'epoch_configuration_number': {'key': 'EpochConfigurationNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FileVersion, self).__init__(**kwargs) + self.version_number = kwargs.get('version_number', None) + self.epoch_data_loss_number = kwargs.get('epoch_data_loss_number', None) + self.epoch_configuration_number = kwargs.get('epoch_configuration_number', None) diff --git a/customSDK/servicefabric/models/file_version_py3.py b/customSDK/servicefabric/models/file_version_py3.py new file mode 100644 index 0000000..6507344 --- /dev/null +++ b/customSDK/servicefabric/models/file_version_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class FileVersion(Model): + """Information about the version of image store file. + + :param version_number: The current image store version number for the file + is used in image store for checking whether it need to be updated. + :type version_number: str + :param epoch_data_loss_number: The epoch data loss number of image store + replica when this file entry was updated or created. + :type epoch_data_loss_number: str + :param epoch_configuration_number: The epoch configuration version number + of the image store replica when this file entry was created or updated. + :type epoch_configuration_number: str + """ + + _attribute_map = { + 'version_number': {'key': 'VersionNumber', 'type': 'str'}, + 'epoch_data_loss_number': {'key': 'EpochDataLossNumber', 'type': 'str'}, + 'epoch_configuration_number': {'key': 'EpochConfigurationNumber', 'type': 'str'}, + } + + def __init__(self, *, version_number: str=None, epoch_data_loss_number: str=None, epoch_configuration_number: str=None, **kwargs) -> None: + super(FileVersion, self).__init__(**kwargs) + self.version_number = version_number + self.epoch_data_loss_number = epoch_data_loss_number + self.epoch_configuration_number = epoch_configuration_number diff --git a/customSDK/servicefabric/models/folder_info.py b/customSDK/servicefabric/models/folder_info.py new file mode 100644 index 0000000..7211b28 --- /dev/null +++ b/customSDK/servicefabric/models/folder_info.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class FolderInfo(Model): + """Information about a image store folder. It includes how many files this + folder contains and its image store relative path. + + :param store_relative_path: The remote location within image store. This + path is relative to the image store root. + :type store_relative_path: str + :param file_count: The number of files from within the image store folder. + :type file_count: str + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'file_count': {'key': 'FileCount', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FolderInfo, self).__init__(**kwargs) + self.store_relative_path = kwargs.get('store_relative_path', None) + self.file_count = kwargs.get('file_count', None) diff --git a/customSDK/servicefabric/models/folder_info_py3.py b/customSDK/servicefabric/models/folder_info_py3.py new file mode 100644 index 0000000..2027d91 --- /dev/null +++ b/customSDK/servicefabric/models/folder_info_py3.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class FolderInfo(Model): + """Information about a image store folder. It includes how many files this + folder contains and its image store relative path. + + :param store_relative_path: The remote location within image store. This + path is relative to the image store root. + :type store_relative_path: str + :param file_count: The number of files from within the image store folder. + :type file_count: str + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'file_count': {'key': 'FileCount', 'type': 'str'}, + } + + def __init__(self, *, store_relative_path: str=None, file_count: str=None, **kwargs) -> None: + super(FolderInfo, self).__init__(**kwargs) + self.store_relative_path = store_relative_path + self.file_count = file_count diff --git a/customSDK/servicefabric/models/folder_size_info.py b/customSDK/servicefabric/models/folder_size_info.py new file mode 100644 index 0000000..28ac478 --- /dev/null +++ b/customSDK/servicefabric/models/folder_size_info.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class FolderSizeInfo(Model): + """Information of a image store folder size. + + :param store_relative_path: The remote location within image store. This + path is relative to the image store root. + :type store_relative_path: str + :param folder_size: The size of folder in bytes. + :type folder_size: str + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'folder_size': {'key': 'FolderSize', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FolderSizeInfo, self).__init__(**kwargs) + self.store_relative_path = kwargs.get('store_relative_path', None) + self.folder_size = kwargs.get('folder_size', None) diff --git a/customSDK/servicefabric/models/folder_size_info_py3.py b/customSDK/servicefabric/models/folder_size_info_py3.py new file mode 100644 index 0000000..018dce3 --- /dev/null +++ b/customSDK/servicefabric/models/folder_size_info_py3.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class FolderSizeInfo(Model): + """Information of a image store folder size. + + :param store_relative_path: The remote location within image store. This + path is relative to the image store root. + :type store_relative_path: str + :param folder_size: The size of folder in bytes. + :type folder_size: str + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'folder_size': {'key': 'FolderSize', 'type': 'str'}, + } + + def __init__(self, *, store_relative_path: str=None, folder_size: str=None, **kwargs) -> None: + super(FolderSizeInfo, self).__init__(**kwargs) + self.store_relative_path = store_relative_path + self.folder_size = folder_size diff --git a/customSDK/servicefabric/models/frequency_based_backup_schedule_description.py b/customSDK/servicefabric/models/frequency_based_backup_schedule_description.py new file mode 100644 index 0000000..c9429cd --- /dev/null +++ b/customSDK/servicefabric/models/frequency_based_backup_schedule_description.py @@ -0,0 +1,41 @@ +# 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 .backup_schedule_description import BackupScheduleDescription + + +class FrequencyBasedBackupScheduleDescription(BackupScheduleDescription): + """Describes the frequency based backup schedule. + + All required parameters must be populated in order to send to Azure. + + :param schedule_kind: Required. Constant filled by server. + :type schedule_kind: str + :param interval: Required. Defines the interval with which backups are + periodically taken. It should be specified in ISO8601 format. Timespan in + seconds is not supported and will be ignored while creating the policy. + :type interval: timedelta + """ + + _validation = { + 'schedule_kind': {'required': True}, + 'interval': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + 'interval': {'key': 'Interval', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(FrequencyBasedBackupScheduleDescription, self).__init__(**kwargs) + self.interval = kwargs.get('interval', None) + self.schedule_kind = 'FrequencyBased' diff --git a/customSDK/servicefabric/models/frequency_based_backup_schedule_description_py3.py b/customSDK/servicefabric/models/frequency_based_backup_schedule_description_py3.py new file mode 100644 index 0000000..8b8e662 --- /dev/null +++ b/customSDK/servicefabric/models/frequency_based_backup_schedule_description_py3.py @@ -0,0 +1,41 @@ +# 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 .backup_schedule_description_py3 import BackupScheduleDescription + + +class FrequencyBasedBackupScheduleDescription(BackupScheduleDescription): + """Describes the frequency based backup schedule. + + All required parameters must be populated in order to send to Azure. + + :param schedule_kind: Required. Constant filled by server. + :type schedule_kind: str + :param interval: Required. Defines the interval with which backups are + periodically taken. It should be specified in ISO8601 format. Timespan in + seconds is not supported and will be ignored while creating the policy. + :type interval: timedelta + """ + + _validation = { + 'schedule_kind': {'required': True}, + 'interval': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + 'interval': {'key': 'Interval', 'type': 'duration'}, + } + + def __init__(self, *, interval, **kwargs) -> None: + super(FrequencyBasedBackupScheduleDescription, self).__init__(**kwargs) + self.interval = interval + self.schedule_kind = 'FrequencyBased' diff --git a/customSDK/servicefabric/models/gateway_destination.py b/customSDK/servicefabric/models/gateway_destination.py new file mode 100644 index 0000000..5c21627 --- /dev/null +++ b/customSDK/servicefabric/models/gateway_destination.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class GatewayDestination(Model): + """Describes destination endpoint for routing traffic. + + All required parameters must be populated in order to send to Azure. + + :param application_name: Required. Name of the service fabric Mesh + application. + :type application_name: str + :param service_name: Required. service that contains the endpoint. + :type service_name: str + :param endpoint_name: Required. name of the endpoint in the service. + :type endpoint_name: str + """ + + _validation = { + 'application_name': {'required': True}, + 'service_name': {'required': True}, + 'endpoint_name': {'required': True}, + } + + _attribute_map = { + 'application_name': {'key': 'applicationName', 'type': 'str'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GatewayDestination, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.service_name = kwargs.get('service_name', None) + self.endpoint_name = kwargs.get('endpoint_name', None) diff --git a/customSDK/servicefabric/models/gateway_destination_py3.py b/customSDK/servicefabric/models/gateway_destination_py3.py new file mode 100644 index 0000000..7819e3e --- /dev/null +++ b/customSDK/servicefabric/models/gateway_destination_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class GatewayDestination(Model): + """Describes destination endpoint for routing traffic. + + All required parameters must be populated in order to send to Azure. + + :param application_name: Required. Name of the service fabric Mesh + application. + :type application_name: str + :param service_name: Required. service that contains the endpoint. + :type service_name: str + :param endpoint_name: Required. name of the endpoint in the service. + :type endpoint_name: str + """ + + _validation = { + 'application_name': {'required': True}, + 'service_name': {'required': True}, + 'endpoint_name': {'required': True}, + } + + _attribute_map = { + 'application_name': {'key': 'applicationName', 'type': 'str'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, + } + + def __init__(self, *, application_name: str, service_name: str, endpoint_name: str, **kwargs) -> None: + super(GatewayDestination, self).__init__(**kwargs) + self.application_name = application_name + self.service_name = service_name + self.endpoint_name = endpoint_name diff --git a/customSDK/servicefabric/models/gateway_resource_description.py b/customSDK/servicefabric/models/gateway_resource_description.py new file mode 100644 index 0000000..ad9d4e3 --- /dev/null +++ b/customSDK/servicefabric/models/gateway_resource_description.py @@ -0,0 +1,79 @@ +# 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 msrest.serialization import Model + + +class GatewayResourceDescription(Model): + """This type describes a gateway resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Gateway resource. + :type name: str + :param description: User readable description of the gateway. + :type description: str + :param source_network: Required. Network the gateway should listen on for + requests. + :type source_network: ~azure.servicefabric.models.NetworkRef + :param destination_network: Required. Network that the Application is + using. + :type destination_network: ~azure.servicefabric.models.NetworkRef + :param tcp: Configuration for tcp connectivity for this gateway. + :type tcp: list[~azure.servicefabric.models.TcpConfig] + :param http: Configuration for http connectivity for this gateway. + :type http: list[~azure.servicefabric.models.HttpConfig] + :ivar status: Status of the resource. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the gateway. + :vartype status_details: str + :ivar ip_address: IP address of the gateway. This is populated in the + response and is ignored for incoming requests. + :vartype ip_address: str + """ + + _validation = { + 'name': {'required': True}, + 'source_network': {'required': True}, + 'destination_network': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'ip_address': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'source_network': {'key': 'properties.sourceNetwork', 'type': 'NetworkRef'}, + 'destination_network': {'key': 'properties.destinationNetwork', 'type': 'NetworkRef'}, + 'tcp': {'key': 'properties.tcp', 'type': '[TcpConfig]'}, + 'http': {'key': 'properties.http', 'type': '[HttpConfig]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GatewayResourceDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.source_network = kwargs.get('source_network', None) + self.destination_network = kwargs.get('destination_network', None) + self.tcp = kwargs.get('tcp', None) + self.http = kwargs.get('http', None) + self.status = None + self.status_details = None + self.ip_address = None diff --git a/customSDK/servicefabric/models/gateway_resource_description_py3.py b/customSDK/servicefabric/models/gateway_resource_description_py3.py new file mode 100644 index 0000000..ddc77ad --- /dev/null +++ b/customSDK/servicefabric/models/gateway_resource_description_py3.py @@ -0,0 +1,79 @@ +# 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 msrest.serialization import Model + + +class GatewayResourceDescription(Model): + """This type describes a gateway resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Gateway resource. + :type name: str + :param description: User readable description of the gateway. + :type description: str + :param source_network: Required. Network the gateway should listen on for + requests. + :type source_network: ~azure.servicefabric.models.NetworkRef + :param destination_network: Required. Network that the Application is + using. + :type destination_network: ~azure.servicefabric.models.NetworkRef + :param tcp: Configuration for tcp connectivity for this gateway. + :type tcp: list[~azure.servicefabric.models.TcpConfig] + :param http: Configuration for http connectivity for this gateway. + :type http: list[~azure.servicefabric.models.HttpConfig] + :ivar status: Status of the resource. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the gateway. + :vartype status_details: str + :ivar ip_address: IP address of the gateway. This is populated in the + response and is ignored for incoming requests. + :vartype ip_address: str + """ + + _validation = { + 'name': {'required': True}, + 'source_network': {'required': True}, + 'destination_network': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'ip_address': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'source_network': {'key': 'properties.sourceNetwork', 'type': 'NetworkRef'}, + 'destination_network': {'key': 'properties.destinationNetwork', 'type': 'NetworkRef'}, + 'tcp': {'key': 'properties.tcp', 'type': '[TcpConfig]'}, + 'http': {'key': 'properties.http', 'type': '[HttpConfig]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + } + + def __init__(self, *, name: str, source_network, destination_network, description: str=None, tcp=None, http=None, **kwargs) -> None: + super(GatewayResourceDescription, self).__init__(**kwargs) + self.name = name + self.description = description + self.source_network = source_network + self.destination_network = destination_network + self.tcp = tcp + self.http = http + self.status = None + self.status_details = None + self.ip_address = None diff --git a/customSDK/servicefabric/models/get_backup_by_storage_query_description.py b/customSDK/servicefabric/models/get_backup_by_storage_query_description.py new file mode 100644 index 0000000..5b2eb4e --- /dev/null +++ b/customSDK/servicefabric/models/get_backup_by_storage_query_description.py @@ -0,0 +1,64 @@ +# 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 msrest.serialization import Model + + +class GetBackupByStorageQueryDescription(Model): + """Describes additional filters to be applied, while listing backups, and + backup storage details from where to fetch the backups. + + All required parameters must be populated in order to send to Azure. + + :param start_date_time_filter: Specifies the start date time in ISO8601 + from which to enumerate backups. If not specified, backups are enumerated + from the beginning. + :type start_date_time_filter: datetime + :param end_date_time_filter: Specifies the end date time in ISO8601 till + which to enumerate backups. If not specified, backups are enumerated till + the end. + :type end_date_time_filter: datetime + :param latest: If specified as true, gets the most recent backup (within + the specified time range) for every partition under the specified backup + entity. Default value: False . + :type latest: bool + :param storage: Required. Describes the parameters for the backup storage + from where to enumerate backups. This is optional and by default backups + are enumerated from the backup storage where this backup entity is + currently being backed up (as specified in backup policy). This parameter + is useful to be able to enumerate backups from another cluster where you + may intend to restore. + :type storage: ~azure.servicefabric.models.BackupStorageDescription + :param backup_entity: Required. Indicates the entity for which to + enumerate backups. + :type backup_entity: ~azure.servicefabric.models.BackupEntity + """ + + _validation = { + 'storage': {'required': True}, + 'backup_entity': {'required': True}, + } + + _attribute_map = { + 'start_date_time_filter': {'key': 'StartDateTimeFilter', 'type': 'iso-8601'}, + 'end_date_time_filter': {'key': 'EndDateTimeFilter', 'type': 'iso-8601'}, + 'latest': {'key': 'Latest', 'type': 'bool'}, + 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, + 'backup_entity': {'key': 'BackupEntity', 'type': 'BackupEntity'}, + } + + def __init__(self, **kwargs): + super(GetBackupByStorageQueryDescription, self).__init__(**kwargs) + self.start_date_time_filter = kwargs.get('start_date_time_filter', None) + self.end_date_time_filter = kwargs.get('end_date_time_filter', None) + self.latest = kwargs.get('latest', False) + self.storage = kwargs.get('storage', None) + self.backup_entity = kwargs.get('backup_entity', None) diff --git a/customSDK/servicefabric/models/get_backup_by_storage_query_description_py3.py b/customSDK/servicefabric/models/get_backup_by_storage_query_description_py3.py new file mode 100644 index 0000000..5ad96e0 --- /dev/null +++ b/customSDK/servicefabric/models/get_backup_by_storage_query_description_py3.py @@ -0,0 +1,64 @@ +# 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 msrest.serialization import Model + + +class GetBackupByStorageQueryDescription(Model): + """Describes additional filters to be applied, while listing backups, and + backup storage details from where to fetch the backups. + + All required parameters must be populated in order to send to Azure. + + :param start_date_time_filter: Specifies the start date time in ISO8601 + from which to enumerate backups. If not specified, backups are enumerated + from the beginning. + :type start_date_time_filter: datetime + :param end_date_time_filter: Specifies the end date time in ISO8601 till + which to enumerate backups. If not specified, backups are enumerated till + the end. + :type end_date_time_filter: datetime + :param latest: If specified as true, gets the most recent backup (within + the specified time range) for every partition under the specified backup + entity. Default value: False . + :type latest: bool + :param storage: Required. Describes the parameters for the backup storage + from where to enumerate backups. This is optional and by default backups + are enumerated from the backup storage where this backup entity is + currently being backed up (as specified in backup policy). This parameter + is useful to be able to enumerate backups from another cluster where you + may intend to restore. + :type storage: ~azure.servicefabric.models.BackupStorageDescription + :param backup_entity: Required. Indicates the entity for which to + enumerate backups. + :type backup_entity: ~azure.servicefabric.models.BackupEntity + """ + + _validation = { + 'storage': {'required': True}, + 'backup_entity': {'required': True}, + } + + _attribute_map = { + 'start_date_time_filter': {'key': 'StartDateTimeFilter', 'type': 'iso-8601'}, + 'end_date_time_filter': {'key': 'EndDateTimeFilter', 'type': 'iso-8601'}, + 'latest': {'key': 'Latest', 'type': 'bool'}, + 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, + 'backup_entity': {'key': 'BackupEntity', 'type': 'BackupEntity'}, + } + + def __init__(self, *, storage, backup_entity, start_date_time_filter=None, end_date_time_filter=None, latest: bool=False, **kwargs) -> None: + super(GetBackupByStorageQueryDescription, self).__init__(**kwargs) + self.start_date_time_filter = start_date_time_filter + self.end_date_time_filter = end_date_time_filter + self.latest = latest + self.storage = storage + self.backup_entity = backup_entity diff --git a/customSDK/servicefabric/models/get_property_batch_operation.py b/customSDK/servicefabric/models/get_property_batch_operation.py new file mode 100644 index 0000000..d6f7784 --- /dev/null +++ b/customSDK/servicefabric/models/get_property_batch_operation.py @@ -0,0 +1,48 @@ +# 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 .property_batch_operation import PropertyBatchOperation + + +class GetPropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that gets the specified property if it + exists. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param include_value: Whether or not to return the property value with the + metadata. + True if values should be returned with the metadata; False to return only + property metadata. Default value: False . + :type include_value: bool + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'include_value': {'key': 'IncludeValue', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(GetPropertyBatchOperation, self).__init__(**kwargs) + self.include_value = kwargs.get('include_value', False) + self.kind = 'Get' diff --git a/customSDK/servicefabric/models/get_property_batch_operation_py3.py b/customSDK/servicefabric/models/get_property_batch_operation_py3.py new file mode 100644 index 0000000..19b781a --- /dev/null +++ b/customSDK/servicefabric/models/get_property_batch_operation_py3.py @@ -0,0 +1,48 @@ +# 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 .property_batch_operation_py3 import PropertyBatchOperation + + +class GetPropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that gets the specified property if it + exists. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param include_value: Whether or not to return the property value with the + metadata. + True if values should be returned with the metadata; False to return only + property metadata. Default value: False . + :type include_value: bool + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'include_value': {'key': 'IncludeValue', 'type': 'bool'}, + } + + def __init__(self, *, property_name: str, include_value: bool=False, **kwargs) -> None: + super(GetPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.include_value = include_value + self.kind = 'Get' diff --git a/customSDK/servicefabric/models/guid_property_value.py b/customSDK/servicefabric/models/guid_property_value.py new file mode 100644 index 0000000..80b52cc --- /dev/null +++ b/customSDK/servicefabric/models/guid_property_value.py @@ -0,0 +1,39 @@ +# 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 .property_value import PropertyValue + + +class GuidPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Guid. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. The data of the property value. + :type data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GuidPropertyValue, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.kind = 'Guid' diff --git a/customSDK/servicefabric/models/guid_property_value_py3.py b/customSDK/servicefabric/models/guid_property_value_py3.py new file mode 100644 index 0000000..9989c33 --- /dev/null +++ b/customSDK/servicefabric/models/guid_property_value_py3.py @@ -0,0 +1,39 @@ +# 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 .property_value_py3 import PropertyValue + + +class GuidPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Guid. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. The data of the property value. + :type data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__(self, *, data: str, **kwargs) -> None: + super(GuidPropertyValue, self).__init__(**kwargs) + self.data = data + self.kind = 'Guid' diff --git a/customSDK/servicefabric/models/health_evaluation.py b/customSDK/servicefabric/models/health_evaluation.py new file mode 100644 index 0000000..23fbb1a --- /dev/null +++ b/customSDK/servicefabric/models/health_evaluation.py @@ -0,0 +1,66 @@ +# 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 msrest.serialization import Model + + +class HealthEvaluation(Model): + """Represents a health evaluation which describes the data and the algorithm + used by health manager to evaluate the health of an entity. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationHealthEvaluation, ApplicationsHealthEvaluation, + ApplicationTypeApplicationsHealthEvaluation, + DeltaNodesCheckHealthEvaluation, DeployedApplicationHealthEvaluation, + DeployedApplicationsHealthEvaluation, + DeployedServicePackageHealthEvaluation, + DeployedServicePackagesHealthEvaluation, EventHealthEvaluation, + NodeHealthEvaluation, NodesHealthEvaluation, PartitionHealthEvaluation, + PartitionsHealthEvaluation, ReplicaHealthEvaluation, + ReplicasHealthEvaluation, ServiceHealthEvaluation, + ServicesHealthEvaluation, SystemApplicationHealthEvaluation, + UpgradeDomainDeltaNodesCheckHealthEvaluation, + UpgradeDomainNodesHealthEvaluation, NodeTypeNodesHealthEvaluation + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Application': 'ApplicationHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation', 'NodeTypeNodes': 'NodeTypeNodesHealthEvaluation'} + } + + def __init__(self, **kwargs): + super(HealthEvaluation, self).__init__(**kwargs) + self.aggregated_health_state = kwargs.get('aggregated_health_state', None) + self.description = kwargs.get('description', None) + self.kind = None diff --git a/customSDK/servicefabric/models/health_evaluation_py3.py b/customSDK/servicefabric/models/health_evaluation_py3.py new file mode 100644 index 0000000..a370644 --- /dev/null +++ b/customSDK/servicefabric/models/health_evaluation_py3.py @@ -0,0 +1,66 @@ +# 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 msrest.serialization import Model + + +class HealthEvaluation(Model): + """Represents a health evaluation which describes the data and the algorithm + used by health manager to evaluate the health of an entity. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationHealthEvaluation, ApplicationsHealthEvaluation, + ApplicationTypeApplicationsHealthEvaluation, + DeltaNodesCheckHealthEvaluation, DeployedApplicationHealthEvaluation, + DeployedApplicationsHealthEvaluation, + DeployedServicePackageHealthEvaluation, + DeployedServicePackagesHealthEvaluation, EventHealthEvaluation, + NodeHealthEvaluation, NodesHealthEvaluation, PartitionHealthEvaluation, + PartitionsHealthEvaluation, ReplicaHealthEvaluation, + ReplicasHealthEvaluation, ServiceHealthEvaluation, + ServicesHealthEvaluation, SystemApplicationHealthEvaluation, + UpgradeDomainDeltaNodesCheckHealthEvaluation, + UpgradeDomainNodesHealthEvaluation, NodeTypeNodesHealthEvaluation + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Application': 'ApplicationHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation', 'NodeTypeNodes': 'NodeTypeNodesHealthEvaluation'} + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, **kwargs) -> None: + super(HealthEvaluation, self).__init__(**kwargs) + self.aggregated_health_state = aggregated_health_state + self.description = description + self.kind = None diff --git a/customSDK/servicefabric/models/health_evaluation_wrapper.py b/customSDK/servicefabric/models/health_evaluation_wrapper.py new file mode 100644 index 0000000..9bb8fab --- /dev/null +++ b/customSDK/servicefabric/models/health_evaluation_wrapper.py @@ -0,0 +1,30 @@ +# 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 msrest.serialization import Model + + +class HealthEvaluationWrapper(Model): + """Wrapper object for health evaluation. + + :param health_evaluation: Represents a health evaluation which describes + the data and the algorithm used by health manager to evaluate the health + of an entity. + :type health_evaluation: ~azure.servicefabric.models.HealthEvaluation + """ + + _attribute_map = { + 'health_evaluation': {'key': 'HealthEvaluation', 'type': 'HealthEvaluation'}, + } + + def __init__(self, **kwargs): + super(HealthEvaluationWrapper, self).__init__(**kwargs) + self.health_evaluation = kwargs.get('health_evaluation', None) diff --git a/customSDK/servicefabric/models/health_evaluation_wrapper_py3.py b/customSDK/servicefabric/models/health_evaluation_wrapper_py3.py new file mode 100644 index 0000000..b18ee71 --- /dev/null +++ b/customSDK/servicefabric/models/health_evaluation_wrapper_py3.py @@ -0,0 +1,30 @@ +# 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 msrest.serialization import Model + + +class HealthEvaluationWrapper(Model): + """Wrapper object for health evaluation. + + :param health_evaluation: Represents a health evaluation which describes + the data and the algorithm used by health manager to evaluate the health + of an entity. + :type health_evaluation: ~azure.servicefabric.models.HealthEvaluation + """ + + _attribute_map = { + 'health_evaluation': {'key': 'HealthEvaluation', 'type': 'HealthEvaluation'}, + } + + def __init__(self, *, health_evaluation=None, **kwargs) -> None: + super(HealthEvaluationWrapper, self).__init__(**kwargs) + self.health_evaluation = health_evaluation diff --git a/customSDK/servicefabric/models/health_event.py b/customSDK/servicefabric/models/health_event.py new file mode 100644 index 0000000..4575acd --- /dev/null +++ b/customSDK/servicefabric/models/health_event.py @@ -0,0 +1,163 @@ +# 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 .health_information import HealthInformation + + +class HealthEvent(HealthInformation): + """Represents health information reported on a health entity, such as cluster, + application or node, with additional metadata added by the Health Manager. + + All required parameters must be populated in order to send to Azure. + + :param source_id: Required. The source name that identifies the + client/watchdog/system component that generated the health information. + :type source_id: str + :param property: Required. The property of the health information. An + entity can have health reports for different properties. + The property is a string and not a fixed enumeration to allow the reporter + flexibility to categorize the state condition that triggers the report. + For example, a reporter with SourceId "LocalWatchdog" can monitor the + state of the available disk on a node, + so it can report "AvailableDisk" property on that node. + The same reporter can monitor the node connectivity, so it can report a + property "Connectivity" on the same node. + In the health store, these reports are treated as separate health events + for the specified node. + Together with the SourceId, the property uniquely identifies the health + information. + :type property: str + :param health_state: Required. The health state of a Service Fabric entity + such as Cluster, Node, Application, Service, Partition, Replica etc. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param time_to_live_in_milli_seconds: The duration for which this health + report is valid. This field uses ISO8601 format for specifying the + duration. + When clients report periodically, they should send reports with higher + frequency than time to live. + If clients report on transition, they can set the time to live to + infinite. + When time to live expires, the health event that contains the health + information + is either removed from health store, if RemoveWhenExpired is true, or + evaluated at error, if RemoveWhenExpired false. + If not specified, time to live defaults to infinite value. + :type time_to_live_in_milli_seconds: timedelta + :param description: The description of the health information. It + represents free text used to add human readable information about the + report. + The maximum string length for the description is 4096 characters. + If the provided string is longer, it will be automatically truncated. + When truncated, the last characters of the description contain a marker + "[Truncated]", and total string size is 4096 characters. + The presence of the marker indicates to users that truncation occurred. + Note that when truncated, the description has less than 4096 characters + from the original string. + :type description: str + :param sequence_number: The sequence number for this health report as a + numeric string. + The report sequence number is used by the health store to detect stale + reports. + If not specified, a sequence number is auto-generated by the health client + when a report is added. + :type sequence_number: str + :param remove_when_expired: Value that indicates whether the report is + removed from health store when it expires. + If set to true, the report is removed from the health store after it + expires. + If set to false, the report is treated as an error when expired. The value + of this property is false by default. + When clients report periodically, they should set RemoveWhenExpired false + (default). + This way, if the reporter has issues (e.g. deadlock) and can't report, the + entity is evaluated at error when the health report expires. + This flags the entity as being in Error health state. + :type remove_when_expired: bool + :param health_report_id: A health report ID which identifies the health + report and can be used to find more detailed information about a specific + health event at + aka.ms/sfhealthid + :type health_report_id: str + :param is_expired: Returns true if the health event is expired, otherwise + false. + :type is_expired: bool + :param source_utc_timestamp: The date and time when the health report was + sent by the source. + :type source_utc_timestamp: datetime + :param last_modified_utc_timestamp: The date and time when the health + report was last modified by the health store. + :type last_modified_utc_timestamp: datetime + :param last_ok_transition_at: If the current health state is 'Ok', this + property returns the time at which the health report was first reported + with 'Ok'. + For periodic reporting, many reports with the same state may have been + generated. + This property returns the date and time when the first 'Ok' health report + was received. + If the current health state is 'Error' or 'Warning', returns the date and + time at which the health state was last in 'Ok', before transitioning to a + different state. + If the health state was never 'Ok', the value will be zero date-time. + :type last_ok_transition_at: datetime + :param last_warning_transition_at: If the current health state is + 'Warning', this property returns the time at which the health report was + first reported with 'Warning'. For periodic reporting, many reports with + the same state may have been generated however, this property returns only + the date and time at the first 'Warning' health report was received. + If the current health state is 'Ok' or 'Error', returns the date and time + at which the health state was last in 'Warning', before transitioning to a + different state. + If the health state was never 'Warning', the value will be zero date-time. + :type last_warning_transition_at: datetime + :param last_error_transition_at: If the current health state is 'Error', + this property returns the time at which the health report was first + reported with 'Error'. For periodic reporting, many reports with the same + state may have been generated however, this property returns only the date + and time at the first 'Error' health report was received. + If the current health state is 'Ok' or 'Warning', returns the date and + time at which the health state was last in 'Error', before transitioning + to a different state. + If the health state was never 'Error', the value will be zero date-time. + :type last_error_transition_at: datetime + """ + + _validation = { + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + } + + _attribute_map = { + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, + 'is_expired': {'key': 'IsExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, + 'last_ok_transition_at': {'key': 'LastOkTransitionAt', 'type': 'iso-8601'}, + 'last_warning_transition_at': {'key': 'LastWarningTransitionAt', 'type': 'iso-8601'}, + 'last_error_transition_at': {'key': 'LastErrorTransitionAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(HealthEvent, self).__init__(**kwargs) + self.is_expired = kwargs.get('is_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.last_modified_utc_timestamp = kwargs.get('last_modified_utc_timestamp', None) + self.last_ok_transition_at = kwargs.get('last_ok_transition_at', None) + self.last_warning_transition_at = kwargs.get('last_warning_transition_at', None) + self.last_error_transition_at = kwargs.get('last_error_transition_at', None) diff --git a/customSDK/servicefabric/models/health_event_py3.py b/customSDK/servicefabric/models/health_event_py3.py new file mode 100644 index 0000000..ed08119 --- /dev/null +++ b/customSDK/servicefabric/models/health_event_py3.py @@ -0,0 +1,163 @@ +# 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 .health_information_py3 import HealthInformation + + +class HealthEvent(HealthInformation): + """Represents health information reported on a health entity, such as cluster, + application or node, with additional metadata added by the Health Manager. + + All required parameters must be populated in order to send to Azure. + + :param source_id: Required. The source name that identifies the + client/watchdog/system component that generated the health information. + :type source_id: str + :param property: Required. The property of the health information. An + entity can have health reports for different properties. + The property is a string and not a fixed enumeration to allow the reporter + flexibility to categorize the state condition that triggers the report. + For example, a reporter with SourceId "LocalWatchdog" can monitor the + state of the available disk on a node, + so it can report "AvailableDisk" property on that node. + The same reporter can monitor the node connectivity, so it can report a + property "Connectivity" on the same node. + In the health store, these reports are treated as separate health events + for the specified node. + Together with the SourceId, the property uniquely identifies the health + information. + :type property: str + :param health_state: Required. The health state of a Service Fabric entity + such as Cluster, Node, Application, Service, Partition, Replica etc. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param time_to_live_in_milli_seconds: The duration for which this health + report is valid. This field uses ISO8601 format for specifying the + duration. + When clients report periodically, they should send reports with higher + frequency than time to live. + If clients report on transition, they can set the time to live to + infinite. + When time to live expires, the health event that contains the health + information + is either removed from health store, if RemoveWhenExpired is true, or + evaluated at error, if RemoveWhenExpired false. + If not specified, time to live defaults to infinite value. + :type time_to_live_in_milli_seconds: timedelta + :param description: The description of the health information. It + represents free text used to add human readable information about the + report. + The maximum string length for the description is 4096 characters. + If the provided string is longer, it will be automatically truncated. + When truncated, the last characters of the description contain a marker + "[Truncated]", and total string size is 4096 characters. + The presence of the marker indicates to users that truncation occurred. + Note that when truncated, the description has less than 4096 characters + from the original string. + :type description: str + :param sequence_number: The sequence number for this health report as a + numeric string. + The report sequence number is used by the health store to detect stale + reports. + If not specified, a sequence number is auto-generated by the health client + when a report is added. + :type sequence_number: str + :param remove_when_expired: Value that indicates whether the report is + removed from health store when it expires. + If set to true, the report is removed from the health store after it + expires. + If set to false, the report is treated as an error when expired. The value + of this property is false by default. + When clients report periodically, they should set RemoveWhenExpired false + (default). + This way, if the reporter has issues (e.g. deadlock) and can't report, the + entity is evaluated at error when the health report expires. + This flags the entity as being in Error health state. + :type remove_when_expired: bool + :param health_report_id: A health report ID which identifies the health + report and can be used to find more detailed information about a specific + health event at + aka.ms/sfhealthid + :type health_report_id: str + :param is_expired: Returns true if the health event is expired, otherwise + false. + :type is_expired: bool + :param source_utc_timestamp: The date and time when the health report was + sent by the source. + :type source_utc_timestamp: datetime + :param last_modified_utc_timestamp: The date and time when the health + report was last modified by the health store. + :type last_modified_utc_timestamp: datetime + :param last_ok_transition_at: If the current health state is 'Ok', this + property returns the time at which the health report was first reported + with 'Ok'. + For periodic reporting, many reports with the same state may have been + generated. + This property returns the date and time when the first 'Ok' health report + was received. + If the current health state is 'Error' or 'Warning', returns the date and + time at which the health state was last in 'Ok', before transitioning to a + different state. + If the health state was never 'Ok', the value will be zero date-time. + :type last_ok_transition_at: datetime + :param last_warning_transition_at: If the current health state is + 'Warning', this property returns the time at which the health report was + first reported with 'Warning'. For periodic reporting, many reports with + the same state may have been generated however, this property returns only + the date and time at the first 'Warning' health report was received. + If the current health state is 'Ok' or 'Error', returns the date and time + at which the health state was last in 'Warning', before transitioning to a + different state. + If the health state was never 'Warning', the value will be zero date-time. + :type last_warning_transition_at: datetime + :param last_error_transition_at: If the current health state is 'Error', + this property returns the time at which the health report was first + reported with 'Error'. For periodic reporting, many reports with the same + state may have been generated however, this property returns only the date + and time at the first 'Error' health report was received. + If the current health state is 'Ok' or 'Warning', returns the date and + time at which the health state was last in 'Error', before transitioning + to a different state. + If the health state was never 'Error', the value will be zero date-time. + :type last_error_transition_at: datetime + """ + + _validation = { + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + } + + _attribute_map = { + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, + 'is_expired': {'key': 'IsExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, + 'last_ok_transition_at': {'key': 'LastOkTransitionAt', 'type': 'iso-8601'}, + 'last_warning_transition_at': {'key': 'LastWarningTransitionAt', 'type': 'iso-8601'}, + 'last_error_transition_at': {'key': 'LastErrorTransitionAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, source_id: str, property: str, health_state, time_to_live_in_milli_seconds=None, description: str=None, sequence_number: str=None, remove_when_expired: bool=None, health_report_id: str=None, is_expired: bool=None, source_utc_timestamp=None, last_modified_utc_timestamp=None, last_ok_transition_at=None, last_warning_transition_at=None, last_error_transition_at=None, **kwargs) -> None: + super(HealthEvent, self).__init__(source_id=source_id, property=property, health_state=health_state, time_to_live_in_milli_seconds=time_to_live_in_milli_seconds, description=description, sequence_number=sequence_number, remove_when_expired=remove_when_expired, health_report_id=health_report_id, **kwargs) + self.is_expired = is_expired + self.source_utc_timestamp = source_utc_timestamp + self.last_modified_utc_timestamp = last_modified_utc_timestamp + self.last_ok_transition_at = last_ok_transition_at + self.last_warning_transition_at = last_warning_transition_at + self.last_error_transition_at = last_error_transition_at diff --git a/customSDK/servicefabric/models/health_information.py b/customSDK/servicefabric/models/health_information.py new file mode 100644 index 0000000..40a71d7 --- /dev/null +++ b/customSDK/servicefabric/models/health_information.py @@ -0,0 +1,119 @@ +# 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 msrest.serialization import Model + + +class HealthInformation(Model): + """Represents common health report information. It is included in all health + reports sent to health store and in all health events returned by health + queries. + + All required parameters must be populated in order to send to Azure. + + :param source_id: Required. The source name that identifies the + client/watchdog/system component that generated the health information. + :type source_id: str + :param property: Required. The property of the health information. An + entity can have health reports for different properties. + The property is a string and not a fixed enumeration to allow the reporter + flexibility to categorize the state condition that triggers the report. + For example, a reporter with SourceId "LocalWatchdog" can monitor the + state of the available disk on a node, + so it can report "AvailableDisk" property on that node. + The same reporter can monitor the node connectivity, so it can report a + property "Connectivity" on the same node. + In the health store, these reports are treated as separate health events + for the specified node. + Together with the SourceId, the property uniquely identifies the health + information. + :type property: str + :param health_state: Required. The health state of a Service Fabric entity + such as Cluster, Node, Application, Service, Partition, Replica etc. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param time_to_live_in_milli_seconds: The duration for which this health + report is valid. This field uses ISO8601 format for specifying the + duration. + When clients report periodically, they should send reports with higher + frequency than time to live. + If clients report on transition, they can set the time to live to + infinite. + When time to live expires, the health event that contains the health + information + is either removed from health store, if RemoveWhenExpired is true, or + evaluated at error, if RemoveWhenExpired false. + If not specified, time to live defaults to infinite value. + :type time_to_live_in_milli_seconds: timedelta + :param description: The description of the health information. It + represents free text used to add human readable information about the + report. + The maximum string length for the description is 4096 characters. + If the provided string is longer, it will be automatically truncated. + When truncated, the last characters of the description contain a marker + "[Truncated]", and total string size is 4096 characters. + The presence of the marker indicates to users that truncation occurred. + Note that when truncated, the description has less than 4096 characters + from the original string. + :type description: str + :param sequence_number: The sequence number for this health report as a + numeric string. + The report sequence number is used by the health store to detect stale + reports. + If not specified, a sequence number is auto-generated by the health client + when a report is added. + :type sequence_number: str + :param remove_when_expired: Value that indicates whether the report is + removed from health store when it expires. + If set to true, the report is removed from the health store after it + expires. + If set to false, the report is treated as an error when expired. The value + of this property is false by default. + When clients report periodically, they should set RemoveWhenExpired false + (default). + This way, if the reporter has issues (e.g. deadlock) and can't report, the + entity is evaluated at error when the health report expires. + This flags the entity as being in Error health state. + :type remove_when_expired: bool + :param health_report_id: A health report ID which identifies the health + report and can be used to find more detailed information about a specific + health event at + aka.ms/sfhealthid + :type health_report_id: str + """ + + _validation = { + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + } + + _attribute_map = { + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HealthInformation, self).__init__(**kwargs) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_in_milli_seconds = kwargs.get('time_to_live_in_milli_seconds', None) + self.description = kwargs.get('description', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.health_report_id = kwargs.get('health_report_id', None) diff --git a/customSDK/servicefabric/models/health_information_py3.py b/customSDK/servicefabric/models/health_information_py3.py new file mode 100644 index 0000000..cc10ee6 --- /dev/null +++ b/customSDK/servicefabric/models/health_information_py3.py @@ -0,0 +1,119 @@ +# 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 msrest.serialization import Model + + +class HealthInformation(Model): + """Represents common health report information. It is included in all health + reports sent to health store and in all health events returned by health + queries. + + All required parameters must be populated in order to send to Azure. + + :param source_id: Required. The source name that identifies the + client/watchdog/system component that generated the health information. + :type source_id: str + :param property: Required. The property of the health information. An + entity can have health reports for different properties. + The property is a string and not a fixed enumeration to allow the reporter + flexibility to categorize the state condition that triggers the report. + For example, a reporter with SourceId "LocalWatchdog" can monitor the + state of the available disk on a node, + so it can report "AvailableDisk" property on that node. + The same reporter can monitor the node connectivity, so it can report a + property "Connectivity" on the same node. + In the health store, these reports are treated as separate health events + for the specified node. + Together with the SourceId, the property uniquely identifies the health + information. + :type property: str + :param health_state: Required. The health state of a Service Fabric entity + such as Cluster, Node, Application, Service, Partition, Replica etc. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param time_to_live_in_milli_seconds: The duration for which this health + report is valid. This field uses ISO8601 format for specifying the + duration. + When clients report periodically, they should send reports with higher + frequency than time to live. + If clients report on transition, they can set the time to live to + infinite. + When time to live expires, the health event that contains the health + information + is either removed from health store, if RemoveWhenExpired is true, or + evaluated at error, if RemoveWhenExpired false. + If not specified, time to live defaults to infinite value. + :type time_to_live_in_milli_seconds: timedelta + :param description: The description of the health information. It + represents free text used to add human readable information about the + report. + The maximum string length for the description is 4096 characters. + If the provided string is longer, it will be automatically truncated. + When truncated, the last characters of the description contain a marker + "[Truncated]", and total string size is 4096 characters. + The presence of the marker indicates to users that truncation occurred. + Note that when truncated, the description has less than 4096 characters + from the original string. + :type description: str + :param sequence_number: The sequence number for this health report as a + numeric string. + The report sequence number is used by the health store to detect stale + reports. + If not specified, a sequence number is auto-generated by the health client + when a report is added. + :type sequence_number: str + :param remove_when_expired: Value that indicates whether the report is + removed from health store when it expires. + If set to true, the report is removed from the health store after it + expires. + If set to false, the report is treated as an error when expired. The value + of this property is false by default. + When clients report periodically, they should set RemoveWhenExpired false + (default). + This way, if the reporter has issues (e.g. deadlock) and can't report, the + entity is evaluated at error when the health report expires. + This flags the entity as being in Error health state. + :type remove_when_expired: bool + :param health_report_id: A health report ID which identifies the health + report and can be used to find more detailed information about a specific + health event at + aka.ms/sfhealthid + :type health_report_id: str + """ + + _validation = { + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + } + + _attribute_map = { + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, + } + + def __init__(self, *, source_id: str, property: str, health_state, time_to_live_in_milli_seconds=None, description: str=None, sequence_number: str=None, remove_when_expired: bool=None, health_report_id: str=None, **kwargs) -> None: + super(HealthInformation, self).__init__(**kwargs) + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_in_milli_seconds = time_to_live_in_milli_seconds + self.description = description + self.sequence_number = sequence_number + self.remove_when_expired = remove_when_expired + self.health_report_id = health_report_id diff --git a/customSDK/servicefabric/models/health_state_count.py b/customSDK/servicefabric/models/health_state_count.py new file mode 100644 index 0000000..0a27c71 --- /dev/null +++ b/customSDK/servicefabric/models/health_state_count.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class HealthStateCount(Model): + """Represents information about how many health entities are in Ok, Warning + and Error health state. + + :param ok_count: The number of health entities with aggregated health + state Ok. + :type ok_count: long + :param warning_count: The number of health entities with aggregated health + state Warning. + :type warning_count: long + :param error_count: The number of health entities with aggregated health + state Error. + :type error_count: long + """ + + _validation = { + 'ok_count': {'minimum': 0}, + 'warning_count': {'minimum': 0}, + 'error_count': {'minimum': 0}, + } + + _attribute_map = { + 'ok_count': {'key': 'OkCount', 'type': 'long'}, + 'warning_count': {'key': 'WarningCount', 'type': 'long'}, + 'error_count': {'key': 'ErrorCount', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(HealthStateCount, self).__init__(**kwargs) + self.ok_count = kwargs.get('ok_count', None) + self.warning_count = kwargs.get('warning_count', None) + self.error_count = kwargs.get('error_count', None) diff --git a/customSDK/servicefabric/models/health_state_count_py3.py b/customSDK/servicefabric/models/health_state_count_py3.py new file mode 100644 index 0000000..fbba5c1 --- /dev/null +++ b/customSDK/servicefabric/models/health_state_count_py3.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class HealthStateCount(Model): + """Represents information about how many health entities are in Ok, Warning + and Error health state. + + :param ok_count: The number of health entities with aggregated health + state Ok. + :type ok_count: long + :param warning_count: The number of health entities with aggregated health + state Warning. + :type warning_count: long + :param error_count: The number of health entities with aggregated health + state Error. + :type error_count: long + """ + + _validation = { + 'ok_count': {'minimum': 0}, + 'warning_count': {'minimum': 0}, + 'error_count': {'minimum': 0}, + } + + _attribute_map = { + 'ok_count': {'key': 'OkCount', 'type': 'long'}, + 'warning_count': {'key': 'WarningCount', 'type': 'long'}, + 'error_count': {'key': 'ErrorCount', 'type': 'long'}, + } + + def __init__(self, *, ok_count: int=None, warning_count: int=None, error_count: int=None, **kwargs) -> None: + super(HealthStateCount, self).__init__(**kwargs) + self.ok_count = ok_count + self.warning_count = warning_count + self.error_count = error_count diff --git a/customSDK/servicefabric/models/health_statistics.py b/customSDK/servicefabric/models/health_statistics.py new file mode 100644 index 0000000..2ad8d50 --- /dev/null +++ b/customSDK/servicefabric/models/health_statistics.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class HealthStatistics(Model): + """The health statistics of an entity, returned as part of the health query + result when the query description is configured to include statistics. + The statistics include health state counts for all children types of the + current entity. + For example, for cluster, the health statistics include health state counts + for nodes, applications, services, partitions, replicas, deployed + applications and deployed service packages. + For partition, the health statistics include health counts for replicas. + + :param health_state_count_list: List of health state counts per entity + kind, which keeps track of how many children of the queried entity are in + Ok, Warning and Error state. + :type health_state_count_list: + list[~azure.servicefabric.models.EntityKindHealthStateCount] + """ + + _attribute_map = { + 'health_state_count_list': {'key': 'HealthStateCountList', 'type': '[EntityKindHealthStateCount]'}, + } + + def __init__(self, **kwargs): + super(HealthStatistics, self).__init__(**kwargs) + self.health_state_count_list = kwargs.get('health_state_count_list', None) diff --git a/customSDK/servicefabric/models/health_statistics_py3.py b/customSDK/servicefabric/models/health_statistics_py3.py new file mode 100644 index 0000000..5bcfd41 --- /dev/null +++ b/customSDK/servicefabric/models/health_statistics_py3.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class HealthStatistics(Model): + """The health statistics of an entity, returned as part of the health query + result when the query description is configured to include statistics. + The statistics include health state counts for all children types of the + current entity. + For example, for cluster, the health statistics include health state counts + for nodes, applications, services, partitions, replicas, deployed + applications and deployed service packages. + For partition, the health statistics include health counts for replicas. + + :param health_state_count_list: List of health state counts per entity + kind, which keeps track of how many children of the queried entity are in + Ok, Warning and Error state. + :type health_state_count_list: + list[~azure.servicefabric.models.EntityKindHealthStateCount] + """ + + _attribute_map = { + 'health_state_count_list': {'key': 'HealthStateCountList', 'type': '[EntityKindHealthStateCount]'}, + } + + def __init__(self, *, health_state_count_list=None, **kwargs) -> None: + super(HealthStatistics, self).__init__(**kwargs) + self.health_state_count_list = health_state_count_list diff --git a/customSDK/servicefabric/models/http_config.py b/customSDK/servicefabric/models/http_config.py new file mode 100644 index 0000000..d52565f --- /dev/null +++ b/customSDK/servicefabric/models/http_config.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class HttpConfig(Model): + """Describes the http configuration for external connectivity for this + network. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. http gateway config name. + :type name: str + :param port: Required. Specifies the port at which the service endpoint + below needs to be exposed. + :type port: int + :param hosts: Required. description for routing. + :type hosts: list[~azure.servicefabric.models.HttpHostConfig] + """ + + _validation = { + 'name': {'required': True}, + 'port': {'required': True}, + 'hosts': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'hosts': {'key': 'hosts', 'type': '[HttpHostConfig]'}, + } + + def __init__(self, **kwargs): + super(HttpConfig, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.port = kwargs.get('port', None) + self.hosts = kwargs.get('hosts', None) diff --git a/customSDK/servicefabric/models/http_config_py3.py b/customSDK/servicefabric/models/http_config_py3.py new file mode 100644 index 0000000..3f353d1 --- /dev/null +++ b/customSDK/servicefabric/models/http_config_py3.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class HttpConfig(Model): + """Describes the http configuration for external connectivity for this + network. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. http gateway config name. + :type name: str + :param port: Required. Specifies the port at which the service endpoint + below needs to be exposed. + :type port: int + :param hosts: Required. description for routing. + :type hosts: list[~azure.servicefabric.models.HttpHostConfig] + """ + + _validation = { + 'name': {'required': True}, + 'port': {'required': True}, + 'hosts': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'hosts': {'key': 'hosts', 'type': '[HttpHostConfig]'}, + } + + def __init__(self, *, name: str, port: int, hosts, **kwargs) -> None: + super(HttpConfig, self).__init__(**kwargs) + self.name = name + self.port = port + self.hosts = hosts diff --git a/customSDK/servicefabric/models/http_host_config.py b/customSDK/servicefabric/models/http_host_config.py new file mode 100644 index 0000000..5901ff7 --- /dev/null +++ b/customSDK/servicefabric/models/http_host_config.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class HttpHostConfig(Model): + """Describes the hostname properties for http routing. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. http hostname config name. + :type name: str + :param routes: Required. Route information to use for routing. Routes are + processed in the order they are specified. Specify routes that are more + specific before routes that can handle general cases. + :type routes: list[~azure.servicefabric.models.HttpRouteConfig] + """ + + _validation = { + 'name': {'required': True}, + 'routes': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'routes': {'key': 'routes', 'type': '[HttpRouteConfig]'}, + } + + def __init__(self, **kwargs): + super(HttpHostConfig, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.routes = kwargs.get('routes', None) diff --git a/customSDK/servicefabric/models/http_host_config_py3.py b/customSDK/servicefabric/models/http_host_config_py3.py new file mode 100644 index 0000000..008da9b --- /dev/null +++ b/customSDK/servicefabric/models/http_host_config_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class HttpHostConfig(Model): + """Describes the hostname properties for http routing. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. http hostname config name. + :type name: str + :param routes: Required. Route information to use for routing. Routes are + processed in the order they are specified. Specify routes that are more + specific before routes that can handle general cases. + :type routes: list[~azure.servicefabric.models.HttpRouteConfig] + """ + + _validation = { + 'name': {'required': True}, + 'routes': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'routes': {'key': 'routes', 'type': '[HttpRouteConfig]'}, + } + + def __init__(self, *, name: str, routes, **kwargs) -> None: + super(HttpHostConfig, self).__init__(**kwargs) + self.name = name + self.routes = routes diff --git a/customSDK/servicefabric/models/http_route_config.py b/customSDK/servicefabric/models/http_route_config.py new file mode 100644 index 0000000..f21ddcc --- /dev/null +++ b/customSDK/servicefabric/models/http_route_config.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class HttpRouteConfig(Model): + """Describes the hostname properties for http routing. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. http route name. + :type name: str + :param match: Required. Describes a rule for http route matching. + :type match: ~azure.servicefabric.models.HttpRouteMatchRule + :param destination: Required. Describes destination endpoint for routing + traffic. + :type destination: ~azure.servicefabric.models.GatewayDestination + """ + + _validation = { + 'name': {'required': True}, + 'match': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'match': {'key': 'match', 'type': 'HttpRouteMatchRule'}, + 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, + } + + def __init__(self, **kwargs): + super(HttpRouteConfig, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.match = kwargs.get('match', None) + self.destination = kwargs.get('destination', None) diff --git a/customSDK/servicefabric/models/http_route_config_py3.py b/customSDK/servicefabric/models/http_route_config_py3.py new file mode 100644 index 0000000..442ffb8 --- /dev/null +++ b/customSDK/servicefabric/models/http_route_config_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class HttpRouteConfig(Model): + """Describes the hostname properties for http routing. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. http route name. + :type name: str + :param match: Required. Describes a rule for http route matching. + :type match: ~azure.servicefabric.models.HttpRouteMatchRule + :param destination: Required. Describes destination endpoint for routing + traffic. + :type destination: ~azure.servicefabric.models.GatewayDestination + """ + + _validation = { + 'name': {'required': True}, + 'match': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'match': {'key': 'match', 'type': 'HttpRouteMatchRule'}, + 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, + } + + def __init__(self, *, name: str, match, destination, **kwargs) -> None: + super(HttpRouteConfig, self).__init__(**kwargs) + self.name = name + self.match = match + self.destination = destination diff --git a/customSDK/servicefabric/models/http_route_match_header.py b/customSDK/servicefabric/models/http_route_match_header.py new file mode 100644 index 0000000..54fbdd6 --- /dev/null +++ b/customSDK/servicefabric/models/http_route_match_header.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class HttpRouteMatchHeader(Model): + """Describes header information for http route matching. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of header to match in request. + :type name: str + :param value: Value of header to match in request. + :type value: str + :param type: how to match header value. Possible values include: 'exact' + :type type: str or ~azure.servicefabric.models.HeaderMatchType + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HttpRouteMatchHeader, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + self.type = kwargs.get('type', None) diff --git a/customSDK/servicefabric/models/http_route_match_header_py3.py b/customSDK/servicefabric/models/http_route_match_header_py3.py new file mode 100644 index 0000000..ffb10df --- /dev/null +++ b/customSDK/servicefabric/models/http_route_match_header_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class HttpRouteMatchHeader(Model): + """Describes header information for http route matching. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of header to match in request. + :type name: str + :param value: Value of header to match in request. + :type value: str + :param type: how to match header value. Possible values include: 'exact' + :type type: str or ~azure.servicefabric.models.HeaderMatchType + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str=None, type=None, **kwargs) -> None: + super(HttpRouteMatchHeader, self).__init__(**kwargs) + self.name = name + self.value = value + self.type = type diff --git a/customSDK/servicefabric/models/http_route_match_path.py b/customSDK/servicefabric/models/http_route_match_path.py new file mode 100644 index 0000000..fa7b45f --- /dev/null +++ b/customSDK/servicefabric/models/http_route_match_path.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class HttpRouteMatchPath(Model): + """Path to match for routing. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Uri path to match for request. + :type value: str + :param rewrite: replacement string for matched part of the Uri. + :type rewrite: str + :ivar type: Required. how to match value in the Uri. Default value: + "prefix" . + :vartype type: str + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'rewrite': {'key': 'rewrite', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "prefix" + + def __init__(self, **kwargs): + super(HttpRouteMatchPath, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.rewrite = kwargs.get('rewrite', None) diff --git a/customSDK/servicefabric/models/http_route_match_path_py3.py b/customSDK/servicefabric/models/http_route_match_path_py3.py new file mode 100644 index 0000000..075b226 --- /dev/null +++ b/customSDK/servicefabric/models/http_route_match_path_py3.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class HttpRouteMatchPath(Model): + """Path to match for routing. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Uri path to match for request. + :type value: str + :param rewrite: replacement string for matched part of the Uri. + :type rewrite: str + :ivar type: Required. how to match value in the Uri. Default value: + "prefix" . + :vartype type: str + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'rewrite': {'key': 'rewrite', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "prefix" + + def __init__(self, *, value: str, rewrite: str=None, **kwargs) -> None: + super(HttpRouteMatchPath, self).__init__(**kwargs) + self.value = value + self.rewrite = rewrite diff --git a/customSDK/servicefabric/models/http_route_match_rule.py b/customSDK/servicefabric/models/http_route_match_rule.py new file mode 100644 index 0000000..d09c2ea --- /dev/null +++ b/customSDK/servicefabric/models/http_route_match_rule.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class HttpRouteMatchRule(Model): + """Describes a rule for http route matching. + + All required parameters must be populated in order to send to Azure. + + :param path: Required. Path to match for routing. + :type path: ~azure.servicefabric.models.HttpRouteMatchPath + :param headers: headers and their values to match in request. + :type headers: list[~azure.servicefabric.models.HttpRouteMatchHeader] + """ + + _validation = { + 'path': {'required': True}, + } + + _attribute_map = { + 'path': {'key': 'path', 'type': 'HttpRouteMatchPath'}, + 'headers': {'key': 'headers', 'type': '[HttpRouteMatchHeader]'}, + } + + def __init__(self, **kwargs): + super(HttpRouteMatchRule, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.headers = kwargs.get('headers', None) diff --git a/customSDK/servicefabric/models/http_route_match_rule_py3.py b/customSDK/servicefabric/models/http_route_match_rule_py3.py new file mode 100644 index 0000000..61561bf --- /dev/null +++ b/customSDK/servicefabric/models/http_route_match_rule_py3.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class HttpRouteMatchRule(Model): + """Describes a rule for http route matching. + + All required parameters must be populated in order to send to Azure. + + :param path: Required. Path to match for routing. + :type path: ~azure.servicefabric.models.HttpRouteMatchPath + :param headers: headers and their values to match in request. + :type headers: list[~azure.servicefabric.models.HttpRouteMatchHeader] + """ + + _validation = { + 'path': {'required': True}, + } + + _attribute_map = { + 'path': {'key': 'path', 'type': 'HttpRouteMatchPath'}, + 'headers': {'key': 'headers', 'type': '[HttpRouteMatchHeader]'}, + } + + def __init__(self, *, path, headers=None, **kwargs) -> None: + super(HttpRouteMatchRule, self).__init__(**kwargs) + self.path = path + self.headers = headers diff --git a/customSDK/servicefabric/models/identity_description.py b/customSDK/servicefabric/models/identity_description.py new file mode 100644 index 0000000..1ab557e --- /dev/null +++ b/customSDK/servicefabric/models/identity_description.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class IdentityDescription(Model): + """Information describing the identities associated with this application. + + All required parameters must be populated in order to send to Azure. + + :param token_service_endpoint: the endpoint for the token service managing + this identity + :type token_service_endpoint: str + :param type: Required. the types of identities associated with this + resource; currently restricted to 'SystemAssigned and UserAssigned' + :type type: str + :param tenant_id: the identifier of the tenant containing the + application's identity. + :type tenant_id: str + :param principal_id: the object identifier of the Service Principal of the + identity associated with this resource. + :type principal_id: str + :param user_assigned_identities: represents user assigned identities map. + :type user_assigned_identities: dict[str, + ~azure.servicefabric.models.IdentityItemDescription] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'token_service_endpoint': {'key': 'tokenServiceEndpoint', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{IdentityItemDescription}'}, + } + + def __init__(self, **kwargs): + super(IdentityDescription, self).__init__(**kwargs) + self.token_service_endpoint = kwargs.get('token_service_endpoint', None) + self.type = kwargs.get('type', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.principal_id = kwargs.get('principal_id', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) diff --git a/customSDK/servicefabric/models/identity_description_py3.py b/customSDK/servicefabric/models/identity_description_py3.py new file mode 100644 index 0000000..03e8257 --- /dev/null +++ b/customSDK/servicefabric/models/identity_description_py3.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class IdentityDescription(Model): + """Information describing the identities associated with this application. + + All required parameters must be populated in order to send to Azure. + + :param token_service_endpoint: the endpoint for the token service managing + this identity + :type token_service_endpoint: str + :param type: Required. the types of identities associated with this + resource; currently restricted to 'SystemAssigned and UserAssigned' + :type type: str + :param tenant_id: the identifier of the tenant containing the + application's identity. + :type tenant_id: str + :param principal_id: the object identifier of the Service Principal of the + identity associated with this resource. + :type principal_id: str + :param user_assigned_identities: represents user assigned identities map. + :type user_assigned_identities: dict[str, + ~azure.servicefabric.models.IdentityItemDescription] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'token_service_endpoint': {'key': 'tokenServiceEndpoint', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{IdentityItemDescription}'}, + } + + def __init__(self, *, type: str, token_service_endpoint: str=None, tenant_id: str=None, principal_id: str=None, user_assigned_identities=None, **kwargs) -> None: + super(IdentityDescription, self).__init__(**kwargs) + self.token_service_endpoint = token_service_endpoint + self.type = type + self.tenant_id = tenant_id + self.principal_id = principal_id + self.user_assigned_identities = user_assigned_identities diff --git a/customSDK/servicefabric/models/identity_item_description.py b/customSDK/servicefabric/models/identity_item_description.py new file mode 100644 index 0000000..74a6013 --- /dev/null +++ b/customSDK/servicefabric/models/identity_item_description.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class IdentityItemDescription(Model): + """Describes a single user-assigned identity associated with the application. + + :param principal_id: the object identifier of the Service Principal which + this identity represents. + :type principal_id: str + :param client_id: the client identifier of the Service Principal which + this identity represents. + :type client_id: str + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentityItemDescription, self).__init__(**kwargs) + self.principal_id = kwargs.get('principal_id', None) + self.client_id = kwargs.get('client_id', None) diff --git a/customSDK/servicefabric/models/identity_item_description_py3.py b/customSDK/servicefabric/models/identity_item_description_py3.py new file mode 100644 index 0000000..b3cf669 --- /dev/null +++ b/customSDK/servicefabric/models/identity_item_description_py3.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class IdentityItemDescription(Model): + """Describes a single user-assigned identity associated with the application. + + :param principal_id: the object identifier of the Service Principal which + this identity represents. + :type principal_id: str + :param client_id: the client identifier of the Service Principal which + this identity represents. + :type client_id: str + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, *, principal_id: str=None, client_id: str=None, **kwargs) -> None: + super(IdentityItemDescription, self).__init__(**kwargs) + self.principal_id = principal_id + self.client_id = client_id diff --git a/customSDK/servicefabric/models/image_registry_credential.py b/customSDK/servicefabric/models/image_registry_credential.py new file mode 100644 index 0000000..80f114b --- /dev/null +++ b/customSDK/servicefabric/models/image_registry_credential.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class ImageRegistryCredential(Model): + """Image registry credential. + + All required parameters must be populated in order to send to Azure. + + :param server: Required. Docker image registry server, without protocol + such as `http` and `https`. + :type server: str + :param username: Required. The username for the private registry. + :type username: str + :param password_type: The type of the image registry password being given + in password. Possible values include: 'ClearText', 'KeyVaultReference', + 'SecretValueReference'. Default value: "ClearText" . + :type password_type: str or + ~azure.servicefabric.models.ImageRegistryPasswordType + :param password: The password for the private registry. The password is + required for create or update operations, however it is not returned in + the get or list operations. Will be processed based on the type provided. + :type password: str + """ + + _validation = { + 'server': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'server': {'key': 'server', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password_type': {'key': 'passwordType', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageRegistryCredential, self).__init__(**kwargs) + self.server = kwargs.get('server', None) + self.username = kwargs.get('username', None) + self.password_type = kwargs.get('password_type', "ClearText") + self.password = kwargs.get('password', None) diff --git a/customSDK/servicefabric/models/image_registry_credential_py3.py b/customSDK/servicefabric/models/image_registry_credential_py3.py new file mode 100644 index 0000000..9bae3ed --- /dev/null +++ b/customSDK/servicefabric/models/image_registry_credential_py3.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class ImageRegistryCredential(Model): + """Image registry credential. + + All required parameters must be populated in order to send to Azure. + + :param server: Required. Docker image registry server, without protocol + such as `http` and `https`. + :type server: str + :param username: Required. The username for the private registry. + :type username: str + :param password_type: The type of the image registry password being given + in password. Possible values include: 'ClearText', 'KeyVaultReference', + 'SecretValueReference'. Default value: "ClearText" . + :type password_type: str or + ~azure.servicefabric.models.ImageRegistryPasswordType + :param password: The password for the private registry. The password is + required for create or update operations, however it is not returned in + the get or list operations. Will be processed based on the type provided. + :type password: str + """ + + _validation = { + 'server': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'server': {'key': 'server', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password_type': {'key': 'passwordType', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, server: str, username: str, password_type="ClearText", password: str=None, **kwargs) -> None: + super(ImageRegistryCredential, self).__init__(**kwargs) + self.server = server + self.username = username + self.password_type = password_type + self.password = password diff --git a/customSDK/servicefabric/models/image_store_content.py b/customSDK/servicefabric/models/image_store_content.py new file mode 100644 index 0000000..936fb39 --- /dev/null +++ b/customSDK/servicefabric/models/image_store_content.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class ImageStoreContent(Model): + """Information about the image store content. + + :param store_files: The list of image store file info objects represents + files found under the given image store relative path. + :type store_files: list[~azure.servicefabric.models.FileInfo] + :param store_folders: The list of image store folder info objects + represents subfolders found under the given image store relative path. + :type store_folders: list[~azure.servicefabric.models.FolderInfo] + """ + + _attribute_map = { + 'store_files': {'key': 'StoreFiles', 'type': '[FileInfo]'}, + 'store_folders': {'key': 'StoreFolders', 'type': '[FolderInfo]'}, + } + + def __init__(self, **kwargs): + super(ImageStoreContent, self).__init__(**kwargs) + self.store_files = kwargs.get('store_files', None) + self.store_folders = kwargs.get('store_folders', None) diff --git a/customSDK/servicefabric/models/image_store_content_py3.py b/customSDK/servicefabric/models/image_store_content_py3.py new file mode 100644 index 0000000..053a35f --- /dev/null +++ b/customSDK/servicefabric/models/image_store_content_py3.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class ImageStoreContent(Model): + """Information about the image store content. + + :param store_files: The list of image store file info objects represents + files found under the given image store relative path. + :type store_files: list[~azure.servicefabric.models.FileInfo] + :param store_folders: The list of image store folder info objects + represents subfolders found under the given image store relative path. + :type store_folders: list[~azure.servicefabric.models.FolderInfo] + """ + + _attribute_map = { + 'store_files': {'key': 'StoreFiles', 'type': '[FileInfo]'}, + 'store_folders': {'key': 'StoreFolders', 'type': '[FolderInfo]'}, + } + + def __init__(self, *, store_files=None, store_folders=None, **kwargs) -> None: + super(ImageStoreContent, self).__init__(**kwargs) + self.store_files = store_files + self.store_folders = store_folders diff --git a/customSDK/servicefabric/models/image_store_copy_description.py b/customSDK/servicefabric/models/image_store_copy_description.py new file mode 100644 index 0000000..267b0ca --- /dev/null +++ b/customSDK/servicefabric/models/image_store_copy_description.py @@ -0,0 +1,54 @@ +# 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 msrest.serialization import Model + + +class ImageStoreCopyDescription(Model): + """Information about how to copy image store content from one image store + relative path to another image store relative path. + + All required parameters must be populated in order to send to Azure. + + :param remote_source: Required. The relative path of source image store + content to be copied from. + :type remote_source: str + :param remote_destination: Required. The relative path of destination + image store content to be copied to. + :type remote_destination: str + :param skip_files: The list of the file names to be skipped for copying. + :type skip_files: list[str] + :param check_mark_file: Indicates whether to check mark file during + copying. The property is true if checking mark file is required, false + otherwise. The mark file is used to check whether the folder is well + constructed. If the property is true and mark file does not exist, the + copy is skipped. + :type check_mark_file: bool + """ + + _validation = { + 'remote_source': {'required': True}, + 'remote_destination': {'required': True}, + } + + _attribute_map = { + 'remote_source': {'key': 'RemoteSource', 'type': 'str'}, + 'remote_destination': {'key': 'RemoteDestination', 'type': 'str'}, + 'skip_files': {'key': 'SkipFiles', 'type': '[str]'}, + 'check_mark_file': {'key': 'CheckMarkFile', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ImageStoreCopyDescription, self).__init__(**kwargs) + self.remote_source = kwargs.get('remote_source', None) + self.remote_destination = kwargs.get('remote_destination', None) + self.skip_files = kwargs.get('skip_files', None) + self.check_mark_file = kwargs.get('check_mark_file', None) diff --git a/customSDK/servicefabric/models/image_store_copy_description_py3.py b/customSDK/servicefabric/models/image_store_copy_description_py3.py new file mode 100644 index 0000000..534e5c2 --- /dev/null +++ b/customSDK/servicefabric/models/image_store_copy_description_py3.py @@ -0,0 +1,54 @@ +# 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 msrest.serialization import Model + + +class ImageStoreCopyDescription(Model): + """Information about how to copy image store content from one image store + relative path to another image store relative path. + + All required parameters must be populated in order to send to Azure. + + :param remote_source: Required. The relative path of source image store + content to be copied from. + :type remote_source: str + :param remote_destination: Required. The relative path of destination + image store content to be copied to. + :type remote_destination: str + :param skip_files: The list of the file names to be skipped for copying. + :type skip_files: list[str] + :param check_mark_file: Indicates whether to check mark file during + copying. The property is true if checking mark file is required, false + otherwise. The mark file is used to check whether the folder is well + constructed. If the property is true and mark file does not exist, the + copy is skipped. + :type check_mark_file: bool + """ + + _validation = { + 'remote_source': {'required': True}, + 'remote_destination': {'required': True}, + } + + _attribute_map = { + 'remote_source': {'key': 'RemoteSource', 'type': 'str'}, + 'remote_destination': {'key': 'RemoteDestination', 'type': 'str'}, + 'skip_files': {'key': 'SkipFiles', 'type': '[str]'}, + 'check_mark_file': {'key': 'CheckMarkFile', 'type': 'bool'}, + } + + def __init__(self, *, remote_source: str, remote_destination: str, skip_files=None, check_mark_file: bool=None, **kwargs) -> None: + super(ImageStoreCopyDescription, self).__init__(**kwargs) + self.remote_source = remote_source + self.remote_destination = remote_destination + self.skip_files = skip_files + self.check_mark_file = check_mark_file diff --git a/customSDK/servicefabric/models/image_store_info.py b/customSDK/servicefabric/models/image_store_info.py new file mode 100644 index 0000000..46ff04e --- /dev/null +++ b/customSDK/servicefabric/models/image_store_info.py @@ -0,0 +1,54 @@ +# 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 msrest.serialization import Model + + +class ImageStoreInfo(Model): + """Information about the ImageStore's resource usage. + + :param disk_info: disk capacity and available disk space on the node where + the ImageStore primary is placed. + :type disk_info: ~azure.servicefabric.models.DiskInfo + :param used_by_metadata: the ImageStore's file system usage for metadata. + :type used_by_metadata: ~azure.servicefabric.models.UsageInfo + :param used_by_staging: The ImageStore's file system usage for staging + files that are being uploaded. + :type used_by_staging: ~azure.servicefabric.models.UsageInfo + :param used_by_copy: the ImageStore's file system usage for copied + application and cluster packages. [Removing application and cluster + packages](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-deleteimagestorecontent) + will free up this space. + :type used_by_copy: ~azure.servicefabric.models.UsageInfo + :param used_by_register: the ImageStore's file system usage for registered + and cluster packages. [Unregistering + application](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) + and [cluster + packages](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) + will free up this space. + :type used_by_register: ~azure.servicefabric.models.UsageInfo + """ + + _attribute_map = { + 'disk_info': {'key': 'DiskInfo', 'type': 'DiskInfo'}, + 'used_by_metadata': {'key': 'UsedByMetadata', 'type': 'UsageInfo'}, + 'used_by_staging': {'key': 'UsedByStaging', 'type': 'UsageInfo'}, + 'used_by_copy': {'key': 'UsedByCopy', 'type': 'UsageInfo'}, + 'used_by_register': {'key': 'UsedByRegister', 'type': 'UsageInfo'}, + } + + def __init__(self, **kwargs): + super(ImageStoreInfo, self).__init__(**kwargs) + self.disk_info = kwargs.get('disk_info', None) + self.used_by_metadata = kwargs.get('used_by_metadata', None) + self.used_by_staging = kwargs.get('used_by_staging', None) + self.used_by_copy = kwargs.get('used_by_copy', None) + self.used_by_register = kwargs.get('used_by_register', None) diff --git a/customSDK/servicefabric/models/image_store_info_py3.py b/customSDK/servicefabric/models/image_store_info_py3.py new file mode 100644 index 0000000..8c2ab90 --- /dev/null +++ b/customSDK/servicefabric/models/image_store_info_py3.py @@ -0,0 +1,54 @@ +# 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 msrest.serialization import Model + + +class ImageStoreInfo(Model): + """Information about the ImageStore's resource usage. + + :param disk_info: disk capacity and available disk space on the node where + the ImageStore primary is placed. + :type disk_info: ~azure.servicefabric.models.DiskInfo + :param used_by_metadata: the ImageStore's file system usage for metadata. + :type used_by_metadata: ~azure.servicefabric.models.UsageInfo + :param used_by_staging: The ImageStore's file system usage for staging + files that are being uploaded. + :type used_by_staging: ~azure.servicefabric.models.UsageInfo + :param used_by_copy: the ImageStore's file system usage for copied + application and cluster packages. [Removing application and cluster + packages](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-deleteimagestorecontent) + will free up this space. + :type used_by_copy: ~azure.servicefabric.models.UsageInfo + :param used_by_register: the ImageStore's file system usage for registered + and cluster packages. [Unregistering + application](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) + and [cluster + packages](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) + will free up this space. + :type used_by_register: ~azure.servicefabric.models.UsageInfo + """ + + _attribute_map = { + 'disk_info': {'key': 'DiskInfo', 'type': 'DiskInfo'}, + 'used_by_metadata': {'key': 'UsedByMetadata', 'type': 'UsageInfo'}, + 'used_by_staging': {'key': 'UsedByStaging', 'type': 'UsageInfo'}, + 'used_by_copy': {'key': 'UsedByCopy', 'type': 'UsageInfo'}, + 'used_by_register': {'key': 'UsedByRegister', 'type': 'UsageInfo'}, + } + + def __init__(self, *, disk_info=None, used_by_metadata=None, used_by_staging=None, used_by_copy=None, used_by_register=None, **kwargs) -> None: + super(ImageStoreInfo, self).__init__(**kwargs) + self.disk_info = disk_info + self.used_by_metadata = used_by_metadata + self.used_by_staging = used_by_staging + self.used_by_copy = used_by_copy + self.used_by_register = used_by_register diff --git a/customSDK/servicefabric/models/inlined_value_secret_resource_properties.py b/customSDK/servicefabric/models/inlined_value_secret_resource_properties.py new file mode 100644 index 0000000..03ec2fb --- /dev/null +++ b/customSDK/servicefabric/models/inlined_value_secret_resource_properties.py @@ -0,0 +1,59 @@ +# 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 .secret_resource_properties import SecretResourceProperties + + +class InlinedValueSecretResourceProperties(SecretResourceProperties): + """Describes the properties of a secret resource whose value is provided + explicitly as plaintext. The secret resource may have multiple values, each + being uniquely versioned. The secret value of each version is stored + encrypted, and delivered as plaintext into the context of applications + referencing it. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param description: User readable description of the secret. + :type description: str + :ivar status: Status of the resource. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the secret. + :vartype status_details: str + :param content_type: The type of the content stored in the secret value. + The value of this property is opaque to Service Fabric. Once set, the + value of this property cannot be changed. + :type content_type: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InlinedValueSecretResourceProperties, self).__init__(**kwargs) + self.kind = 'inlinedValue' diff --git a/customSDK/servicefabric/models/inlined_value_secret_resource_properties_py3.py b/customSDK/servicefabric/models/inlined_value_secret_resource_properties_py3.py new file mode 100644 index 0000000..ab7b721 --- /dev/null +++ b/customSDK/servicefabric/models/inlined_value_secret_resource_properties_py3.py @@ -0,0 +1,59 @@ +# 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 .secret_resource_properties_py3 import SecretResourceProperties + + +class InlinedValueSecretResourceProperties(SecretResourceProperties): + """Describes the properties of a secret resource whose value is provided + explicitly as plaintext. The secret resource may have multiple values, each + being uniquely versioned. The secret value of each version is stored + encrypted, and delivered as plaintext into the context of applications + referencing it. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param description: User readable description of the secret. + :type description: str + :ivar status: Status of the resource. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the secret. + :vartype status_details: str + :param content_type: The type of the content stored in the secret value. + The value of this property is opaque to Service Fabric. Once set, the + value of this property cannot be changed. + :type content_type: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, content_type: str=None, **kwargs) -> None: + super(InlinedValueSecretResourceProperties, self).__init__(description=description, content_type=content_type, **kwargs) + self.kind = 'inlinedValue' diff --git a/customSDK/servicefabric/models/instance_lifecycle_description.py b/customSDK/servicefabric/models/instance_lifecycle_description.py new file mode 100644 index 0000000..8c4046f --- /dev/null +++ b/customSDK/servicefabric/models/instance_lifecycle_description.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class InstanceLifecycleDescription(Model): + """Describes how the instance will behave. + + :param restore_replica_location_after_upgrade: If set to true, move/swap + replica to original location after upgrade. + :type restore_replica_location_after_upgrade: bool + """ + + _attribute_map = { + 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(InstanceLifecycleDescription, self).__init__(**kwargs) + self.restore_replica_location_after_upgrade = kwargs.get('restore_replica_location_after_upgrade', None) diff --git a/customSDK/servicefabric/models/instance_lifecycle_description_py3.py b/customSDK/servicefabric/models/instance_lifecycle_description_py3.py new file mode 100644 index 0000000..d90d159 --- /dev/null +++ b/customSDK/servicefabric/models/instance_lifecycle_description_py3.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class InstanceLifecycleDescription(Model): + """Describes how the instance will behave. + + :param restore_replica_location_after_upgrade: If set to true, move/swap + replica to original location after upgrade. + :type restore_replica_location_after_upgrade: bool + """ + + _attribute_map = { + 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + } + + def __init__(self, *, restore_replica_location_after_upgrade: bool=None, **kwargs) -> None: + super(InstanceLifecycleDescription, self).__init__(**kwargs) + self.restore_replica_location_after_upgrade = restore_replica_location_after_upgrade diff --git a/customSDK/servicefabric/models/int64_property_value.py b/customSDK/servicefabric/models/int64_property_value.py new file mode 100644 index 0000000..893521e --- /dev/null +++ b/customSDK/servicefabric/models/int64_property_value.py @@ -0,0 +1,39 @@ +# 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 .property_value import PropertyValue + + +class Int64PropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Int64. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. The data of the property value. + :type data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Int64PropertyValue, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.kind = 'Int64' diff --git a/customSDK/servicefabric/models/int64_property_value_py3.py b/customSDK/servicefabric/models/int64_property_value_py3.py new file mode 100644 index 0000000..98ec968 --- /dev/null +++ b/customSDK/servicefabric/models/int64_property_value_py3.py @@ -0,0 +1,39 @@ +# 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 .property_value_py3 import PropertyValue + + +class Int64PropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Int64. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. The data of the property value. + :type data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__(self, *, data: str, **kwargs) -> None: + super(Int64PropertyValue, self).__init__(**kwargs) + self.data = data + self.kind = 'Int64' diff --git a/customSDK/servicefabric/models/int64_range_partition_information.py b/customSDK/servicefabric/models/int64_range_partition_information.py new file mode 100644 index 0000000..d98fa21 --- /dev/null +++ b/customSDK/servicefabric/models/int64_range_partition_information.py @@ -0,0 +1,51 @@ +# 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 .partition_information import PartitionInformation + + +class Int64RangePartitionInformation(PartitionInformation): + """Describes the partition information for the integer range that is based on + partition schemes. + + All required parameters must be populated in order to send to Azure. + + :param id: An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. + The partition ID is unique and does not change for the lifetime of the + service. If the same service was deleted and recreated the IDs of its + partitions would be different. + :type id: str + :param service_partition_kind: Required. Constant filled by server. + :type service_partition_kind: str + :param low_key: Specifies the minimum key value handled by this partition. + :type low_key: str + :param high_key: Specifies the maximum key value handled by this + partition. + :type high_key: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + 'low_key': {'key': 'LowKey', 'type': 'str'}, + 'high_key': {'key': 'HighKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Int64RangePartitionInformation, self).__init__(**kwargs) + self.low_key = kwargs.get('low_key', None) + self.high_key = kwargs.get('high_key', None) + self.service_partition_kind = 'Int64Range' diff --git a/customSDK/servicefabric/models/int64_range_partition_information_py3.py b/customSDK/servicefabric/models/int64_range_partition_information_py3.py new file mode 100644 index 0000000..fe77156 --- /dev/null +++ b/customSDK/servicefabric/models/int64_range_partition_information_py3.py @@ -0,0 +1,51 @@ +# 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 .partition_information_py3 import PartitionInformation + + +class Int64RangePartitionInformation(PartitionInformation): + """Describes the partition information for the integer range that is based on + partition schemes. + + All required parameters must be populated in order to send to Azure. + + :param id: An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. + The partition ID is unique and does not change for the lifetime of the + service. If the same service was deleted and recreated the IDs of its + partitions would be different. + :type id: str + :param service_partition_kind: Required. Constant filled by server. + :type service_partition_kind: str + :param low_key: Specifies the minimum key value handled by this partition. + :type low_key: str + :param high_key: Specifies the maximum key value handled by this + partition. + :type high_key: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + 'low_key': {'key': 'LowKey', 'type': 'str'}, + 'high_key': {'key': 'HighKey', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, low_key: str=None, high_key: str=None, **kwargs) -> None: + super(Int64RangePartitionInformation, self).__init__(id=id, **kwargs) + self.low_key = low_key + self.high_key = high_key + self.service_partition_kind = 'Int64Range' diff --git a/customSDK/servicefabric/models/invoke_data_loss_result.py b/customSDK/servicefabric/models/invoke_data_loss_result.py new file mode 100644 index 0000000..cf8d617 --- /dev/null +++ b/customSDK/servicefabric/models/invoke_data_loss_result.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class InvokeDataLossResult(Model): + """Represents information about an operation in a terminal state (Completed or + Faulted). + + :param error_code: If OperationState is Completed, this is 0. If + OperationState is Faulted, this is an error code indicating the reason. + :type error_code: int + :param selected_partition: This class returns information about the + partition that the user-induced operation acted upon. + :type selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__(self, **kwargs): + super(InvokeDataLossResult, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.selected_partition = kwargs.get('selected_partition', None) diff --git a/customSDK/servicefabric/models/invoke_data_loss_result_py3.py b/customSDK/servicefabric/models/invoke_data_loss_result_py3.py new file mode 100644 index 0000000..6fc6faf --- /dev/null +++ b/customSDK/servicefabric/models/invoke_data_loss_result_py3.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class InvokeDataLossResult(Model): + """Represents information about an operation in a terminal state (Completed or + Faulted). + + :param error_code: If OperationState is Completed, this is 0. If + OperationState is Faulted, this is an error code indicating the reason. + :type error_code: int + :param selected_partition: This class returns information about the + partition that the user-induced operation acted upon. + :type selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__(self, *, error_code: int=None, selected_partition=None, **kwargs) -> None: + super(InvokeDataLossResult, self).__init__(**kwargs) + self.error_code = error_code + self.selected_partition = selected_partition diff --git a/customSDK/servicefabric/models/invoke_quorum_loss_result.py b/customSDK/servicefabric/models/invoke_quorum_loss_result.py new file mode 100644 index 0000000..9ec2042 --- /dev/null +++ b/customSDK/servicefabric/models/invoke_quorum_loss_result.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class InvokeQuorumLossResult(Model): + """Represents information about an operation in a terminal state (Completed or + Faulted). + + :param error_code: If OperationState is Completed, this is 0. If + OperationState is Faulted, this is an error code indicating the reason. + :type error_code: int + :param selected_partition: This class returns information about the + partition that the user-induced operation acted upon. + :type selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__(self, **kwargs): + super(InvokeQuorumLossResult, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.selected_partition = kwargs.get('selected_partition', None) diff --git a/customSDK/servicefabric/models/invoke_quorum_loss_result_py3.py b/customSDK/servicefabric/models/invoke_quorum_loss_result_py3.py new file mode 100644 index 0000000..ec6aa38 --- /dev/null +++ b/customSDK/servicefabric/models/invoke_quorum_loss_result_py3.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class InvokeQuorumLossResult(Model): + """Represents information about an operation in a terminal state (Completed or + Faulted). + + :param error_code: If OperationState is Completed, this is 0. If + OperationState is Faulted, this is an error code indicating the reason. + :type error_code: int + :param selected_partition: This class returns information about the + partition that the user-induced operation acted upon. + :type selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__(self, *, error_code: int=None, selected_partition=None, **kwargs) -> None: + super(InvokeQuorumLossResult, self).__init__(**kwargs) + self.error_code = error_code + self.selected_partition = selected_partition diff --git a/customSDK/servicefabric/models/key_value_store_replica_status.py b/customSDK/servicefabric/models/key_value_store_replica_status.py new file mode 100644 index 0000000..2636b5e --- /dev/null +++ b/customSDK/servicefabric/models/key_value_store_replica_status.py @@ -0,0 +1,61 @@ +# 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 .replica_status_base import ReplicaStatusBase + + +class KeyValueStoreReplicaStatus(ReplicaStatusBase): + """Key value store related information for the replica. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param database_row_count_estimate: Value indicating the estimated number + of rows in the underlying database. + :type database_row_count_estimate: str + :param database_logical_size_estimate: Value indicating the estimated size + of the underlying database. + :type database_logical_size_estimate: str + :param copy_notification_current_key_filter: Value indicating the latest + key-prefix filter applied to enumeration during the callback. Null if + there is no pending callback. + :type copy_notification_current_key_filter: str + :param copy_notification_current_progress: Value indicating the latest + number of keys enumerated during the callback. 0 if there is no pending + callback. + :type copy_notification_current_progress: str + :param status_details: Value indicating the current status details of the + replica. + :type status_details: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'database_row_count_estimate': {'key': 'DatabaseRowCountEstimate', 'type': 'str'}, + 'database_logical_size_estimate': {'key': 'DatabaseLogicalSizeEstimate', 'type': 'str'}, + 'copy_notification_current_key_filter': {'key': 'CopyNotificationCurrentKeyFilter', 'type': 'str'}, + 'copy_notification_current_progress': {'key': 'CopyNotificationCurrentProgress', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyValueStoreReplicaStatus, self).__init__(**kwargs) + self.database_row_count_estimate = kwargs.get('database_row_count_estimate', None) + self.database_logical_size_estimate = kwargs.get('database_logical_size_estimate', None) + self.copy_notification_current_key_filter = kwargs.get('copy_notification_current_key_filter', None) + self.copy_notification_current_progress = kwargs.get('copy_notification_current_progress', None) + self.status_details = kwargs.get('status_details', None) + self.kind = 'KeyValueStore' diff --git a/customSDK/servicefabric/models/key_value_store_replica_status_py3.py b/customSDK/servicefabric/models/key_value_store_replica_status_py3.py new file mode 100644 index 0000000..14fb37c --- /dev/null +++ b/customSDK/servicefabric/models/key_value_store_replica_status_py3.py @@ -0,0 +1,61 @@ +# 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 .replica_status_base_py3 import ReplicaStatusBase + + +class KeyValueStoreReplicaStatus(ReplicaStatusBase): + """Key value store related information for the replica. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param database_row_count_estimate: Value indicating the estimated number + of rows in the underlying database. + :type database_row_count_estimate: str + :param database_logical_size_estimate: Value indicating the estimated size + of the underlying database. + :type database_logical_size_estimate: str + :param copy_notification_current_key_filter: Value indicating the latest + key-prefix filter applied to enumeration during the callback. Null if + there is no pending callback. + :type copy_notification_current_key_filter: str + :param copy_notification_current_progress: Value indicating the latest + number of keys enumerated during the callback. 0 if there is no pending + callback. + :type copy_notification_current_progress: str + :param status_details: Value indicating the current status details of the + replica. + :type status_details: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'database_row_count_estimate': {'key': 'DatabaseRowCountEstimate', 'type': 'str'}, + 'database_logical_size_estimate': {'key': 'DatabaseLogicalSizeEstimate', 'type': 'str'}, + 'copy_notification_current_key_filter': {'key': 'CopyNotificationCurrentKeyFilter', 'type': 'str'}, + 'copy_notification_current_progress': {'key': 'CopyNotificationCurrentProgress', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + } + + def __init__(self, *, database_row_count_estimate: str=None, database_logical_size_estimate: str=None, copy_notification_current_key_filter: str=None, copy_notification_current_progress: str=None, status_details: str=None, **kwargs) -> None: + super(KeyValueStoreReplicaStatus, self).__init__(**kwargs) + self.database_row_count_estimate = database_row_count_estimate + self.database_logical_size_estimate = database_logical_size_estimate + self.copy_notification_current_key_filter = copy_notification_current_key_filter + self.copy_notification_current_progress = copy_notification_current_progress + self.status_details = status_details + self.kind = 'KeyValueStore' diff --git a/customSDK/servicefabric/models/load_metric_information.py b/customSDK/servicefabric/models/load_metric_information.py new file mode 100644 index 0000000..7c8128d --- /dev/null +++ b/customSDK/servicefabric/models/load_metric_information.py @@ -0,0 +1,151 @@ +# 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 msrest.serialization import Model + + +class LoadMetricInformation(Model): + """Represents data structure that contains load information for a certain + metric in a cluster. + + :param name: Name of the metric for which this load information is + provided. + :type name: str + :param is_balanced_before: Value that indicates whether the metrics is + balanced or not before resource balancer run + :type is_balanced_before: bool + :param is_balanced_after: Value that indicates whether the metrics is + balanced or not after resource balancer run. + :type is_balanced_after: bool + :param deviation_before: The standard average deviation of the metrics + before resource balancer run. + :type deviation_before: str + :param deviation_after: The standard average deviation of the metrics + after resource balancer run. + :type deviation_after: str + :param balancing_threshold: The balancing threshold for a certain metric. + :type balancing_threshold: str + :param action: The current action being taken with regard to this metric + :type action: str + :param activity_threshold: The Activity Threshold specified for this + metric in the system Cluster Manifest. + :type activity_threshold: str + :param cluster_capacity: The total cluster capacity for a given metric + :type cluster_capacity: str + :param cluster_load: The total cluster load. In future releases of Service + Fabric this parameter will be deprecated in favor of CurrentClusterLoad. + :type cluster_load: str + :param current_cluster_load: The total cluster load. + :type current_cluster_load: str + :param cluster_remaining_capacity: The remaining capacity for the metric + in the cluster. In future releases of Service Fabric this parameter will + be deprecated in favor of ClusterCapacityRemaining. + :type cluster_remaining_capacity: str + :param cluster_capacity_remaining: The remaining capacity for the metric + in the cluster. + :type cluster_capacity_remaining: str + :param is_cluster_capacity_violation: Indicates that the metric is + currently over capacity in the cluster. + :type is_cluster_capacity_violation: bool + :param node_buffer_percentage: The reserved percentage of total node + capacity for this metric. + :type node_buffer_percentage: str + :param cluster_buffered_capacity: Remaining capacity in the cluster + excluding the reserved space. In future releases of Service Fabric this + parameter will be deprecated in favor of BufferedClusterCapacityRemaining. + :type cluster_buffered_capacity: str + :param buffered_cluster_capacity_remaining: Remaining capacity in the + cluster excluding the reserved space. + :type buffered_cluster_capacity_remaining: str + :param cluster_remaining_buffered_capacity: The remaining percentage of + cluster total capacity for this metric. + :type cluster_remaining_buffered_capacity: str + :param min_node_load_value: The minimum load on any node for this metric. + In future releases of Service Fabric this parameter will be deprecated in + favor of MinimumNodeLoad. + :type min_node_load_value: str + :param minimum_node_load: The minimum load on any node for this metric. + :type minimum_node_load: str + :param min_node_load_node_id: The node id of the node with the minimum + load for this metric. + :type min_node_load_node_id: ~azure.servicefabric.models.NodeId + :param max_node_load_value: The maximum load on any node for this metric. + In future releases of Service Fabric this parameter will be deprecated in + favor of MaximumNodeLoad. + :type max_node_load_value: str + :param maximum_node_load: The maximum load on any node for this metric. + :type maximum_node_load: str + :param max_node_load_node_id: The node id of the node with the maximum + load for this metric. + :type max_node_load_node_id: ~azure.servicefabric.models.NodeId + :param planned_load_removal: This value represents the load of the + replicas that are planned to be removed in the future within the cluster. + This kind of load is reported for replicas that are currently being moving + to other nodes and for replicas that are currently being dropped but still + use the load on the source node. + :type planned_load_removal: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'is_balanced_before': {'key': 'IsBalancedBefore', 'type': 'bool'}, + 'is_balanced_after': {'key': 'IsBalancedAfter', 'type': 'bool'}, + 'deviation_before': {'key': 'DeviationBefore', 'type': 'str'}, + 'deviation_after': {'key': 'DeviationAfter', 'type': 'str'}, + 'balancing_threshold': {'key': 'BalancingThreshold', 'type': 'str'}, + 'action': {'key': 'Action', 'type': 'str'}, + 'activity_threshold': {'key': 'ActivityThreshold', 'type': 'str'}, + 'cluster_capacity': {'key': 'ClusterCapacity', 'type': 'str'}, + 'cluster_load': {'key': 'ClusterLoad', 'type': 'str'}, + 'current_cluster_load': {'key': 'CurrentClusterLoad', 'type': 'str'}, + 'cluster_remaining_capacity': {'key': 'ClusterRemainingCapacity', 'type': 'str'}, + 'cluster_capacity_remaining': {'key': 'ClusterCapacityRemaining', 'type': 'str'}, + 'is_cluster_capacity_violation': {'key': 'IsClusterCapacityViolation', 'type': 'bool'}, + 'node_buffer_percentage': {'key': 'NodeBufferPercentage', 'type': 'str'}, + 'cluster_buffered_capacity': {'key': 'ClusterBufferedCapacity', 'type': 'str'}, + 'buffered_cluster_capacity_remaining': {'key': 'BufferedClusterCapacityRemaining', 'type': 'str'}, + 'cluster_remaining_buffered_capacity': {'key': 'ClusterRemainingBufferedCapacity', 'type': 'str'}, + 'min_node_load_value': {'key': 'MinNodeLoadValue', 'type': 'str'}, + 'minimum_node_load': {'key': 'MinimumNodeLoad', 'type': 'str'}, + 'min_node_load_node_id': {'key': 'MinNodeLoadNodeId', 'type': 'NodeId'}, + 'max_node_load_value': {'key': 'MaxNodeLoadValue', 'type': 'str'}, + 'maximum_node_load': {'key': 'MaximumNodeLoad', 'type': 'str'}, + 'max_node_load_node_id': {'key': 'MaxNodeLoadNodeId', 'type': 'NodeId'}, + 'planned_load_removal': {'key': 'PlannedLoadRemoval', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LoadMetricInformation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.is_balanced_before = kwargs.get('is_balanced_before', None) + self.is_balanced_after = kwargs.get('is_balanced_after', None) + self.deviation_before = kwargs.get('deviation_before', None) + self.deviation_after = kwargs.get('deviation_after', None) + self.balancing_threshold = kwargs.get('balancing_threshold', None) + self.action = kwargs.get('action', None) + self.activity_threshold = kwargs.get('activity_threshold', None) + self.cluster_capacity = kwargs.get('cluster_capacity', None) + self.cluster_load = kwargs.get('cluster_load', None) + self.current_cluster_load = kwargs.get('current_cluster_load', None) + self.cluster_remaining_capacity = kwargs.get('cluster_remaining_capacity', None) + self.cluster_capacity_remaining = kwargs.get('cluster_capacity_remaining', None) + self.is_cluster_capacity_violation = kwargs.get('is_cluster_capacity_violation', None) + self.node_buffer_percentage = kwargs.get('node_buffer_percentage', None) + self.cluster_buffered_capacity = kwargs.get('cluster_buffered_capacity', None) + self.buffered_cluster_capacity_remaining = kwargs.get('buffered_cluster_capacity_remaining', None) + self.cluster_remaining_buffered_capacity = kwargs.get('cluster_remaining_buffered_capacity', None) + self.min_node_load_value = kwargs.get('min_node_load_value', None) + self.minimum_node_load = kwargs.get('minimum_node_load', None) + self.min_node_load_node_id = kwargs.get('min_node_load_node_id', None) + self.max_node_load_value = kwargs.get('max_node_load_value', None) + self.maximum_node_load = kwargs.get('maximum_node_load', None) + self.max_node_load_node_id = kwargs.get('max_node_load_node_id', None) + self.planned_load_removal = kwargs.get('planned_load_removal', None) diff --git a/customSDK/servicefabric/models/load_metric_information_py3.py b/customSDK/servicefabric/models/load_metric_information_py3.py new file mode 100644 index 0000000..93597ef --- /dev/null +++ b/customSDK/servicefabric/models/load_metric_information_py3.py @@ -0,0 +1,151 @@ +# 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 msrest.serialization import Model + + +class LoadMetricInformation(Model): + """Represents data structure that contains load information for a certain + metric in a cluster. + + :param name: Name of the metric for which this load information is + provided. + :type name: str + :param is_balanced_before: Value that indicates whether the metrics is + balanced or not before resource balancer run + :type is_balanced_before: bool + :param is_balanced_after: Value that indicates whether the metrics is + balanced or not after resource balancer run. + :type is_balanced_after: bool + :param deviation_before: The standard average deviation of the metrics + before resource balancer run. + :type deviation_before: str + :param deviation_after: The standard average deviation of the metrics + after resource balancer run. + :type deviation_after: str + :param balancing_threshold: The balancing threshold for a certain metric. + :type balancing_threshold: str + :param action: The current action being taken with regard to this metric + :type action: str + :param activity_threshold: The Activity Threshold specified for this + metric in the system Cluster Manifest. + :type activity_threshold: str + :param cluster_capacity: The total cluster capacity for a given metric + :type cluster_capacity: str + :param cluster_load: The total cluster load. In future releases of Service + Fabric this parameter will be deprecated in favor of CurrentClusterLoad. + :type cluster_load: str + :param current_cluster_load: The total cluster load. + :type current_cluster_load: str + :param cluster_remaining_capacity: The remaining capacity for the metric + in the cluster. In future releases of Service Fabric this parameter will + be deprecated in favor of ClusterCapacityRemaining. + :type cluster_remaining_capacity: str + :param cluster_capacity_remaining: The remaining capacity for the metric + in the cluster. + :type cluster_capacity_remaining: str + :param is_cluster_capacity_violation: Indicates that the metric is + currently over capacity in the cluster. + :type is_cluster_capacity_violation: bool + :param node_buffer_percentage: The reserved percentage of total node + capacity for this metric. + :type node_buffer_percentage: str + :param cluster_buffered_capacity: Remaining capacity in the cluster + excluding the reserved space. In future releases of Service Fabric this + parameter will be deprecated in favor of BufferedClusterCapacityRemaining. + :type cluster_buffered_capacity: str + :param buffered_cluster_capacity_remaining: Remaining capacity in the + cluster excluding the reserved space. + :type buffered_cluster_capacity_remaining: str + :param cluster_remaining_buffered_capacity: The remaining percentage of + cluster total capacity for this metric. + :type cluster_remaining_buffered_capacity: str + :param min_node_load_value: The minimum load on any node for this metric. + In future releases of Service Fabric this parameter will be deprecated in + favor of MinimumNodeLoad. + :type min_node_load_value: str + :param minimum_node_load: The minimum load on any node for this metric. + :type minimum_node_load: str + :param min_node_load_node_id: The node id of the node with the minimum + load for this metric. + :type min_node_load_node_id: ~azure.servicefabric.models.NodeId + :param max_node_load_value: The maximum load on any node for this metric. + In future releases of Service Fabric this parameter will be deprecated in + favor of MaximumNodeLoad. + :type max_node_load_value: str + :param maximum_node_load: The maximum load on any node for this metric. + :type maximum_node_load: str + :param max_node_load_node_id: The node id of the node with the maximum + load for this metric. + :type max_node_load_node_id: ~azure.servicefabric.models.NodeId + :param planned_load_removal: This value represents the load of the + replicas that are planned to be removed in the future within the cluster. + This kind of load is reported for replicas that are currently being moving + to other nodes and for replicas that are currently being dropped but still + use the load on the source node. + :type planned_load_removal: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'is_balanced_before': {'key': 'IsBalancedBefore', 'type': 'bool'}, + 'is_balanced_after': {'key': 'IsBalancedAfter', 'type': 'bool'}, + 'deviation_before': {'key': 'DeviationBefore', 'type': 'str'}, + 'deviation_after': {'key': 'DeviationAfter', 'type': 'str'}, + 'balancing_threshold': {'key': 'BalancingThreshold', 'type': 'str'}, + 'action': {'key': 'Action', 'type': 'str'}, + 'activity_threshold': {'key': 'ActivityThreshold', 'type': 'str'}, + 'cluster_capacity': {'key': 'ClusterCapacity', 'type': 'str'}, + 'cluster_load': {'key': 'ClusterLoad', 'type': 'str'}, + 'current_cluster_load': {'key': 'CurrentClusterLoad', 'type': 'str'}, + 'cluster_remaining_capacity': {'key': 'ClusterRemainingCapacity', 'type': 'str'}, + 'cluster_capacity_remaining': {'key': 'ClusterCapacityRemaining', 'type': 'str'}, + 'is_cluster_capacity_violation': {'key': 'IsClusterCapacityViolation', 'type': 'bool'}, + 'node_buffer_percentage': {'key': 'NodeBufferPercentage', 'type': 'str'}, + 'cluster_buffered_capacity': {'key': 'ClusterBufferedCapacity', 'type': 'str'}, + 'buffered_cluster_capacity_remaining': {'key': 'BufferedClusterCapacityRemaining', 'type': 'str'}, + 'cluster_remaining_buffered_capacity': {'key': 'ClusterRemainingBufferedCapacity', 'type': 'str'}, + 'min_node_load_value': {'key': 'MinNodeLoadValue', 'type': 'str'}, + 'minimum_node_load': {'key': 'MinimumNodeLoad', 'type': 'str'}, + 'min_node_load_node_id': {'key': 'MinNodeLoadNodeId', 'type': 'NodeId'}, + 'max_node_load_value': {'key': 'MaxNodeLoadValue', 'type': 'str'}, + 'maximum_node_load': {'key': 'MaximumNodeLoad', 'type': 'str'}, + 'max_node_load_node_id': {'key': 'MaxNodeLoadNodeId', 'type': 'NodeId'}, + 'planned_load_removal': {'key': 'PlannedLoadRemoval', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, is_balanced_before: bool=None, is_balanced_after: bool=None, deviation_before: str=None, deviation_after: str=None, balancing_threshold: str=None, action: str=None, activity_threshold: str=None, cluster_capacity: str=None, cluster_load: str=None, current_cluster_load: str=None, cluster_remaining_capacity: str=None, cluster_capacity_remaining: str=None, is_cluster_capacity_violation: bool=None, node_buffer_percentage: str=None, cluster_buffered_capacity: str=None, buffered_cluster_capacity_remaining: str=None, cluster_remaining_buffered_capacity: str=None, min_node_load_value: str=None, minimum_node_load: str=None, min_node_load_node_id=None, max_node_load_value: str=None, maximum_node_load: str=None, max_node_load_node_id=None, planned_load_removal: str=None, **kwargs) -> None: + super(LoadMetricInformation, self).__init__(**kwargs) + self.name = name + self.is_balanced_before = is_balanced_before + self.is_balanced_after = is_balanced_after + self.deviation_before = deviation_before + self.deviation_after = deviation_after + self.balancing_threshold = balancing_threshold + self.action = action + self.activity_threshold = activity_threshold + self.cluster_capacity = cluster_capacity + self.cluster_load = cluster_load + self.current_cluster_load = current_cluster_load + self.cluster_remaining_capacity = cluster_remaining_capacity + self.cluster_capacity_remaining = cluster_capacity_remaining + self.is_cluster_capacity_violation = is_cluster_capacity_violation + self.node_buffer_percentage = node_buffer_percentage + self.cluster_buffered_capacity = cluster_buffered_capacity + self.buffered_cluster_capacity_remaining = buffered_cluster_capacity_remaining + self.cluster_remaining_buffered_capacity = cluster_remaining_buffered_capacity + self.min_node_load_value = min_node_load_value + self.minimum_node_load = minimum_node_load + self.min_node_load_node_id = min_node_load_node_id + self.max_node_load_value = max_node_load_value + self.maximum_node_load = maximum_node_load + self.max_node_load_node_id = max_node_load_node_id + self.planned_load_removal = planned_load_removal diff --git a/customSDK/servicefabric/models/load_metric_report.py b/customSDK/servicefabric/models/load_metric_report.py new file mode 100644 index 0000000..2e7e321 --- /dev/null +++ b/customSDK/servicefabric/models/load_metric_report.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class LoadMetricReport(Model): + """Represents the load metric report which contains the time metric was + reported, its name and value. + + :param last_reported_utc: Gets the UTC time when the load was reported. + :type last_reported_utc: datetime + :param name: The name of the load metric. + :type name: str + :param value: The value of the load metric. In future releases of Service + Fabric this parameter will be deprecated in favor of CurrentValue. + :type value: str + :param current_value: The value of the load metric. + :type current_value: str + """ + + _attribute_map = { + 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + 'current_value': {'key': 'CurrentValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LoadMetricReport, self).__init__(**kwargs) + self.last_reported_utc = kwargs.get('last_reported_utc', None) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + self.current_value = kwargs.get('current_value', None) diff --git a/customSDK/servicefabric/models/load_metric_report_info.py b/customSDK/servicefabric/models/load_metric_report_info.py new file mode 100644 index 0000000..93fd4a4 --- /dev/null +++ b/customSDK/servicefabric/models/load_metric_report_info.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class LoadMetricReportInfo(Model): + """Information about load reported by replica. + + :param name: The name of the metric. + :type name: str + :param value: The value of the load for the metric. In future releases of + Service Fabric this parameter will be deprecated in favor of CurrentValue. + :type value: int + :param current_value: The double value of the load for the metric. + :type current_value: str + :param last_reported_utc: The UTC time when the load is reported. + :type last_reported_utc: datetime + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + 'current_value': {'key': 'CurrentValue', 'type': 'str'}, + 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(LoadMetricReportInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + self.current_value = kwargs.get('current_value', None) + self.last_reported_utc = kwargs.get('last_reported_utc', None) diff --git a/customSDK/servicefabric/models/load_metric_report_info_py3.py b/customSDK/servicefabric/models/load_metric_report_info_py3.py new file mode 100644 index 0000000..2401392 --- /dev/null +++ b/customSDK/servicefabric/models/load_metric_report_info_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class LoadMetricReportInfo(Model): + """Information about load reported by replica. + + :param name: The name of the metric. + :type name: str + :param value: The value of the load for the metric. In future releases of + Service Fabric this parameter will be deprecated in favor of CurrentValue. + :type value: int + :param current_value: The double value of the load for the metric. + :type current_value: str + :param last_reported_utc: The UTC time when the load is reported. + :type last_reported_utc: datetime + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + 'current_value': {'key': 'CurrentValue', 'type': 'str'}, + 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, + } + + def __init__(self, *, name: str=None, value: int=None, current_value: str=None, last_reported_utc=None, **kwargs) -> None: + super(LoadMetricReportInfo, self).__init__(**kwargs) + self.name = name + self.value = value + self.current_value = current_value + self.last_reported_utc = last_reported_utc diff --git a/customSDK/servicefabric/models/load_metric_report_py3.py b/customSDK/servicefabric/models/load_metric_report_py3.py new file mode 100644 index 0000000..e8aec5b --- /dev/null +++ b/customSDK/servicefabric/models/load_metric_report_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class LoadMetricReport(Model): + """Represents the load metric report which contains the time metric was + reported, its name and value. + + :param last_reported_utc: Gets the UTC time when the load was reported. + :type last_reported_utc: datetime + :param name: The name of the load metric. + :type name: str + :param value: The value of the load metric. In future releases of Service + Fabric this parameter will be deprecated in favor of CurrentValue. + :type value: str + :param current_value: The value of the load metric. + :type current_value: str + """ + + _attribute_map = { + 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + 'current_value': {'key': 'CurrentValue', 'type': 'str'}, + } + + def __init__(self, *, last_reported_utc=None, name: str=None, value: str=None, current_value: str=None, **kwargs) -> None: + super(LoadMetricReport, self).__init__(**kwargs) + self.last_reported_utc = last_reported_utc + self.name = name + self.value = value + self.current_value = current_value diff --git a/customSDK/servicefabric/models/loaded_partition_information_query_description.py b/customSDK/servicefabric/models/loaded_partition_information_query_description.py new file mode 100644 index 0000000..986c87e --- /dev/null +++ b/customSDK/servicefabric/models/loaded_partition_information_query_description.py @@ -0,0 +1,57 @@ +# 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 msrest.serialization import Model + + +class LoadedPartitionInformationQueryDescription(Model): + """Represents data structure that contains query information. + + :param metric_name: Name of the metric for which this information is + provided. + :type metric_name: str + :param service_name: Name of the service this partition belongs to. + :type service_name: str + :param ordering: Ordering of partitions' load. Possible values include: + 'Desc', 'Asc'. Default value: "Desc" . + :type ordering: str or ~azure.servicefabric.models.Ordering + :param max_results: The maximum number of results to be returned as part + of the paged queries. This parameter defines the upper bound on the number + of results returned. The results returned can be less than the specified + maximum results if they do not fit in the message as per the max message + size restrictions defined in the configuration. If this parameter is zero + or not specified, the paged query includes as many results as possible + that fit in the return message. + :type max_results: long + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + """ + + _attribute_map = { + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'ordering': {'key': 'Ordering', 'type': 'str'}, + 'max_results': {'key': 'MaxResults', 'type': 'long'}, + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LoadedPartitionInformationQueryDescription, self).__init__(**kwargs) + self.metric_name = kwargs.get('metric_name', None) + self.service_name = kwargs.get('service_name', None) + self.ordering = kwargs.get('ordering', "Desc") + self.max_results = kwargs.get('max_results', None) + self.continuation_token = kwargs.get('continuation_token', None) diff --git a/customSDK/servicefabric/models/loaded_partition_information_query_description_py3.py b/customSDK/servicefabric/models/loaded_partition_information_query_description_py3.py new file mode 100644 index 0000000..644d21e --- /dev/null +++ b/customSDK/servicefabric/models/loaded_partition_information_query_description_py3.py @@ -0,0 +1,57 @@ +# 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 msrest.serialization import Model + + +class LoadedPartitionInformationQueryDescription(Model): + """Represents data structure that contains query information. + + :param metric_name: Name of the metric for which this information is + provided. + :type metric_name: str + :param service_name: Name of the service this partition belongs to. + :type service_name: str + :param ordering: Ordering of partitions' load. Possible values include: + 'Desc', 'Asc'. Default value: "Desc" . + :type ordering: str or ~azure.servicefabric.models.Ordering + :param max_results: The maximum number of results to be returned as part + of the paged queries. This parameter defines the upper bound on the number + of results returned. The results returned can be less than the specified + maximum results if they do not fit in the message as per the max message + size restrictions defined in the configuration. If this parameter is zero + or not specified, the paged query includes as many results as possible + that fit in the return message. + :type max_results: long + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + """ + + _attribute_map = { + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'ordering': {'key': 'Ordering', 'type': 'str'}, + 'max_results': {'key': 'MaxResults', 'type': 'long'}, + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + } + + def __init__(self, *, metric_name: str=None, service_name: str=None, ordering="Desc", max_results: int=None, continuation_token: str=None, **kwargs) -> None: + super(LoadedPartitionInformationQueryDescription, self).__init__(**kwargs) + self.metric_name = metric_name + self.service_name = service_name + self.ordering = ordering + self.max_results = max_results + self.continuation_token = continuation_token diff --git a/customSDK/servicefabric/models/loaded_partition_information_result.py b/customSDK/servicefabric/models/loaded_partition_information_result.py new file mode 100644 index 0000000..8a76089 --- /dev/null +++ b/customSDK/servicefabric/models/loaded_partition_information_result.py @@ -0,0 +1,51 @@ +# 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 msrest.serialization import Model + + +class LoadedPartitionInformationResult(Model): + """Represents partition information. + + All required parameters must be populated in order to send to Azure. + + :param service_name: Required. Name of the service this partition belongs + to. + :type service_name: str + :param partition_id: Required. Id of the partition. + :type partition_id: str + :param metric_name: Required. Name of the metric for which this + information is provided. + :type metric_name: str + :param load: Required. Load for metric. + :type load: long + """ + + _validation = { + 'service_name': {'required': True}, + 'partition_id': {'required': True}, + 'metric_name': {'required': True}, + 'load': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'load': {'key': 'Load', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(LoadedPartitionInformationResult, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) + self.metric_name = kwargs.get('metric_name', None) + self.load = kwargs.get('load', None) diff --git a/customSDK/servicefabric/models/loaded_partition_information_result_list.py b/customSDK/servicefabric/models/loaded_partition_information_result_list.py new file mode 100644 index 0000000..319bdca --- /dev/null +++ b/customSDK/servicefabric/models/loaded_partition_information_result_list.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class LoadedPartitionInformationResultList(Model): + """Represents data structure that contains top/least loaded partitions for a + certain metric. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of application information. + :type items: + list[~azure.servicefabric.models.LoadedPartitionInformationResult] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[LoadedPartitionInformationResult]'}, + } + + def __init__(self, **kwargs): + super(LoadedPartitionInformationResultList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/loaded_partition_information_result_list_py3.py b/customSDK/servicefabric/models/loaded_partition_information_result_list_py3.py new file mode 100644 index 0000000..e10367a --- /dev/null +++ b/customSDK/servicefabric/models/loaded_partition_information_result_list_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class LoadedPartitionInformationResultList(Model): + """Represents data structure that contains top/least loaded partitions for a + certain metric. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of application information. + :type items: + list[~azure.servicefabric.models.LoadedPartitionInformationResult] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[LoadedPartitionInformationResult]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(LoadedPartitionInformationResultList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/loaded_partition_information_result_py3.py b/customSDK/servicefabric/models/loaded_partition_information_result_py3.py new file mode 100644 index 0000000..9af2dee --- /dev/null +++ b/customSDK/servicefabric/models/loaded_partition_information_result_py3.py @@ -0,0 +1,51 @@ +# 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 msrest.serialization import Model + + +class LoadedPartitionInformationResult(Model): + """Represents partition information. + + All required parameters must be populated in order to send to Azure. + + :param service_name: Required. Name of the service this partition belongs + to. + :type service_name: str + :param partition_id: Required. Id of the partition. + :type partition_id: str + :param metric_name: Required. Name of the metric for which this + information is provided. + :type metric_name: str + :param load: Required. Load for metric. + :type load: long + """ + + _validation = { + 'service_name': {'required': True}, + 'partition_id': {'required': True}, + 'metric_name': {'required': True}, + 'load': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'load': {'key': 'Load', 'type': 'long'}, + } + + def __init__(self, *, service_name: str, partition_id: str, metric_name: str, load: int, **kwargs) -> None: + super(LoadedPartitionInformationResult, self).__init__(**kwargs) + self.service_name = service_name + self.partition_id = partition_id + self.metric_name = metric_name + self.load = load diff --git a/customSDK/servicefabric/models/local_network_resource_properties.py b/customSDK/servicefabric/models/local_network_resource_properties.py new file mode 100644 index 0000000..98eddf5 --- /dev/null +++ b/customSDK/servicefabric/models/local_network_resource_properties.py @@ -0,0 +1,56 @@ +# 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 .network_resource_properties import NetworkResourceProperties + + +class LocalNetworkResourceProperties(NetworkResourceProperties): + """Information about a Service Fabric container network local to a single + Service Fabric cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param description: User readable description of the network. + :type description: str + :ivar status: Status of the network. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the network. + :vartype status_details: str + :param network_address_prefix: Address space for the local container + network. + :type network_address_prefix: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'network_address_prefix': {'key': 'networkAddressPrefix', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LocalNetworkResourceProperties, self).__init__(**kwargs) + self.network_address_prefix = kwargs.get('network_address_prefix', None) + self.kind = 'Local' diff --git a/customSDK/servicefabric/models/local_network_resource_properties_py3.py b/customSDK/servicefabric/models/local_network_resource_properties_py3.py new file mode 100644 index 0000000..6578e59 --- /dev/null +++ b/customSDK/servicefabric/models/local_network_resource_properties_py3.py @@ -0,0 +1,56 @@ +# 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 .network_resource_properties_py3 import NetworkResourceProperties + + +class LocalNetworkResourceProperties(NetworkResourceProperties): + """Information about a Service Fabric container network local to a single + Service Fabric cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param description: User readable description of the network. + :type description: str + :ivar status: Status of the network. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the network. + :vartype status_details: str + :param network_address_prefix: Address space for the local container + network. + :type network_address_prefix: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'network_address_prefix': {'key': 'networkAddressPrefix', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, network_address_prefix: str=None, **kwargs) -> None: + super(LocalNetworkResourceProperties, self).__init__(description=description, **kwargs) + self.network_address_prefix = network_address_prefix + self.kind = 'Local' diff --git a/customSDK/servicefabric/models/managed_application_identity.py b/customSDK/servicefabric/models/managed_application_identity.py new file mode 100644 index 0000000..6db3042 --- /dev/null +++ b/customSDK/servicefabric/models/managed_application_identity.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class ManagedApplicationIdentity(Model): + """Describes a managed application identity. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the identity. + :type name: str + :param principal_id: The identity's PrincipalId. + :type principal_id: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'principal_id': {'key': 'PrincipalId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedApplicationIdentity, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.principal_id = kwargs.get('principal_id', None) diff --git a/customSDK/servicefabric/models/managed_application_identity_description.py b/customSDK/servicefabric/models/managed_application_identity_description.py new file mode 100644 index 0000000..f5137dc --- /dev/null +++ b/customSDK/servicefabric/models/managed_application_identity_description.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class ManagedApplicationIdentityDescription(Model): + """Managed application identity description. + + :param token_service_endpoint: Token service endpoint. + :type token_service_endpoint: str + :param managed_identities: A list of managed application identity objects. + :type managed_identities: + list[~azure.servicefabric.models.ManagedApplicationIdentity] + """ + + _attribute_map = { + 'token_service_endpoint': {'key': 'TokenServiceEndpoint', 'type': 'str'}, + 'managed_identities': {'key': 'ManagedIdentities', 'type': '[ManagedApplicationIdentity]'}, + } + + def __init__(self, **kwargs): + super(ManagedApplicationIdentityDescription, self).__init__(**kwargs) + self.token_service_endpoint = kwargs.get('token_service_endpoint', None) + self.managed_identities = kwargs.get('managed_identities', None) diff --git a/customSDK/servicefabric/models/managed_application_identity_description_py3.py b/customSDK/servicefabric/models/managed_application_identity_description_py3.py new file mode 100644 index 0000000..c8a173d --- /dev/null +++ b/customSDK/servicefabric/models/managed_application_identity_description_py3.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class ManagedApplicationIdentityDescription(Model): + """Managed application identity description. + + :param token_service_endpoint: Token service endpoint. + :type token_service_endpoint: str + :param managed_identities: A list of managed application identity objects. + :type managed_identities: + list[~azure.servicefabric.models.ManagedApplicationIdentity] + """ + + _attribute_map = { + 'token_service_endpoint': {'key': 'TokenServiceEndpoint', 'type': 'str'}, + 'managed_identities': {'key': 'ManagedIdentities', 'type': '[ManagedApplicationIdentity]'}, + } + + def __init__(self, *, token_service_endpoint: str=None, managed_identities=None, **kwargs) -> None: + super(ManagedApplicationIdentityDescription, self).__init__(**kwargs) + self.token_service_endpoint = token_service_endpoint + self.managed_identities = managed_identities diff --git a/customSDK/servicefabric/models/managed_application_identity_py3.py b/customSDK/servicefabric/models/managed_application_identity_py3.py new file mode 100644 index 0000000..ad514fc --- /dev/null +++ b/customSDK/servicefabric/models/managed_application_identity_py3.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class ManagedApplicationIdentity(Model): + """Describes a managed application identity. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the identity. + :type name: str + :param principal_id: The identity's PrincipalId. + :type principal_id: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'principal_id': {'key': 'PrincipalId', 'type': 'str'}, + } + + def __init__(self, *, name: str, principal_id: str=None, **kwargs) -> None: + super(ManagedApplicationIdentity, self).__init__(**kwargs) + self.name = name + self.principal_id = principal_id diff --git a/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description.py b/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description.py new file mode 100644 index 0000000..e817c27 --- /dev/null +++ b/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description.py @@ -0,0 +1,58 @@ +# 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 .backup_storage_description import BackupStorageDescription + + +class ManagedIdentityAzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Azure blob store (connected using managed + identity) used for storing and enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param managed_identity_type: Required. The type of managed identity to be + used to connect to Azure Blob Store via Managed Identity. Possible values + include: 'Invalid', 'VMSS', 'Cluster' + :type managed_identity_type: str or + ~azure.servicefabric.models.ManagedIdentityType + :param blob_service_uri: Required. The Blob Service Uri to connect to the + Azure blob store.. + :type blob_service_uri: str + :param container_name: Required. The name of the container in the blob + store to store and enumerate backups from. + :type container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'managed_identity_type': {'required': True}, + 'blob_service_uri': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'managed_identity_type': {'key': 'ManagedIdentityType', 'type': 'str'}, + 'blob_service_uri': {'key': 'BlobServiceUri', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedIdentityAzureBlobBackupStorageDescription, self).__init__(**kwargs) + self.managed_identity_type = kwargs.get('managed_identity_type', None) + self.blob_service_uri = kwargs.get('blob_service_uri', None) + self.container_name = kwargs.get('container_name', None) + self.storage_kind = 'ManagedIdentityAzureBlobStore' diff --git a/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description_py3.py b/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description_py3.py new file mode 100644 index 0000000..af895d5 --- /dev/null +++ b/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description_py3.py @@ -0,0 +1,58 @@ +# 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 .backup_storage_description_py3 import BackupStorageDescription + + +class ManagedIdentityAzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Azure blob store (connected using managed + identity) used for storing and enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param managed_identity_type: Required. The type of managed identity to be + used to connect to Azure Blob Store via Managed Identity. Possible values + include: 'Invalid', 'VMSS', 'Cluster' + :type managed_identity_type: str or + ~azure.servicefabric.models.ManagedIdentityType + :param blob_service_uri: Required. The Blob Service Uri to connect to the + Azure blob store.. + :type blob_service_uri: str + :param container_name: Required. The name of the container in the blob + store to store and enumerate backups from. + :type container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'managed_identity_type': {'required': True}, + 'blob_service_uri': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'managed_identity_type': {'key': 'ManagedIdentityType', 'type': 'str'}, + 'blob_service_uri': {'key': 'BlobServiceUri', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, *, managed_identity_type, blob_service_uri: str, container_name: str, friendly_name: str=None, **kwargs) -> None: + super(ManagedIdentityAzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) + self.managed_identity_type = managed_identity_type + self.blob_service_uri = blob_service_uri + self.container_name = container_name + self.storage_kind = 'ManagedIdentityAzureBlobStore' diff --git a/customSDK/servicefabric/models/metric_load_description.py b/customSDK/servicefabric/models/metric_load_description.py new file mode 100644 index 0000000..8e1b520 --- /dev/null +++ b/customSDK/servicefabric/models/metric_load_description.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class MetricLoadDescription(Model): + """Specifies metric load information. + + :param metric_name: The name of the reported metric. + :type metric_name: str + :param current_load: The current value of the metric load. + :type current_load: long + :param predicted_load: The predicted value of the metric load. + :type predicted_load: long + """ + + _attribute_map = { + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'current_load': {'key': 'CurrentLoad', 'type': 'long'}, + 'predicted_load': {'key': 'PredictedLoad', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(MetricLoadDescription, self).__init__(**kwargs) + self.metric_name = kwargs.get('metric_name', None) + self.current_load = kwargs.get('current_load', None) + self.predicted_load = kwargs.get('predicted_load', None) diff --git a/customSDK/servicefabric/models/metric_load_description_py3.py b/customSDK/servicefabric/models/metric_load_description_py3.py new file mode 100644 index 0000000..fa1a069 --- /dev/null +++ b/customSDK/servicefabric/models/metric_load_description_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class MetricLoadDescription(Model): + """Specifies metric load information. + + :param metric_name: The name of the reported metric. + :type metric_name: str + :param current_load: The current value of the metric load. + :type current_load: long + :param predicted_load: The predicted value of the metric load. + :type predicted_load: long + """ + + _attribute_map = { + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'current_load': {'key': 'CurrentLoad', 'type': 'long'}, + 'predicted_load': {'key': 'PredictedLoad', 'type': 'long'}, + } + + def __init__(self, *, metric_name: str=None, current_load: int=None, predicted_load: int=None, **kwargs) -> None: + super(MetricLoadDescription, self).__init__(**kwargs) + self.metric_name = metric_name + self.current_load = current_load + self.predicted_load = predicted_load diff --git a/customSDK/servicefabric/models/monitoring_policy_description.py b/customSDK/servicefabric/models/monitoring_policy_description.py new file mode 100644 index 0000000..6b95c6e --- /dev/null +++ b/customSDK/servicefabric/models/monitoring_policy_description.py @@ -0,0 +1,73 @@ +# 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 msrest.serialization import Model + + +class MonitoringPolicyDescription(Model): + """Describes the parameters for monitoring an upgrade in Monitored mode. + + :param failure_action: The compensating action to perform when a Monitored + upgrade encounters monitoring policy or health policy violations. + Invalid indicates the failure action is invalid. Rollback specifies that + the upgrade will start rolling back automatically. + Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + :type failure_action: str or ~azure.servicefabric.models.FailureAction + :param health_check_wait_duration_in_milliseconds: The amount of time to + wait after completing an upgrade domain before applying health policies. + It is first interpreted as a string representing an ISO 8601 duration. If + that fails, then it is interpreted as a number representing the total + number of milliseconds. + :type health_check_wait_duration_in_milliseconds: str + :param health_check_stable_duration_in_milliseconds: The amount of time + that the application or cluster must remain healthy before the upgrade + proceeds to the next upgrade domain. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type health_check_stable_duration_in_milliseconds: str + :param health_check_retry_timeout_in_milliseconds: The amount of time to + retry health evaluation when the application or cluster is unhealthy + before FailureAction is executed. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type health_check_retry_timeout_in_milliseconds: str + :param upgrade_timeout_in_milliseconds: The amount of time the overall + upgrade has to complete before FailureAction is executed. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, + then it is interpreted as a number representing the total number of + milliseconds. + :type upgrade_timeout_in_milliseconds: str + :param upgrade_domain_timeout_in_milliseconds: The amount of time each + upgrade domain has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + :type upgrade_domain_timeout_in_milliseconds: str + """ + + _attribute_map = { + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, + 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, + 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MonitoringPolicyDescription, self).__init__(**kwargs) + self.failure_action = kwargs.get('failure_action', None) + self.health_check_wait_duration_in_milliseconds = kwargs.get('health_check_wait_duration_in_milliseconds', None) + self.health_check_stable_duration_in_milliseconds = kwargs.get('health_check_stable_duration_in_milliseconds', None) + self.health_check_retry_timeout_in_milliseconds = kwargs.get('health_check_retry_timeout_in_milliseconds', None) + self.upgrade_timeout_in_milliseconds = kwargs.get('upgrade_timeout_in_milliseconds', None) + self.upgrade_domain_timeout_in_milliseconds = kwargs.get('upgrade_domain_timeout_in_milliseconds', None) diff --git a/customSDK/servicefabric/models/monitoring_policy_description_py3.py b/customSDK/servicefabric/models/monitoring_policy_description_py3.py new file mode 100644 index 0000000..1e3b0c8 --- /dev/null +++ b/customSDK/servicefabric/models/monitoring_policy_description_py3.py @@ -0,0 +1,73 @@ +# 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 msrest.serialization import Model + + +class MonitoringPolicyDescription(Model): + """Describes the parameters for monitoring an upgrade in Monitored mode. + + :param failure_action: The compensating action to perform when a Monitored + upgrade encounters monitoring policy or health policy violations. + Invalid indicates the failure action is invalid. Rollback specifies that + the upgrade will start rolling back automatically. + Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + :type failure_action: str or ~azure.servicefabric.models.FailureAction + :param health_check_wait_duration_in_milliseconds: The amount of time to + wait after completing an upgrade domain before applying health policies. + It is first interpreted as a string representing an ISO 8601 duration. If + that fails, then it is interpreted as a number representing the total + number of milliseconds. + :type health_check_wait_duration_in_milliseconds: str + :param health_check_stable_duration_in_milliseconds: The amount of time + that the application or cluster must remain healthy before the upgrade + proceeds to the next upgrade domain. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type health_check_stable_duration_in_milliseconds: str + :param health_check_retry_timeout_in_milliseconds: The amount of time to + retry health evaluation when the application or cluster is unhealthy + before FailureAction is executed. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type health_check_retry_timeout_in_milliseconds: str + :param upgrade_timeout_in_milliseconds: The amount of time the overall + upgrade has to complete before FailureAction is executed. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, + then it is interpreted as a number representing the total number of + milliseconds. + :type upgrade_timeout_in_milliseconds: str + :param upgrade_domain_timeout_in_milliseconds: The amount of time each + upgrade domain has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + :type upgrade_domain_timeout_in_milliseconds: str + """ + + _attribute_map = { + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, + 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, + 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, + } + + def __init__(self, *, failure_action=None, health_check_wait_duration_in_milliseconds: str=None, health_check_stable_duration_in_milliseconds: str=None, health_check_retry_timeout_in_milliseconds: str=None, upgrade_timeout_in_milliseconds: str=None, upgrade_domain_timeout_in_milliseconds: str=None, **kwargs) -> None: + super(MonitoringPolicyDescription, self).__init__(**kwargs) + self.failure_action = failure_action + self.health_check_wait_duration_in_milliseconds = health_check_wait_duration_in_milliseconds + self.health_check_stable_duration_in_milliseconds = health_check_stable_duration_in_milliseconds + self.health_check_retry_timeout_in_milliseconds = health_check_retry_timeout_in_milliseconds + self.upgrade_timeout_in_milliseconds = upgrade_timeout_in_milliseconds + self.upgrade_domain_timeout_in_milliseconds = upgrade_domain_timeout_in_milliseconds diff --git a/customSDK/servicefabric/models/name_description.py b/customSDK/servicefabric/models/name_description.py new file mode 100644 index 0000000..93ca62e --- /dev/null +++ b/customSDK/servicefabric/models/name_description.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class NameDescription(Model): + """Describes a Service Fabric name. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The Service Fabric name, including the 'fabric:' + URI scheme. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NameDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/name_description_py3.py b/customSDK/servicefabric/models/name_description_py3.py new file mode 100644 index 0000000..5f8a01b --- /dev/null +++ b/customSDK/servicefabric/models/name_description_py3.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class NameDescription(Model): + """Describes a Service Fabric name. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The Service Fabric name, including the 'fabric:' + URI scheme. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, *, name: str, **kwargs) -> None: + super(NameDescription, self).__init__(**kwargs) + self.name = name diff --git a/customSDK/servicefabric/models/named_partition_information.py b/customSDK/servicefabric/models/named_partition_information.py new file mode 100644 index 0000000..8ccff21 --- /dev/null +++ b/customSDK/servicefabric/models/named_partition_information.py @@ -0,0 +1,46 @@ +# 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 .partition_information import PartitionInformation + + +class NamedPartitionInformation(PartitionInformation): + """Describes the partition information for the name as a string that is based + on partition schemes. + + All required parameters must be populated in order to send to Azure. + + :param id: An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. + The partition ID is unique and does not change for the lifetime of the + service. If the same service was deleted and recreated the IDs of its + partitions would be different. + :type id: str + :param service_partition_kind: Required. Constant filled by server. + :type service_partition_kind: str + :param name: Name of the partition. + :type name: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NamedPartitionInformation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.service_partition_kind = 'Named' diff --git a/customSDK/servicefabric/models/named_partition_information_py3.py b/customSDK/servicefabric/models/named_partition_information_py3.py new file mode 100644 index 0000000..6204651 --- /dev/null +++ b/customSDK/servicefabric/models/named_partition_information_py3.py @@ -0,0 +1,46 @@ +# 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 .partition_information_py3 import PartitionInformation + + +class NamedPartitionInformation(PartitionInformation): + """Describes the partition information for the name as a string that is based + on partition schemes. + + All required parameters must be populated in order to send to Azure. + + :param id: An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. + The partition ID is unique and does not change for the lifetime of the + service. If the same service was deleted and recreated the IDs of its + partitions would be different. + :type id: str + :param service_partition_kind: Required. Constant filled by server. + :type service_partition_kind: str + :param name: Name of the partition. + :type name: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(NamedPartitionInformation, self).__init__(id=id, **kwargs) + self.name = name + self.service_partition_kind = 'Named' diff --git a/customSDK/servicefabric/models/named_partition_scheme_description.py b/customSDK/servicefabric/models/named_partition_scheme_description.py new file mode 100644 index 0000000..0d58fa2 --- /dev/null +++ b/customSDK/servicefabric/models/named_partition_scheme_description.py @@ -0,0 +1,45 @@ +# 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 .partition_scheme_description import PartitionSchemeDescription + + +class NamedPartitionSchemeDescription(PartitionSchemeDescription): + """Describes the named partition scheme of the service. + + All required parameters must be populated in order to send to Azure. + + :param partition_scheme: Required. Constant filled by server. + :type partition_scheme: str + :param count: Required. The number of partitions. + :type count: int + :param names: Required. Array of size specified by the ‘Count’ parameter, + for the names of the partitions. + :type names: list[str] + """ + + _validation = { + 'partition_scheme': {'required': True}, + 'count': {'required': True}, + 'names': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + 'count': {'key': 'Count', 'type': 'int'}, + 'names': {'key': 'Names', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(NamedPartitionSchemeDescription, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.names = kwargs.get('names', None) + self.partition_scheme = 'Named' diff --git a/customSDK/servicefabric/models/named_partition_scheme_description_py3.py b/customSDK/servicefabric/models/named_partition_scheme_description_py3.py new file mode 100644 index 0000000..d50a2fb --- /dev/null +++ b/customSDK/servicefabric/models/named_partition_scheme_description_py3.py @@ -0,0 +1,45 @@ +# 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 .partition_scheme_description_py3 import PartitionSchemeDescription + + +class NamedPartitionSchemeDescription(PartitionSchemeDescription): + """Describes the named partition scheme of the service. + + All required parameters must be populated in order to send to Azure. + + :param partition_scheme: Required. Constant filled by server. + :type partition_scheme: str + :param count: Required. The number of partitions. + :type count: int + :param names: Required. Array of size specified by the ‘Count’ parameter, + for the names of the partitions. + :type names: list[str] + """ + + _validation = { + 'partition_scheme': {'required': True}, + 'count': {'required': True}, + 'names': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + 'count': {'key': 'Count', 'type': 'int'}, + 'names': {'key': 'Names', 'type': '[str]'}, + } + + def __init__(self, *, count: int, names, **kwargs) -> None: + super(NamedPartitionSchemeDescription, self).__init__(**kwargs) + self.count = count + self.names = names + self.partition_scheme = 'Named' diff --git a/customSDK/servicefabric/models/network_ref.py b/customSDK/servicefabric/models/network_ref.py new file mode 100644 index 0000000..7c811e7 --- /dev/null +++ b/customSDK/servicefabric/models/network_ref.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class NetworkRef(Model): + """Describes a network reference in a service. + + :param name: Name of the network + :type name: str + :param endpoint_refs: A list of endpoints that are exposed on this + network. + :type endpoint_refs: list[~azure.servicefabric.models.EndpointRef] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'endpoint_refs': {'key': 'endpointRefs', 'type': '[EndpointRef]'}, + } + + def __init__(self, **kwargs): + super(NetworkRef, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.endpoint_refs = kwargs.get('endpoint_refs', None) diff --git a/customSDK/servicefabric/models/network_ref_py3.py b/customSDK/servicefabric/models/network_ref_py3.py new file mode 100644 index 0000000..9cb2157 --- /dev/null +++ b/customSDK/servicefabric/models/network_ref_py3.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class NetworkRef(Model): + """Describes a network reference in a service. + + :param name: Name of the network + :type name: str + :param endpoint_refs: A list of endpoints that are exposed on this + network. + :type endpoint_refs: list[~azure.servicefabric.models.EndpointRef] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'endpoint_refs': {'key': 'endpointRefs', 'type': '[EndpointRef]'}, + } + + def __init__(self, *, name: str=None, endpoint_refs=None, **kwargs) -> None: + super(NetworkRef, self).__init__(**kwargs) + self.name = name + self.endpoint_refs = endpoint_refs diff --git a/customSDK/servicefabric/models/network_resource_description.py b/customSDK/servicefabric/models/network_resource_description.py new file mode 100644 index 0000000..56a03e7 --- /dev/null +++ b/customSDK/servicefabric/models/network_resource_description.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class NetworkResourceDescription(Model): + """This type describes a network resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Network resource. + :type name: str + :param properties: Required. Describes properties of a network resource. + :type properties: ~azure.servicefabric.models.NetworkResourceProperties + """ + + _validation = { + 'name': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'NetworkResourceProperties'}, + } + + def __init__(self, **kwargs): + super(NetworkResourceDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.properties = kwargs.get('properties', None) diff --git a/customSDK/servicefabric/models/network_resource_description_py3.py b/customSDK/servicefabric/models/network_resource_description_py3.py new file mode 100644 index 0000000..c812b39 --- /dev/null +++ b/customSDK/servicefabric/models/network_resource_description_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class NetworkResourceDescription(Model): + """This type describes a network resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Network resource. + :type name: str + :param properties: Required. Describes properties of a network resource. + :type properties: ~azure.servicefabric.models.NetworkResourceProperties + """ + + _validation = { + 'name': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'NetworkResourceProperties'}, + } + + def __init__(self, *, name: str, properties, **kwargs) -> None: + super(NetworkResourceDescription, self).__init__(**kwargs) + self.name = name + self.properties = properties diff --git a/customSDK/servicefabric/models/network_resource_properties.py b/customSDK/servicefabric/models/network_resource_properties.py new file mode 100644 index 0000000..bca9a90 --- /dev/null +++ b/customSDK/servicefabric/models/network_resource_properties.py @@ -0,0 +1,60 @@ +# 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 .network_resource_properties_base import NetworkResourcePropertiesBase + + +class NetworkResourceProperties(NetworkResourcePropertiesBase): + """Describes properties of a network resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LocalNetworkResourceProperties + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param description: User readable description of the network. + :type description: str + :ivar status: Status of the network. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the network. + :vartype status_details: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Local': 'LocalNetworkResourceProperties'} + } + + def __init__(self, **kwargs): + super(NetworkResourceProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.status = None + self.status_details = None + self.kind = 'NetworkResourceProperties' diff --git a/customSDK/servicefabric/models/network_resource_properties_base.py b/customSDK/servicefabric/models/network_resource_properties_base.py new file mode 100644 index 0000000..d0ecd3a --- /dev/null +++ b/customSDK/servicefabric/models/network_resource_properties_base.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class NetworkResourcePropertiesBase(Model): + """This type describes the properties of a network resource, including its + kind. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NetworkResourceProperties + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'NetworkResourceProperties': 'NetworkResourceProperties'} + } + + def __init__(self, **kwargs): + super(NetworkResourcePropertiesBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/network_resource_properties_base_py3.py b/customSDK/servicefabric/models/network_resource_properties_base_py3.py new file mode 100644 index 0000000..6410aae --- /dev/null +++ b/customSDK/servicefabric/models/network_resource_properties_base_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class NetworkResourcePropertiesBase(Model): + """This type describes the properties of a network resource, including its + kind. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NetworkResourceProperties + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'NetworkResourceProperties': 'NetworkResourceProperties'} + } + + def __init__(self, **kwargs) -> None: + super(NetworkResourcePropertiesBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/network_resource_properties_py3.py b/customSDK/servicefabric/models/network_resource_properties_py3.py new file mode 100644 index 0000000..0fce382 --- /dev/null +++ b/customSDK/servicefabric/models/network_resource_properties_py3.py @@ -0,0 +1,60 @@ +# 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 .network_resource_properties_base_py3 import NetworkResourcePropertiesBase + + +class NetworkResourceProperties(NetworkResourcePropertiesBase): + """Describes properties of a network resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LocalNetworkResourceProperties + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param description: User readable description of the network. + :type description: str + :ivar status: Status of the network. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the network. + :vartype status_details: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Local': 'LocalNetworkResourceProperties'} + } + + def __init__(self, *, description: str=None, **kwargs) -> None: + super(NetworkResourceProperties, self).__init__(**kwargs) + self.description = description + self.status = None + self.status_details = None + self.kind = 'NetworkResourceProperties' diff --git a/customSDK/servicefabric/models/node_aborted_event.py b/customSDK/servicefabric/models/node_aborted_event.py new file mode 100644 index 0000000..744a8fe --- /dev/null +++ b/customSDK/servicefabric/models/node_aborted_event.py @@ -0,0 +1,94 @@ +# 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 .node_event import NodeEvent + + +class NodeAbortedEvent(NodeEvent): + """Node Aborted event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_id: Required. Id of Node. + :type node_id: str + :param upgrade_domain: Required. Upgrade domain of Node. + :type upgrade_domain: str + :param fault_domain: Required. Fault domain of Node. + :type fault_domain: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param hostname: Required. Name of Host. + :type hostname: str + :param is_seed_node: Required. Indicates if it is seed node. + :type is_seed_node: bool + :param node_version: Required. Version of Node. + :type node_version: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeAbortedEvent, self).__init__(**kwargs) + self.node_instance = kwargs.get('node_instance', None) + self.node_id = kwargs.get('node_id', None) + self.upgrade_domain = kwargs.get('upgrade_domain', None) + self.fault_domain = kwargs.get('fault_domain', None) + self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) + self.hostname = kwargs.get('hostname', None) + self.is_seed_node = kwargs.get('is_seed_node', None) + self.node_version = kwargs.get('node_version', None) + self.kind = 'NodeAborted' diff --git a/customSDK/servicefabric/models/node_aborted_event_py3.py b/customSDK/servicefabric/models/node_aborted_event_py3.py new file mode 100644 index 0000000..9b51fbd --- /dev/null +++ b/customSDK/servicefabric/models/node_aborted_event_py3.py @@ -0,0 +1,94 @@ +# 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 .node_event_py3 import NodeEvent + + +class NodeAbortedEvent(NodeEvent): + """Node Aborted event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_id: Required. Id of Node. + :type node_id: str + :param upgrade_domain: Required. Upgrade domain of Node. + :type upgrade_domain: str + :param fault_domain: Required. Fault domain of Node. + :type fault_domain: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param hostname: Required. Name of Host. + :type hostname: str + :param is_seed_node: Required. Indicates if it is seed node. + :type is_seed_node: bool + :param node_version: Required. Version of Node. + :type node_version: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, node_id: str, upgrade_domain: str, fault_domain: str, ip_address_or_fqdn: str, hostname: str, is_seed_node: bool, node_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeAbortedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance = node_instance + self.node_id = node_id + self.upgrade_domain = upgrade_domain + self.fault_domain = fault_domain + self.ip_address_or_fqdn = ip_address_or_fqdn + self.hostname = hostname + self.is_seed_node = is_seed_node + self.node_version = node_version + self.kind = 'NodeAborted' diff --git a/customSDK/servicefabric/models/node_added_to_cluster_event.py b/customSDK/servicefabric/models/node_added_to_cluster_event.py new file mode 100644 index 0000000..3c55e7b --- /dev/null +++ b/customSDK/servicefabric/models/node_added_to_cluster_event.py @@ -0,0 +1,84 @@ +# 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 .node_event import NodeEvent + + +class NodeAddedToClusterEvent(NodeEvent): + """Node Added event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_id: Required. Id of Node. + :type node_id: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_type: Required. Type of Node. + :type node_type: str + :param fabric_version: Required. Fabric version. + :type fabric_version: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param node_capacities: Required. Capacities. + :type node_capacities: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'node_type': {'required': True}, + 'fabric_version': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'node_capacities': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_type': {'key': 'NodeType', 'type': 'str'}, + 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeAddedToClusterEvent, self).__init__(**kwargs) + self.node_id = kwargs.get('node_id', None) + self.node_instance = kwargs.get('node_instance', None) + self.node_type = kwargs.get('node_type', None) + self.fabric_version = kwargs.get('fabric_version', None) + self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) + self.node_capacities = kwargs.get('node_capacities', None) + self.kind = 'NodeAddedToCluster' diff --git a/customSDK/servicefabric/models/node_added_to_cluster_event_py3.py b/customSDK/servicefabric/models/node_added_to_cluster_event_py3.py new file mode 100644 index 0000000..6178037 --- /dev/null +++ b/customSDK/servicefabric/models/node_added_to_cluster_event_py3.py @@ -0,0 +1,84 @@ +# 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 .node_event_py3 import NodeEvent + + +class NodeAddedToClusterEvent(NodeEvent): + """Node Added event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_id: Required. Id of Node. + :type node_id: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_type: Required. Type of Node. + :type node_type: str + :param fabric_version: Required. Fabric version. + :type fabric_version: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param node_capacities: Required. Capacities. + :type node_capacities: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'node_type': {'required': True}, + 'fabric_version': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'node_capacities': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_type': {'key': 'NodeType', 'type': 'str'}, + 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_id: str, node_instance: int, node_type: str, fabric_version: str, ip_address_or_fqdn: str, node_capacities: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeAddedToClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_id = node_id + self.node_instance = node_instance + self.node_type = node_type + self.fabric_version = fabric_version + self.ip_address_or_fqdn = ip_address_or_fqdn + self.node_capacities = node_capacities + self.kind = 'NodeAddedToCluster' diff --git a/customSDK/servicefabric/models/node_closed_event.py b/customSDK/servicefabric/models/node_closed_event.py new file mode 100644 index 0000000..d9abbee --- /dev/null +++ b/customSDK/servicefabric/models/node_closed_event.py @@ -0,0 +1,69 @@ +# 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 .node_event import NodeEvent + + +class NodeClosedEvent(NodeEvent): + """Node Closed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_id: Required. Id of Node. + :type node_id: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param error: Required. Describes error. + :type error: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'error': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'error': {'key': 'Error', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeClosedEvent, self).__init__(**kwargs) + self.node_id = kwargs.get('node_id', None) + self.node_instance = kwargs.get('node_instance', None) + self.error = kwargs.get('error', None) + self.kind = 'NodeClosed' diff --git a/customSDK/servicefabric/models/node_closed_event_py3.py b/customSDK/servicefabric/models/node_closed_event_py3.py new file mode 100644 index 0000000..e655d3d --- /dev/null +++ b/customSDK/servicefabric/models/node_closed_event_py3.py @@ -0,0 +1,69 @@ +# 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 .node_event_py3 import NodeEvent + + +class NodeClosedEvent(NodeEvent): + """Node Closed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_id: Required. Id of Node. + :type node_id: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param error: Required. Describes error. + :type error: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'error': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'error': {'key': 'Error', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_id: str, node_instance: int, error: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeClosedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_id = node_id + self.node_instance = node_instance + self.error = error + self.kind = 'NodeClosed' diff --git a/customSDK/servicefabric/models/node_deactivate_completed_event.py b/customSDK/servicefabric/models/node_deactivate_completed_event.py new file mode 100644 index 0000000..9e20d52 --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivate_completed_event.py @@ -0,0 +1,74 @@ +# 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 .node_event import NodeEvent + + +class NodeDeactivateCompletedEvent(NodeEvent): + """Node Deactivate Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param effective_deactivate_intent: Required. Describes deactivate intent. + :type effective_deactivate_intent: str + :param batch_ids_with_deactivate_intent: Required. Batch Ids. + :type batch_ids_with_deactivate_intent: str + :param start_time: Required. Start time. + :type start_time: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'effective_deactivate_intent': {'required': True}, + 'batch_ids_with_deactivate_intent': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'effective_deactivate_intent': {'key': 'EffectiveDeactivateIntent', 'type': 'str'}, + 'batch_ids_with_deactivate_intent': {'key': 'BatchIdsWithDeactivateIntent', 'type': 'str'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(NodeDeactivateCompletedEvent, self).__init__(**kwargs) + self.node_instance = kwargs.get('node_instance', None) + self.effective_deactivate_intent = kwargs.get('effective_deactivate_intent', None) + self.batch_ids_with_deactivate_intent = kwargs.get('batch_ids_with_deactivate_intent', None) + self.start_time = kwargs.get('start_time', None) + self.kind = 'NodeDeactivateCompleted' diff --git a/customSDK/servicefabric/models/node_deactivate_completed_event_py3.py b/customSDK/servicefabric/models/node_deactivate_completed_event_py3.py new file mode 100644 index 0000000..d78dbce --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivate_completed_event_py3.py @@ -0,0 +1,74 @@ +# 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 .node_event_py3 import NodeEvent + + +class NodeDeactivateCompletedEvent(NodeEvent): + """Node Deactivate Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param effective_deactivate_intent: Required. Describes deactivate intent. + :type effective_deactivate_intent: str + :param batch_ids_with_deactivate_intent: Required. Batch Ids. + :type batch_ids_with_deactivate_intent: str + :param start_time: Required. Start time. + :type start_time: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'effective_deactivate_intent': {'required': True}, + 'batch_ids_with_deactivate_intent': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'effective_deactivate_intent': {'key': 'EffectiveDeactivateIntent', 'type': 'str'}, + 'batch_ids_with_deactivate_intent': {'key': 'BatchIdsWithDeactivateIntent', 'type': 'str'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, effective_deactivate_intent: str, batch_ids_with_deactivate_intent: str, start_time, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeDeactivateCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance = node_instance + self.effective_deactivate_intent = effective_deactivate_intent + self.batch_ids_with_deactivate_intent = batch_ids_with_deactivate_intent + self.start_time = start_time + self.kind = 'NodeDeactivateCompleted' diff --git a/customSDK/servicefabric/models/node_deactivate_started_event.py b/customSDK/servicefabric/models/node_deactivate_started_event.py new file mode 100644 index 0000000..7cf057f --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivate_started_event.py @@ -0,0 +1,69 @@ +# 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 .node_event import NodeEvent + + +class NodeDeactivateStartedEvent(NodeEvent): + """Node Deactivate Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param batch_id: Required. Batch Id. + :type batch_id: str + :param deactivate_intent: Required. Describes deactivate intent. + :type deactivate_intent: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'batch_id': {'required': True}, + 'deactivate_intent': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'batch_id': {'key': 'BatchId', 'type': 'str'}, + 'deactivate_intent': {'key': 'DeactivateIntent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeDeactivateStartedEvent, self).__init__(**kwargs) + self.node_instance = kwargs.get('node_instance', None) + self.batch_id = kwargs.get('batch_id', None) + self.deactivate_intent = kwargs.get('deactivate_intent', None) + self.kind = 'NodeDeactivateStarted' diff --git a/customSDK/servicefabric/models/node_deactivate_started_event_py3.py b/customSDK/servicefabric/models/node_deactivate_started_event_py3.py new file mode 100644 index 0000000..30c3903 --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivate_started_event_py3.py @@ -0,0 +1,69 @@ +# 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 .node_event_py3 import NodeEvent + + +class NodeDeactivateStartedEvent(NodeEvent): + """Node Deactivate Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param batch_id: Required. Batch Id. + :type batch_id: str + :param deactivate_intent: Required. Describes deactivate intent. + :type deactivate_intent: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'batch_id': {'required': True}, + 'deactivate_intent': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'batch_id': {'key': 'BatchId', 'type': 'str'}, + 'deactivate_intent': {'key': 'DeactivateIntent', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, batch_id: str, deactivate_intent: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeDeactivateStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance = node_instance + self.batch_id = batch_id + self.deactivate_intent = deactivate_intent + self.kind = 'NodeDeactivateStarted' diff --git a/customSDK/servicefabric/models/node_deactivation_info.py b/customSDK/servicefabric/models/node_deactivation_info.py new file mode 100644 index 0000000..3379361 --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivation_info.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class NodeDeactivationInfo(Model): + """Information about the node deactivation. This information is valid for a + node that is undergoing deactivation or has already been deactivated. + + :param node_deactivation_intent: The intent or the reason for deactivating + the node. Following are the possible values for it. Possible values + include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' + :type node_deactivation_intent: str or + ~azure.servicefabric.models.NodeDeactivationIntent + :param node_deactivation_status: The status of node deactivation + operation. Following are the possible values. Possible values include: + 'None', 'SafetyCheckInProgress', 'SafetyCheckComplete', 'Completed' + :type node_deactivation_status: str or + ~azure.servicefabric.models.NodeDeactivationStatus + :param node_deactivation_task: List of tasks representing the deactivation + operation on the node. + :type node_deactivation_task: + list[~azure.servicefabric.models.NodeDeactivationTask] + :param pending_safety_checks: List of pending safety checks + :type pending_safety_checks: + list[~azure.servicefabric.models.SafetyCheckWrapper] + """ + + _attribute_map = { + 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, + 'node_deactivation_status': {'key': 'NodeDeactivationStatus', 'type': 'str'}, + 'node_deactivation_task': {'key': 'NodeDeactivationTask', 'type': '[NodeDeactivationTask]'}, + 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, + } + + def __init__(self, **kwargs): + super(NodeDeactivationInfo, self).__init__(**kwargs) + self.node_deactivation_intent = kwargs.get('node_deactivation_intent', None) + self.node_deactivation_status = kwargs.get('node_deactivation_status', None) + self.node_deactivation_task = kwargs.get('node_deactivation_task', None) + self.pending_safety_checks = kwargs.get('pending_safety_checks', None) diff --git a/customSDK/servicefabric/models/node_deactivation_info_py3.py b/customSDK/servicefabric/models/node_deactivation_info_py3.py new file mode 100644 index 0000000..aec06f7 --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivation_info_py3.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class NodeDeactivationInfo(Model): + """Information about the node deactivation. This information is valid for a + node that is undergoing deactivation or has already been deactivated. + + :param node_deactivation_intent: The intent or the reason for deactivating + the node. Following are the possible values for it. Possible values + include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' + :type node_deactivation_intent: str or + ~azure.servicefabric.models.NodeDeactivationIntent + :param node_deactivation_status: The status of node deactivation + operation. Following are the possible values. Possible values include: + 'None', 'SafetyCheckInProgress', 'SafetyCheckComplete', 'Completed' + :type node_deactivation_status: str or + ~azure.servicefabric.models.NodeDeactivationStatus + :param node_deactivation_task: List of tasks representing the deactivation + operation on the node. + :type node_deactivation_task: + list[~azure.servicefabric.models.NodeDeactivationTask] + :param pending_safety_checks: List of pending safety checks + :type pending_safety_checks: + list[~azure.servicefabric.models.SafetyCheckWrapper] + """ + + _attribute_map = { + 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, + 'node_deactivation_status': {'key': 'NodeDeactivationStatus', 'type': 'str'}, + 'node_deactivation_task': {'key': 'NodeDeactivationTask', 'type': '[NodeDeactivationTask]'}, + 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, + } + + def __init__(self, *, node_deactivation_intent=None, node_deactivation_status=None, node_deactivation_task=None, pending_safety_checks=None, **kwargs) -> None: + super(NodeDeactivationInfo, self).__init__(**kwargs) + self.node_deactivation_intent = node_deactivation_intent + self.node_deactivation_status = node_deactivation_status + self.node_deactivation_task = node_deactivation_task + self.pending_safety_checks = pending_safety_checks diff --git a/customSDK/servicefabric/models/node_deactivation_task.py b/customSDK/servicefabric/models/node_deactivation_task.py new file mode 100644 index 0000000..20f95a3 --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivation_task.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class NodeDeactivationTask(Model): + """The task representing the deactivation operation on the node. + + :param node_deactivation_task_id: Identity of the task related to + deactivation operation on the node. + :type node_deactivation_task_id: + ~azure.servicefabric.models.NodeDeactivationTaskId + :param node_deactivation_intent: The intent or the reason for deactivating + the node. Following are the possible values for it. Possible values + include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' + :type node_deactivation_intent: str or + ~azure.servicefabric.models.NodeDeactivationIntent + """ + + _attribute_map = { + 'node_deactivation_task_id': {'key': 'NodeDeactivationTaskId', 'type': 'NodeDeactivationTaskId'}, + 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeDeactivationTask, self).__init__(**kwargs) + self.node_deactivation_task_id = kwargs.get('node_deactivation_task_id', None) + self.node_deactivation_intent = kwargs.get('node_deactivation_intent', None) diff --git a/customSDK/servicefabric/models/node_deactivation_task_id.py b/customSDK/servicefabric/models/node_deactivation_task_id.py new file mode 100644 index 0000000..f63ddb6 --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivation_task_id.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class NodeDeactivationTaskId(Model): + """Identity of the task related to deactivation operation on the node. + + :param id: Value of the task id. + :type id: str + :param node_deactivation_task_type: The type of the task that performed + the node deactivation. Following are the possible values. Possible values + include: 'Invalid', 'Infrastructure', 'Repair', 'Client' + :type node_deactivation_task_type: str or + ~azure.servicefabric.models.NodeDeactivationTaskType + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'node_deactivation_task_type': {'key': 'NodeDeactivationTaskType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeDeactivationTaskId, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.node_deactivation_task_type = kwargs.get('node_deactivation_task_type', None) diff --git a/customSDK/servicefabric/models/node_deactivation_task_id_py3.py b/customSDK/servicefabric/models/node_deactivation_task_id_py3.py new file mode 100644 index 0000000..bf0c939 --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivation_task_id_py3.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class NodeDeactivationTaskId(Model): + """Identity of the task related to deactivation operation on the node. + + :param id: Value of the task id. + :type id: str + :param node_deactivation_task_type: The type of the task that performed + the node deactivation. Following are the possible values. Possible values + include: 'Invalid', 'Infrastructure', 'Repair', 'Client' + :type node_deactivation_task_type: str or + ~azure.servicefabric.models.NodeDeactivationTaskType + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'node_deactivation_task_type': {'key': 'NodeDeactivationTaskType', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, node_deactivation_task_type=None, **kwargs) -> None: + super(NodeDeactivationTaskId, self).__init__(**kwargs) + self.id = id + self.node_deactivation_task_type = node_deactivation_task_type diff --git a/customSDK/servicefabric/models/node_deactivation_task_py3.py b/customSDK/servicefabric/models/node_deactivation_task_py3.py new file mode 100644 index 0000000..5c949e7 --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivation_task_py3.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class NodeDeactivationTask(Model): + """The task representing the deactivation operation on the node. + + :param node_deactivation_task_id: Identity of the task related to + deactivation operation on the node. + :type node_deactivation_task_id: + ~azure.servicefabric.models.NodeDeactivationTaskId + :param node_deactivation_intent: The intent or the reason for deactivating + the node. Following are the possible values for it. Possible values + include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' + :type node_deactivation_intent: str or + ~azure.servicefabric.models.NodeDeactivationIntent + """ + + _attribute_map = { + 'node_deactivation_task_id': {'key': 'NodeDeactivationTaskId', 'type': 'NodeDeactivationTaskId'}, + 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, + } + + def __init__(self, *, node_deactivation_task_id=None, node_deactivation_intent=None, **kwargs) -> None: + super(NodeDeactivationTask, self).__init__(**kwargs) + self.node_deactivation_task_id = node_deactivation_task_id + self.node_deactivation_intent = node_deactivation_intent diff --git a/customSDK/servicefabric/models/node_down_event.py b/customSDK/servicefabric/models/node_down_event.py new file mode 100644 index 0000000..b20b3d4 --- /dev/null +++ b/customSDK/servicefabric/models/node_down_event.py @@ -0,0 +1,64 @@ +# 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 .node_event import NodeEvent + + +class NodeDownEvent(NodeEvent): + """Node Down event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param last_node_up_at: Required. Time when Node was last up. + :type last_node_up_at: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'last_node_up_at': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'last_node_up_at': {'key': 'LastNodeUpAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(NodeDownEvent, self).__init__(**kwargs) + self.node_instance = kwargs.get('node_instance', None) + self.last_node_up_at = kwargs.get('last_node_up_at', None) + self.kind = 'NodeDown' diff --git a/customSDK/servicefabric/models/node_down_event_py3.py b/customSDK/servicefabric/models/node_down_event_py3.py new file mode 100644 index 0000000..7702aee --- /dev/null +++ b/customSDK/servicefabric/models/node_down_event_py3.py @@ -0,0 +1,64 @@ +# 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 .node_event_py3 import NodeEvent + + +class NodeDownEvent(NodeEvent): + """Node Down event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param last_node_up_at: Required. Time when Node was last up. + :type last_node_up_at: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'last_node_up_at': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'last_node_up_at': {'key': 'LastNodeUpAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, last_node_up_at, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeDownEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance = node_instance + self.last_node_up_at = last_node_up_at + self.kind = 'NodeDown' diff --git a/customSDK/servicefabric/models/node_event.py b/customSDK/servicefabric/models/node_event.py new file mode 100644 index 0000000..b10fa82 --- /dev/null +++ b/customSDK/servicefabric/models/node_event.py @@ -0,0 +1,66 @@ +# 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 .fabric_event import FabricEvent + + +class NodeEvent(FabricEvent): + """Represents the base for all Node Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NodeAbortedEvent, NodeAddedToClusterEvent, + NodeClosedEvent, NodeDeactivateCompletedEvent, NodeDeactivateStartedEvent, + NodeDownEvent, NodeNewHealthReportEvent, NodeHealthReportExpiredEvent, + NodeOpenSucceededEvent, NodeOpenFailedEvent, NodeRemovedFromClusterEvent, + NodeUpEvent, ChaosNodeRestartScheduledEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'NodeAborted': 'NodeAbortedEvent', 'NodeAddedToCluster': 'NodeAddedToClusterEvent', 'NodeClosed': 'NodeClosedEvent', 'NodeDeactivateCompleted': 'NodeDeactivateCompletedEvent', 'NodeDeactivateStarted': 'NodeDeactivateStartedEvent', 'NodeDown': 'NodeDownEvent', 'NodeNewHealthReport': 'NodeNewHealthReportEvent', 'NodeHealthReportExpired': 'NodeHealthReportExpiredEvent', 'NodeOpenSucceeded': 'NodeOpenSucceededEvent', 'NodeOpenFailed': 'NodeOpenFailedEvent', 'NodeRemovedFromCluster': 'NodeRemovedFromClusterEvent', 'NodeUp': 'NodeUpEvent', 'ChaosNodeRestartScheduled': 'ChaosNodeRestartScheduledEvent'} + } + + def __init__(self, **kwargs): + super(NodeEvent, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.kind = 'NodeEvent' diff --git a/customSDK/servicefabric/models/node_event_py3.py b/customSDK/servicefabric/models/node_event_py3.py new file mode 100644 index 0000000..1fd2741 --- /dev/null +++ b/customSDK/servicefabric/models/node_event_py3.py @@ -0,0 +1,66 @@ +# 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 .fabric_event_py3 import FabricEvent + + +class NodeEvent(FabricEvent): + """Represents the base for all Node Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NodeAbortedEvent, NodeAddedToClusterEvent, + NodeClosedEvent, NodeDeactivateCompletedEvent, NodeDeactivateStartedEvent, + NodeDownEvent, NodeNewHealthReportEvent, NodeHealthReportExpiredEvent, + NodeOpenSucceededEvent, NodeOpenFailedEvent, NodeRemovedFromClusterEvent, + NodeUpEvent, ChaosNodeRestartScheduledEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'NodeAborted': 'NodeAbortedEvent', 'NodeAddedToCluster': 'NodeAddedToClusterEvent', 'NodeClosed': 'NodeClosedEvent', 'NodeDeactivateCompleted': 'NodeDeactivateCompletedEvent', 'NodeDeactivateStarted': 'NodeDeactivateStartedEvent', 'NodeDown': 'NodeDownEvent', 'NodeNewHealthReport': 'NodeNewHealthReportEvent', 'NodeHealthReportExpired': 'NodeHealthReportExpiredEvent', 'NodeOpenSucceeded': 'NodeOpenSucceededEvent', 'NodeOpenFailed': 'NodeOpenFailedEvent', 'NodeRemovedFromCluster': 'NodeRemovedFromClusterEvent', 'NodeUp': 'NodeUpEvent', 'ChaosNodeRestartScheduled': 'ChaosNodeRestartScheduledEvent'} + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.node_name = node_name + self.kind = 'NodeEvent' diff --git a/customSDK/servicefabric/models/node_health.py b/customSDK/servicefabric/models/node_health.py new file mode 100644 index 0000000..174320c --- /dev/null +++ b/customSDK/servicefabric/models/node_health.py @@ -0,0 +1,50 @@ +# 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 .entity_health import EntityHealth + + +class NodeHealth(EntityHealth): + """Information about the health of a Service Fabric node. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param name: Name of the node whose health information is described by + this object. + :type name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeHealth, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/node_health_evaluation.py b/customSDK/servicefabric/models/node_health_evaluation.py new file mode 100644 index 0000000..3c38231 --- /dev/null +++ b/customSDK/servicefabric/models/node_health_evaluation.py @@ -0,0 +1,59 @@ +# 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 .health_evaluation import HealthEvaluation + + +class NodeHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a node, containing information about the + data and the algorithm used by health store to evaluate health. The + evaluation is returned only when the aggregated health state is either + Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the node. The types of the + unhealthy evaluations can be EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(NodeHealthEvaluation, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_health_evaluation_py3.py b/customSDK/servicefabric/models/node_health_evaluation_py3.py new file mode 100644 index 0000000..e40c305 --- /dev/null +++ b/customSDK/servicefabric/models/node_health_evaluation_py3.py @@ -0,0 +1,59 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class NodeHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a node, containing information about the + data and the algorithm used by health store to evaluate health. The + evaluation is returned only when the aggregated health state is either + Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the node. The types of the + unhealthy evaluations can be EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, node_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: + super(NodeHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.node_name = node_name + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_health_py3.py b/customSDK/servicefabric/models/node_health_py3.py new file mode 100644 index 0000000..54584de --- /dev/null +++ b/customSDK/servicefabric/models/node_health_py3.py @@ -0,0 +1,50 @@ +# 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 .entity_health_py3 import EntityHealth + + +class NodeHealth(EntityHealth): + """Information about the health of a Service Fabric node. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param name: Name of the node whose health information is described by + this object. + :type name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, **kwargs) -> None: + super(NodeHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.name = name diff --git a/customSDK/servicefabric/models/node_health_report_expired_event.py b/customSDK/servicefabric/models/node_health_report_expired_event.py new file mode 100644 index 0000000..961324f --- /dev/null +++ b/customSDK/servicefabric/models/node_health_report_expired_event.py @@ -0,0 +1,100 @@ +# 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 .node_event import NodeEvent + + +class NodeHealthReportExpiredEvent(NodeEvent): + """Node Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: Required. Id of Node instance. + :type node_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(NodeHealthReportExpiredEvent, self).__init__(**kwargs) + self.node_instance_id = kwargs.get('node_instance_id', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'NodeHealthReportExpired' diff --git a/customSDK/servicefabric/models/node_health_report_expired_event_py3.py b/customSDK/servicefabric/models/node_health_report_expired_event_py3.py new file mode 100644 index 0000000..8012e4b --- /dev/null +++ b/customSDK/servicefabric/models/node_health_report_expired_event_py3.py @@ -0,0 +1,100 @@ +# 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 .node_event_py3 import NodeEvent + + +class NodeHealthReportExpiredEvent(NodeEvent): + """Node Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: Required. Id of Node instance. + :type node_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance_id = node_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'NodeHealthReportExpired' diff --git a/customSDK/servicefabric/models/node_health_state.py b/customSDK/servicefabric/models/node_health_state.py new file mode 100644 index 0000000..661af1b --- /dev/null +++ b/customSDK/servicefabric/models/node_health_state.py @@ -0,0 +1,41 @@ +# 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 .entity_health_state import EntityHealthState + + +class NodeHealthState(EntityHealthState): + """Represents the health state of a node, which contains the node identifier + and its aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param name: The name of a Service Fabric node. + :type name: str + :param id: An internal ID used by Service Fabric to uniquely identify a + node. Node Id is deterministically generated from node name. + :type id: ~azure.servicefabric.models.NodeId + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'NodeId'}, + } + + def __init__(self, **kwargs): + super(NodeHealthState, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.id = kwargs.get('id', None) diff --git a/customSDK/servicefabric/models/node_health_state_chunk.py b/customSDK/servicefabric/models/node_health_state_chunk.py new file mode 100644 index 0000000..4493c06 --- /dev/null +++ b/customSDK/servicefabric/models/node_health_state_chunk.py @@ -0,0 +1,34 @@ +# 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 .entity_health_state_chunk import EntityHealthStateChunk + + +class NodeHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a node, which contains the node name + and its aggregated health state. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of a Service Fabric node. + :type node_name: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeHealthStateChunk, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) diff --git a/customSDK/servicefabric/models/node_health_state_chunk_list.py b/customSDK/servicefabric/models/node_health_state_chunk_list.py new file mode 100644 index 0000000..c882e9e --- /dev/null +++ b/customSDK/servicefabric/models/node_health_state_chunk_list.py @@ -0,0 +1,35 @@ +# 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 .entity_health_state_chunk_list import EntityHealthStateChunkList + + +class NodeHealthStateChunkList(EntityHealthStateChunkList): + """The list of node health state chunks in the cluster that respect the input + filters in the chunk query. Returned by get cluster health state chunks + query. + + :param total_count: Total number of entity health state objects that match + the specified filters from the cluster health chunk query description. + :type total_count: long + :param items: The list of node health state chunks that respect the input + filters in the chunk query. + :type items: list[~azure.servicefabric.models.NodeHealthStateChunk] + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'items': {'key': 'Items', 'type': '[NodeHealthStateChunk]'}, + } + + def __init__(self, **kwargs): + super(NodeHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/node_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/node_health_state_chunk_list_py3.py new file mode 100644 index 0000000..524176b --- /dev/null +++ b/customSDK/servicefabric/models/node_health_state_chunk_list_py3.py @@ -0,0 +1,35 @@ +# 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 .entity_health_state_chunk_list_py3 import EntityHealthStateChunkList + + +class NodeHealthStateChunkList(EntityHealthStateChunkList): + """The list of node health state chunks in the cluster that respect the input + filters in the chunk query. Returned by get cluster health state chunks + query. + + :param total_count: Total number of entity health state objects that match + the specified filters from the cluster health chunk query description. + :type total_count: long + :param items: The list of node health state chunks that respect the input + filters in the chunk query. + :type items: list[~azure.servicefabric.models.NodeHealthStateChunk] + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'items': {'key': 'Items', 'type': '[NodeHealthStateChunk]'}, + } + + def __init__(self, *, total_count: int=None, items=None, **kwargs) -> None: + super(NodeHealthStateChunkList, self).__init__(total_count=total_count, **kwargs) + self.items = items diff --git a/customSDK/servicefabric/models/node_health_state_chunk_py3.py b/customSDK/servicefabric/models/node_health_state_chunk_py3.py new file mode 100644 index 0000000..52d4fbe --- /dev/null +++ b/customSDK/servicefabric/models/node_health_state_chunk_py3.py @@ -0,0 +1,34 @@ +# 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 .entity_health_state_chunk_py3 import EntityHealthStateChunk + + +class NodeHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a node, which contains the node name + and its aggregated health state. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of a Service Fabric node. + :type node_name: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + def __init__(self, *, health_state=None, node_name: str=None, **kwargs) -> None: + super(NodeHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.node_name = node_name diff --git a/customSDK/servicefabric/models/node_health_state_filter.py b/customSDK/servicefabric/models/node_health_state_filter.py new file mode 100644 index 0000000..cd2e1a9 --- /dev/null +++ b/customSDK/servicefabric/models/node_health_state_filter.py @@ -0,0 +1,66 @@ +# 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 msrest.serialization import Model + + +class NodeHealthStateFilter(Model): + """Defines matching criteria to determine whether a node should be included in + the returned cluster health chunk. + One filter can match zero, one or multiple nodes, depending on its + properties. + Can be specified in the cluster health chunk query description. + + :param node_name_filter: Name of the node that matches the filter. The + filter is applied only to the specified node, if it exists. + If the node doesn't exist, no node is returned in the cluster health chunk + based on this filter. + If the node exists, it is included in the cluster health chunk if the + health state matches the other filter properties. + If not specified, all nodes that match the parent filters (if any) are + taken into consideration and matched against the other filter members, + like health state filter. + :type node_name_filter: str + :param health_state_filter: The filter for the health state of the nodes. + It allows selecting nodes if they match the desired health states. + The possible values are integer value of one of the following health + states. Only nodes that match the filter are returned. All nodes are used + to evaluate the cluster aggregated health state. + If not specified, default value is None, unless the node name is + specified. If the filter has default value and node name is specified, the + matching node is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches nodes with HealthState + value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + """ + + _attribute_map = { + 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(NodeHealthStateFilter, self).__init__(**kwargs) + self.node_name_filter = kwargs.get('node_name_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) diff --git a/customSDK/servicefabric/models/node_health_state_filter_py3.py b/customSDK/servicefabric/models/node_health_state_filter_py3.py new file mode 100644 index 0000000..e6e5904 --- /dev/null +++ b/customSDK/servicefabric/models/node_health_state_filter_py3.py @@ -0,0 +1,66 @@ +# 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 msrest.serialization import Model + + +class NodeHealthStateFilter(Model): + """Defines matching criteria to determine whether a node should be included in + the returned cluster health chunk. + One filter can match zero, one or multiple nodes, depending on its + properties. + Can be specified in the cluster health chunk query description. + + :param node_name_filter: Name of the node that matches the filter. The + filter is applied only to the specified node, if it exists. + If the node doesn't exist, no node is returned in the cluster health chunk + based on this filter. + If the node exists, it is included in the cluster health chunk if the + health state matches the other filter properties. + If not specified, all nodes that match the parent filters (if any) are + taken into consideration and matched against the other filter members, + like health state filter. + :type node_name_filter: str + :param health_state_filter: The filter for the health state of the nodes. + It allows selecting nodes if they match the desired health states. + The possible values are integer value of one of the following health + states. Only nodes that match the filter are returned. All nodes are used + to evaluate the cluster aggregated health state. + If not specified, default value is None, unless the node name is + specified. If the filter has default value and node name is specified, the + matching node is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches nodes with HealthState + value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + """ + + _attribute_map = { + 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__(self, *, node_name_filter: str=None, health_state_filter: int=0, **kwargs) -> None: + super(NodeHealthStateFilter, self).__init__(**kwargs) + self.node_name_filter = node_name_filter + self.health_state_filter = health_state_filter diff --git a/customSDK/servicefabric/models/node_health_state_py3.py b/customSDK/servicefabric/models/node_health_state_py3.py new file mode 100644 index 0000000..eb1dcd1 --- /dev/null +++ b/customSDK/servicefabric/models/node_health_state_py3.py @@ -0,0 +1,41 @@ +# 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 .entity_health_state_py3 import EntityHealthState + + +class NodeHealthState(EntityHealthState): + """Represents the health state of a node, which contains the node identifier + and its aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param name: The name of a Service Fabric node. + :type name: str + :param id: An internal ID used by Service Fabric to uniquely identify a + node. Node Id is deterministically generated from node name. + :type id: ~azure.servicefabric.models.NodeId + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'NodeId'}, + } + + def __init__(self, *, aggregated_health_state=None, name: str=None, id=None, **kwargs) -> None: + super(NodeHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.name = name + self.id = id diff --git a/customSDK/servicefabric/models/node_id.py b/customSDK/servicefabric/models/node_id.py new file mode 100644 index 0000000..9fc1e33 --- /dev/null +++ b/customSDK/servicefabric/models/node_id.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class NodeId(Model): + """An internal ID used by Service Fabric to uniquely identify a node. Node Id + is deterministically generated from node name. + + :param id: Value of the node Id. This is a 128 bit integer. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeId, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/customSDK/servicefabric/models/node_id_py3.py b/customSDK/servicefabric/models/node_id_py3.py new file mode 100644 index 0000000..9e1ff8c --- /dev/null +++ b/customSDK/servicefabric/models/node_id_py3.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class NodeId(Model): + """An internal ID used by Service Fabric to uniquely identify a node. Node Id + is deterministically generated from node name. + + :param id: Value of the node Id. This is a 128 bit integer. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(NodeId, self).__init__(**kwargs) + self.id = id diff --git a/customSDK/servicefabric/models/node_impact.py b/customSDK/servicefabric/models/node_impact.py new file mode 100644 index 0000000..fc2ba3d --- /dev/null +++ b/customSDK/servicefabric/models/node_impact.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class NodeImpact(Model): + """Describes the expected impact of a repair to a particular node. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param node_name: Required. The name of the impacted node. + :type node_name: str + :param impact_level: The level of impact expected. Possible values + include: 'Invalid', 'None', 'Restart', 'RemoveData', 'RemoveNode' + :type impact_level: str or ~azure.servicefabric.models.ImpactLevel + """ + + _validation = { + 'node_name': {'required': True}, + } + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'impact_level': {'key': 'ImpactLevel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeImpact, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.impact_level = kwargs.get('impact_level', None) diff --git a/customSDK/servicefabric/models/node_impact_py3.py b/customSDK/servicefabric/models/node_impact_py3.py new file mode 100644 index 0000000..679c911 --- /dev/null +++ b/customSDK/servicefabric/models/node_impact_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class NodeImpact(Model): + """Describes the expected impact of a repair to a particular node. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param node_name: Required. The name of the impacted node. + :type node_name: str + :param impact_level: The level of impact expected. Possible values + include: 'Invalid', 'None', 'Restart', 'RemoveData', 'RemoveNode' + :type impact_level: str or ~azure.servicefabric.models.ImpactLevel + """ + + _validation = { + 'node_name': {'required': True}, + } + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'impact_level': {'key': 'ImpactLevel', 'type': 'str'}, + } + + def __init__(self, *, node_name: str, impact_level=None, **kwargs) -> None: + super(NodeImpact, self).__init__(**kwargs) + self.node_name = node_name + self.impact_level = impact_level diff --git a/customSDK/servicefabric/models/node_info.py b/customSDK/servicefabric/models/node_info.py new file mode 100644 index 0000000..17cfb36 --- /dev/null +++ b/customSDK/servicefabric/models/node_info.py @@ -0,0 +1,121 @@ +# 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 msrest.serialization import Model + + +class NodeInfo(Model): + """Information about a node in Service Fabric cluster. + + :param name: The name of a Service Fabric node. + :type name: str + :param ip_address_or_fqdn: The IP address or fully qualified domain name + of the node. + :type ip_address_or_fqdn: str + :param type: The type of the node. + :type type: str + :param code_version: The version of Service Fabric binaries that the node + is running. + :type code_version: str + :param config_version: The version of Service Fabric cluster manifest that + the node is using. + :type config_version: str + :param node_status: The status of the node. Possible values include: + 'Invalid', 'Up', 'Down', 'Enabling', 'Disabling', 'Disabled', 'Unknown', + 'Removed' + :type node_status: str or ~azure.servicefabric.models.NodeStatus + :param node_up_time_in_seconds: Time in seconds since the node has been in + NodeStatus Up. Value zero indicates that the node is not Up. + :type node_up_time_in_seconds: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param is_seed_node: Indicates if the node is a seed node or not. Returns + true if the node is a seed node, otherwise false. A quorum of seed nodes + are required for proper operation of Service Fabric cluster. + :type is_seed_node: bool + :param upgrade_domain: The upgrade domain of the node. + :type upgrade_domain: str + :param fault_domain: The fault domain of the node. + :type fault_domain: str + :param id: An internal ID used by Service Fabric to uniquely identify a + node. Node Id is deterministically generated from node name. + :type id: ~azure.servicefabric.models.NodeId + :param instance_id: The ID representing the node instance. While the ID of + the node is deterministically generated from the node name and remains + same across restarts, the InstanceId changes every time node restarts. + :type instance_id: str + :param node_deactivation_info: Information about the node deactivation. + This information is valid for a node that is undergoing deactivation or + has already been deactivated. + :type node_deactivation_info: + ~azure.servicefabric.models.NodeDeactivationInfo + :param is_stopped: Indicates if the node is stopped by calling stop node + API or not. Returns true if the node is stopped, otherwise false. + :type is_stopped: bool + :param node_down_time_in_seconds: Time in seconds since the node has been + in NodeStatus Down. Value zero indicates node is not NodeStatus Down. + :type node_down_time_in_seconds: str + :param node_up_at: Date time in UTC when the node came up. If the node has + never been up then this value will be zero date time. + :type node_up_at: datetime + :param node_down_at: Date time in UTC when the node went down. If node has + never been down then this value will be zero date time. + :type node_down_at: datetime + :param node_tags: List that contains tags, which will be applied to the + nodes. + :type node_tags: list[str] + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'type': {'key': 'Type', 'type': 'str'}, + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'node_status': {'key': 'NodeStatus', 'type': 'str'}, + 'node_up_time_in_seconds': {'key': 'NodeUpTimeInSeconds', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'NodeId'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + 'node_deactivation_info': {'key': 'NodeDeactivationInfo', 'type': 'NodeDeactivationInfo'}, + 'is_stopped': {'key': 'IsStopped', 'type': 'bool'}, + 'node_down_time_in_seconds': {'key': 'NodeDownTimeInSeconds', 'type': 'str'}, + 'node_up_at': {'key': 'NodeUpAt', 'type': 'iso-8601'}, + 'node_down_at': {'key': 'NodeDownAt', 'type': 'iso-8601'}, + 'node_tags': {'key': 'NodeTags', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(NodeInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) + self.type = kwargs.get('type', None) + self.code_version = kwargs.get('code_version', None) + self.config_version = kwargs.get('config_version', None) + self.node_status = kwargs.get('node_status', None) + self.node_up_time_in_seconds = kwargs.get('node_up_time_in_seconds', None) + self.health_state = kwargs.get('health_state', None) + self.is_seed_node = kwargs.get('is_seed_node', None) + self.upgrade_domain = kwargs.get('upgrade_domain', None) + self.fault_domain = kwargs.get('fault_domain', None) + self.id = kwargs.get('id', None) + self.instance_id = kwargs.get('instance_id', None) + self.node_deactivation_info = kwargs.get('node_deactivation_info', None) + self.is_stopped = kwargs.get('is_stopped', None) + self.node_down_time_in_seconds = kwargs.get('node_down_time_in_seconds', None) + self.node_up_at = kwargs.get('node_up_at', None) + self.node_down_at = kwargs.get('node_down_at', None) + self.node_tags = kwargs.get('node_tags', None) diff --git a/customSDK/servicefabric/models/node_info_py3.py b/customSDK/servicefabric/models/node_info_py3.py new file mode 100644 index 0000000..16d82ee --- /dev/null +++ b/customSDK/servicefabric/models/node_info_py3.py @@ -0,0 +1,121 @@ +# 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 msrest.serialization import Model + + +class NodeInfo(Model): + """Information about a node in Service Fabric cluster. + + :param name: The name of a Service Fabric node. + :type name: str + :param ip_address_or_fqdn: The IP address or fully qualified domain name + of the node. + :type ip_address_or_fqdn: str + :param type: The type of the node. + :type type: str + :param code_version: The version of Service Fabric binaries that the node + is running. + :type code_version: str + :param config_version: The version of Service Fabric cluster manifest that + the node is using. + :type config_version: str + :param node_status: The status of the node. Possible values include: + 'Invalid', 'Up', 'Down', 'Enabling', 'Disabling', 'Disabled', 'Unknown', + 'Removed' + :type node_status: str or ~azure.servicefabric.models.NodeStatus + :param node_up_time_in_seconds: Time in seconds since the node has been in + NodeStatus Up. Value zero indicates that the node is not Up. + :type node_up_time_in_seconds: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param is_seed_node: Indicates if the node is a seed node or not. Returns + true if the node is a seed node, otherwise false. A quorum of seed nodes + are required for proper operation of Service Fabric cluster. + :type is_seed_node: bool + :param upgrade_domain: The upgrade domain of the node. + :type upgrade_domain: str + :param fault_domain: The fault domain of the node. + :type fault_domain: str + :param id: An internal ID used by Service Fabric to uniquely identify a + node. Node Id is deterministically generated from node name. + :type id: ~azure.servicefabric.models.NodeId + :param instance_id: The ID representing the node instance. While the ID of + the node is deterministically generated from the node name and remains + same across restarts, the InstanceId changes every time node restarts. + :type instance_id: str + :param node_deactivation_info: Information about the node deactivation. + This information is valid for a node that is undergoing deactivation or + has already been deactivated. + :type node_deactivation_info: + ~azure.servicefabric.models.NodeDeactivationInfo + :param is_stopped: Indicates if the node is stopped by calling stop node + API or not. Returns true if the node is stopped, otherwise false. + :type is_stopped: bool + :param node_down_time_in_seconds: Time in seconds since the node has been + in NodeStatus Down. Value zero indicates node is not NodeStatus Down. + :type node_down_time_in_seconds: str + :param node_up_at: Date time in UTC when the node came up. If the node has + never been up then this value will be zero date time. + :type node_up_at: datetime + :param node_down_at: Date time in UTC when the node went down. If node has + never been down then this value will be zero date time. + :type node_down_at: datetime + :param node_tags: List that contains tags, which will be applied to the + nodes. + :type node_tags: list[str] + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'type': {'key': 'Type', 'type': 'str'}, + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'node_status': {'key': 'NodeStatus', 'type': 'str'}, + 'node_up_time_in_seconds': {'key': 'NodeUpTimeInSeconds', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'NodeId'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + 'node_deactivation_info': {'key': 'NodeDeactivationInfo', 'type': 'NodeDeactivationInfo'}, + 'is_stopped': {'key': 'IsStopped', 'type': 'bool'}, + 'node_down_time_in_seconds': {'key': 'NodeDownTimeInSeconds', 'type': 'str'}, + 'node_up_at': {'key': 'NodeUpAt', 'type': 'iso-8601'}, + 'node_down_at': {'key': 'NodeDownAt', 'type': 'iso-8601'}, + 'node_tags': {'key': 'NodeTags', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, ip_address_or_fqdn: str=None, type: str=None, code_version: str=None, config_version: str=None, node_status=None, node_up_time_in_seconds: str=None, health_state=None, is_seed_node: bool=None, upgrade_domain: str=None, fault_domain: str=None, id=None, instance_id: str=None, node_deactivation_info=None, is_stopped: bool=None, node_down_time_in_seconds: str=None, node_up_at=None, node_down_at=None, node_tags=None, **kwargs) -> None: + super(NodeInfo, self).__init__(**kwargs) + self.name = name + self.ip_address_or_fqdn = ip_address_or_fqdn + self.type = type + self.code_version = code_version + self.config_version = config_version + self.node_status = node_status + self.node_up_time_in_seconds = node_up_time_in_seconds + self.health_state = health_state + self.is_seed_node = is_seed_node + self.upgrade_domain = upgrade_domain + self.fault_domain = fault_domain + self.id = id + self.instance_id = instance_id + self.node_deactivation_info = node_deactivation_info + self.is_stopped = is_stopped + self.node_down_time_in_seconds = node_down_time_in_seconds + self.node_up_at = node_up_at + self.node_down_at = node_down_at + self.node_tags = node_tags diff --git a/customSDK/servicefabric/models/node_load_info.py b/customSDK/servicefabric/models/node_load_info.py new file mode 100644 index 0000000..45c4cfc --- /dev/null +++ b/customSDK/servicefabric/models/node_load_info.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class NodeLoadInfo(Model): + """Information about load on a Service Fabric node. It holds a summary of all + metrics and their load on a node. + + :param node_name: Name of the node for which the load information is + provided by this object. + :type node_name: str + :param node_load_metric_information: List that contains metrics and their + load information on this node. + :type node_load_metric_information: + list[~azure.servicefabric.models.NodeLoadMetricInformation] + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_load_metric_information': {'key': 'NodeLoadMetricInformation', 'type': '[NodeLoadMetricInformation]'}, + } + + def __init__(self, **kwargs): + super(NodeLoadInfo, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.node_load_metric_information = kwargs.get('node_load_metric_information', None) diff --git a/customSDK/servicefabric/models/node_load_info_py3.py b/customSDK/servicefabric/models/node_load_info_py3.py new file mode 100644 index 0000000..4124dae --- /dev/null +++ b/customSDK/servicefabric/models/node_load_info_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class NodeLoadInfo(Model): + """Information about load on a Service Fabric node. It holds a summary of all + metrics and their load on a node. + + :param node_name: Name of the node for which the load information is + provided by this object. + :type node_name: str + :param node_load_metric_information: List that contains metrics and their + load information on this node. + :type node_load_metric_information: + list[~azure.servicefabric.models.NodeLoadMetricInformation] + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_load_metric_information': {'key': 'NodeLoadMetricInformation', 'type': '[NodeLoadMetricInformation]'}, + } + + def __init__(self, *, node_name: str=None, node_load_metric_information=None, **kwargs) -> None: + super(NodeLoadInfo, self).__init__(**kwargs) + self.node_name = node_name + self.node_load_metric_information = node_load_metric_information diff --git a/customSDK/servicefabric/models/node_load_metric_information.py b/customSDK/servicefabric/models/node_load_metric_information.py new file mode 100644 index 0000000..7f66076 --- /dev/null +++ b/customSDK/servicefabric/models/node_load_metric_information.py @@ -0,0 +1,84 @@ +# 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 msrest.serialization import Model + + +class NodeLoadMetricInformation(Model): + """Represents data structure that contains load information for a certain + metric on a node. + + :param name: Name of the metric for which this load information is + provided. + :type name: str + :param node_capacity: Total capacity on the node for this metric. + :type node_capacity: str + :param node_load: Current load on the node for this metric. In future + releases of Service Fabric this parameter will be deprecated in favor of + CurrentNodeLoad. + :type node_load: str + :param node_remaining_capacity: The remaining capacity on the node for + this metric. In future releases of Service Fabric this parameter will be + deprecated in favor of NodeCapacityRemaining. + :type node_remaining_capacity: str + :param is_capacity_violation: Indicates if there is a capacity violation + for this metric on the node. + :type is_capacity_violation: bool + :param node_buffered_capacity: The value that indicates the reserved + capacity for this metric on the node. + :type node_buffered_capacity: str + :param node_remaining_buffered_capacity: The remaining reserved capacity + for this metric on the node. In future releases of Service Fabric this + parameter will be deprecated in favor of BufferedNodeCapacityRemaining. + :type node_remaining_buffered_capacity: str + :param current_node_load: Current load on the node for this metric. + :type current_node_load: str + :param node_capacity_remaining: The remaining capacity on the node for the + metric. + :type node_capacity_remaining: str + :param buffered_node_capacity_remaining: The remaining capacity which is + not reserved by NodeBufferPercentage for this metric on the node. + :type buffered_node_capacity_remaining: str + :param planned_node_load_removal: This value represents the load of the + replicas that are planned to be removed in the future. + This kind of load is reported for replicas that are currently being moving + to other nodes and for replicas that are currently being dropped but still + use the load on the source node. + :type planned_node_load_removal: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'node_capacity': {'key': 'NodeCapacity', 'type': 'str'}, + 'node_load': {'key': 'NodeLoad', 'type': 'str'}, + 'node_remaining_capacity': {'key': 'NodeRemainingCapacity', 'type': 'str'}, + 'is_capacity_violation': {'key': 'IsCapacityViolation', 'type': 'bool'}, + 'node_buffered_capacity': {'key': 'NodeBufferedCapacity', 'type': 'str'}, + 'node_remaining_buffered_capacity': {'key': 'NodeRemainingBufferedCapacity', 'type': 'str'}, + 'current_node_load': {'key': 'CurrentNodeLoad', 'type': 'str'}, + 'node_capacity_remaining': {'key': 'NodeCapacityRemaining', 'type': 'str'}, + 'buffered_node_capacity_remaining': {'key': 'BufferedNodeCapacityRemaining', 'type': 'str'}, + 'planned_node_load_removal': {'key': 'PlannedNodeLoadRemoval', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeLoadMetricInformation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.node_capacity = kwargs.get('node_capacity', None) + self.node_load = kwargs.get('node_load', None) + self.node_remaining_capacity = kwargs.get('node_remaining_capacity', None) + self.is_capacity_violation = kwargs.get('is_capacity_violation', None) + self.node_buffered_capacity = kwargs.get('node_buffered_capacity', None) + self.node_remaining_buffered_capacity = kwargs.get('node_remaining_buffered_capacity', None) + self.current_node_load = kwargs.get('current_node_load', None) + self.node_capacity_remaining = kwargs.get('node_capacity_remaining', None) + self.buffered_node_capacity_remaining = kwargs.get('buffered_node_capacity_remaining', None) + self.planned_node_load_removal = kwargs.get('planned_node_load_removal', None) diff --git a/customSDK/servicefabric/models/node_load_metric_information_py3.py b/customSDK/servicefabric/models/node_load_metric_information_py3.py new file mode 100644 index 0000000..009f09d --- /dev/null +++ b/customSDK/servicefabric/models/node_load_metric_information_py3.py @@ -0,0 +1,84 @@ +# 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 msrest.serialization import Model + + +class NodeLoadMetricInformation(Model): + """Represents data structure that contains load information for a certain + metric on a node. + + :param name: Name of the metric for which this load information is + provided. + :type name: str + :param node_capacity: Total capacity on the node for this metric. + :type node_capacity: str + :param node_load: Current load on the node for this metric. In future + releases of Service Fabric this parameter will be deprecated in favor of + CurrentNodeLoad. + :type node_load: str + :param node_remaining_capacity: The remaining capacity on the node for + this metric. In future releases of Service Fabric this parameter will be + deprecated in favor of NodeCapacityRemaining. + :type node_remaining_capacity: str + :param is_capacity_violation: Indicates if there is a capacity violation + for this metric on the node. + :type is_capacity_violation: bool + :param node_buffered_capacity: The value that indicates the reserved + capacity for this metric on the node. + :type node_buffered_capacity: str + :param node_remaining_buffered_capacity: The remaining reserved capacity + for this metric on the node. In future releases of Service Fabric this + parameter will be deprecated in favor of BufferedNodeCapacityRemaining. + :type node_remaining_buffered_capacity: str + :param current_node_load: Current load on the node for this metric. + :type current_node_load: str + :param node_capacity_remaining: The remaining capacity on the node for the + metric. + :type node_capacity_remaining: str + :param buffered_node_capacity_remaining: The remaining capacity which is + not reserved by NodeBufferPercentage for this metric on the node. + :type buffered_node_capacity_remaining: str + :param planned_node_load_removal: This value represents the load of the + replicas that are planned to be removed in the future. + This kind of load is reported for replicas that are currently being moving + to other nodes and for replicas that are currently being dropped but still + use the load on the source node. + :type planned_node_load_removal: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'node_capacity': {'key': 'NodeCapacity', 'type': 'str'}, + 'node_load': {'key': 'NodeLoad', 'type': 'str'}, + 'node_remaining_capacity': {'key': 'NodeRemainingCapacity', 'type': 'str'}, + 'is_capacity_violation': {'key': 'IsCapacityViolation', 'type': 'bool'}, + 'node_buffered_capacity': {'key': 'NodeBufferedCapacity', 'type': 'str'}, + 'node_remaining_buffered_capacity': {'key': 'NodeRemainingBufferedCapacity', 'type': 'str'}, + 'current_node_load': {'key': 'CurrentNodeLoad', 'type': 'str'}, + 'node_capacity_remaining': {'key': 'NodeCapacityRemaining', 'type': 'str'}, + 'buffered_node_capacity_remaining': {'key': 'BufferedNodeCapacityRemaining', 'type': 'str'}, + 'planned_node_load_removal': {'key': 'PlannedNodeLoadRemoval', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, node_capacity: str=None, node_load: str=None, node_remaining_capacity: str=None, is_capacity_violation: bool=None, node_buffered_capacity: str=None, node_remaining_buffered_capacity: str=None, current_node_load: str=None, node_capacity_remaining: str=None, buffered_node_capacity_remaining: str=None, planned_node_load_removal: str=None, **kwargs) -> None: + super(NodeLoadMetricInformation, self).__init__(**kwargs) + self.name = name + self.node_capacity = node_capacity + self.node_load = node_load + self.node_remaining_capacity = node_remaining_capacity + self.is_capacity_violation = is_capacity_violation + self.node_buffered_capacity = node_buffered_capacity + self.node_remaining_buffered_capacity = node_remaining_buffered_capacity + self.current_node_load = current_node_load + self.node_capacity_remaining = node_capacity_remaining + self.buffered_node_capacity_remaining = buffered_node_capacity_remaining + self.planned_node_load_removal = planned_node_load_removal diff --git a/customSDK/servicefabric/models/node_new_health_report_event.py b/customSDK/servicefabric/models/node_new_health_report_event.py new file mode 100644 index 0000000..d8f835a --- /dev/null +++ b/customSDK/servicefabric/models/node_new_health_report_event.py @@ -0,0 +1,100 @@ +# 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 .node_event import NodeEvent + + +class NodeNewHealthReportEvent(NodeEvent): + """Node Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: Required. Id of Node instance. + :type node_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(NodeNewHealthReportEvent, self).__init__(**kwargs) + self.node_instance_id = kwargs.get('node_instance_id', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'NodeNewHealthReport' diff --git a/customSDK/servicefabric/models/node_new_health_report_event_py3.py b/customSDK/servicefabric/models/node_new_health_report_event_py3.py new file mode 100644 index 0000000..bf7a0ef --- /dev/null +++ b/customSDK/servicefabric/models/node_new_health_report_event_py3.py @@ -0,0 +1,100 @@ +# 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 .node_event_py3 import NodeEvent + + +class NodeNewHealthReportEvent(NodeEvent): + """Node Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: Required. Id of Node instance. + :type node_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance_id = node_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'NodeNewHealthReport' diff --git a/customSDK/servicefabric/models/node_open_failed_event.py b/customSDK/servicefabric/models/node_open_failed_event.py new file mode 100644 index 0000000..e7fb8fb --- /dev/null +++ b/customSDK/servicefabric/models/node_open_failed_event.py @@ -0,0 +1,99 @@ +# 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 .node_event import NodeEvent + + +class NodeOpenFailedEvent(NodeEvent): + """Node Open Failed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_id: Required. Id of Node. + :type node_id: str + :param upgrade_domain: Required. Upgrade domain of Node. + :type upgrade_domain: str + :param fault_domain: Required. Fault domain of Node. + :type fault_domain: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param hostname: Required. Name of Host. + :type hostname: str + :param is_seed_node: Required. Indicates if it is seed node. + :type is_seed_node: bool + :param node_version: Required. Version of Node. + :type node_version: str + :param error: Required. Describes the error. + :type error: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + 'error': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + 'error': {'key': 'Error', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeOpenFailedEvent, self).__init__(**kwargs) + self.node_instance = kwargs.get('node_instance', None) + self.node_id = kwargs.get('node_id', None) + self.upgrade_domain = kwargs.get('upgrade_domain', None) + self.fault_domain = kwargs.get('fault_domain', None) + self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) + self.hostname = kwargs.get('hostname', None) + self.is_seed_node = kwargs.get('is_seed_node', None) + self.node_version = kwargs.get('node_version', None) + self.error = kwargs.get('error', None) + self.kind = 'NodeOpenFailed' diff --git a/customSDK/servicefabric/models/node_open_failed_event_py3.py b/customSDK/servicefabric/models/node_open_failed_event_py3.py new file mode 100644 index 0000000..8f9e240 --- /dev/null +++ b/customSDK/servicefabric/models/node_open_failed_event_py3.py @@ -0,0 +1,99 @@ +# 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 .node_event_py3 import NodeEvent + + +class NodeOpenFailedEvent(NodeEvent): + """Node Open Failed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_id: Required. Id of Node. + :type node_id: str + :param upgrade_domain: Required. Upgrade domain of Node. + :type upgrade_domain: str + :param fault_domain: Required. Fault domain of Node. + :type fault_domain: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param hostname: Required. Name of Host. + :type hostname: str + :param is_seed_node: Required. Indicates if it is seed node. + :type is_seed_node: bool + :param node_version: Required. Version of Node. + :type node_version: str + :param error: Required. Describes the error. + :type error: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + 'error': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + 'error': {'key': 'Error', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, node_id: str, upgrade_domain: str, fault_domain: str, ip_address_or_fqdn: str, hostname: str, is_seed_node: bool, node_version: str, error: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeOpenFailedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance = node_instance + self.node_id = node_id + self.upgrade_domain = upgrade_domain + self.fault_domain = fault_domain + self.ip_address_or_fqdn = ip_address_or_fqdn + self.hostname = hostname + self.is_seed_node = is_seed_node + self.node_version = node_version + self.error = error + self.kind = 'NodeOpenFailed' diff --git a/customSDK/servicefabric/models/node_open_succeeded_event.py b/customSDK/servicefabric/models/node_open_succeeded_event.py new file mode 100644 index 0000000..a0ab8ed --- /dev/null +++ b/customSDK/servicefabric/models/node_open_succeeded_event.py @@ -0,0 +1,94 @@ +# 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 .node_event import NodeEvent + + +class NodeOpenSucceededEvent(NodeEvent): + """Node Opened Succeeded event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_id: Required. Id of Node. + :type node_id: str + :param upgrade_domain: Required. Upgrade domain of Node. + :type upgrade_domain: str + :param fault_domain: Required. Fault domain of Node. + :type fault_domain: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param hostname: Required. Name of Host. + :type hostname: str + :param is_seed_node: Required. Indicates if it is seed node. + :type is_seed_node: bool + :param node_version: Required. Version of Node. + :type node_version: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeOpenSucceededEvent, self).__init__(**kwargs) + self.node_instance = kwargs.get('node_instance', None) + self.node_id = kwargs.get('node_id', None) + self.upgrade_domain = kwargs.get('upgrade_domain', None) + self.fault_domain = kwargs.get('fault_domain', None) + self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) + self.hostname = kwargs.get('hostname', None) + self.is_seed_node = kwargs.get('is_seed_node', None) + self.node_version = kwargs.get('node_version', None) + self.kind = 'NodeOpenSucceeded' diff --git a/customSDK/servicefabric/models/node_open_succeeded_event_py3.py b/customSDK/servicefabric/models/node_open_succeeded_event_py3.py new file mode 100644 index 0000000..e29ba22 --- /dev/null +++ b/customSDK/servicefabric/models/node_open_succeeded_event_py3.py @@ -0,0 +1,94 @@ +# 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 .node_event_py3 import NodeEvent + + +class NodeOpenSucceededEvent(NodeEvent): + """Node Opened Succeeded event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_id: Required. Id of Node. + :type node_id: str + :param upgrade_domain: Required. Upgrade domain of Node. + :type upgrade_domain: str + :param fault_domain: Required. Fault domain of Node. + :type fault_domain: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param hostname: Required. Name of Host. + :type hostname: str + :param is_seed_node: Required. Indicates if it is seed node. + :type is_seed_node: bool + :param node_version: Required. Version of Node. + :type node_version: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, node_id: str, upgrade_domain: str, fault_domain: str, ip_address_or_fqdn: str, hostname: str, is_seed_node: bool, node_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeOpenSucceededEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance = node_instance + self.node_id = node_id + self.upgrade_domain = upgrade_domain + self.fault_domain = fault_domain + self.ip_address_or_fqdn = ip_address_or_fqdn + self.hostname = hostname + self.is_seed_node = is_seed_node + self.node_version = node_version + self.kind = 'NodeOpenSucceeded' diff --git a/customSDK/servicefabric/models/node_removed_from_cluster_event.py b/customSDK/servicefabric/models/node_removed_from_cluster_event.py new file mode 100644 index 0000000..651954f --- /dev/null +++ b/customSDK/servicefabric/models/node_removed_from_cluster_event.py @@ -0,0 +1,84 @@ +# 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 .node_event import NodeEvent + + +class NodeRemovedFromClusterEvent(NodeEvent): + """Node Removed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_id: Required. Id of Node. + :type node_id: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_type: Required. Type of Node. + :type node_type: str + :param fabric_version: Required. Fabric version. + :type fabric_version: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param node_capacities: Required. Capacities. + :type node_capacities: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'node_type': {'required': True}, + 'fabric_version': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'node_capacities': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_type': {'key': 'NodeType', 'type': 'str'}, + 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeRemovedFromClusterEvent, self).__init__(**kwargs) + self.node_id = kwargs.get('node_id', None) + self.node_instance = kwargs.get('node_instance', None) + self.node_type = kwargs.get('node_type', None) + self.fabric_version = kwargs.get('fabric_version', None) + self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) + self.node_capacities = kwargs.get('node_capacities', None) + self.kind = 'NodeRemovedFromCluster' diff --git a/customSDK/servicefabric/models/node_removed_from_cluster_event_py3.py b/customSDK/servicefabric/models/node_removed_from_cluster_event_py3.py new file mode 100644 index 0000000..dfbf977 --- /dev/null +++ b/customSDK/servicefabric/models/node_removed_from_cluster_event_py3.py @@ -0,0 +1,84 @@ +# 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 .node_event_py3 import NodeEvent + + +class NodeRemovedFromClusterEvent(NodeEvent): + """Node Removed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_id: Required. Id of Node. + :type node_id: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_type: Required. Type of Node. + :type node_type: str + :param fabric_version: Required. Fabric version. + :type fabric_version: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param node_capacities: Required. Capacities. + :type node_capacities: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'node_type': {'required': True}, + 'fabric_version': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'node_capacities': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_type': {'key': 'NodeType', 'type': 'str'}, + 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_id: str, node_instance: int, node_type: str, fabric_version: str, ip_address_or_fqdn: str, node_capacities: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeRemovedFromClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_id = node_id + self.node_instance = node_instance + self.node_type = node_type + self.fabric_version = fabric_version + self.ip_address_or_fqdn = ip_address_or_fqdn + self.node_capacities = node_capacities + self.kind = 'NodeRemovedFromCluster' diff --git a/customSDK/servicefabric/models/node_repair_impact_description.py b/customSDK/servicefabric/models/node_repair_impact_description.py new file mode 100644 index 0000000..cf0eb23 --- /dev/null +++ b/customSDK/servicefabric/models/node_repair_impact_description.py @@ -0,0 +1,41 @@ +# 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 .repair_impact_description_base import RepairImpactDescriptionBase + + +class NodeRepairImpactDescription(RepairImpactDescriptionBase): + """Describes the expected impact of a repair on a set of nodes. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param node_impact_list: The list of nodes impacted by a repair action and + their respective expected impact. + :type node_impact_list: list[~azure.servicefabric.models.NodeImpact] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_impact_list': {'key': 'NodeImpactList', 'type': '[NodeImpact]'}, + } + + def __init__(self, **kwargs): + super(NodeRepairImpactDescription, self).__init__(**kwargs) + self.node_impact_list = kwargs.get('node_impact_list', None) + self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_repair_impact_description_py3.py b/customSDK/servicefabric/models/node_repair_impact_description_py3.py new file mode 100644 index 0000000..09f45ce --- /dev/null +++ b/customSDK/servicefabric/models/node_repair_impact_description_py3.py @@ -0,0 +1,41 @@ +# 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 .repair_impact_description_base_py3 import RepairImpactDescriptionBase + + +class NodeRepairImpactDescription(RepairImpactDescriptionBase): + """Describes the expected impact of a repair on a set of nodes. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param node_impact_list: The list of nodes impacted by a repair action and + their respective expected impact. + :type node_impact_list: list[~azure.servicefabric.models.NodeImpact] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_impact_list': {'key': 'NodeImpactList', 'type': '[NodeImpact]'}, + } + + def __init__(self, *, node_impact_list=None, **kwargs) -> None: + super(NodeRepairImpactDescription, self).__init__(**kwargs) + self.node_impact_list = node_impact_list + self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_repair_target_description.py b/customSDK/servicefabric/models/node_repair_target_description.py new file mode 100644 index 0000000..5a2eff3 --- /dev/null +++ b/customSDK/servicefabric/models/node_repair_target_description.py @@ -0,0 +1,40 @@ +# 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 .repair_target_description_base import RepairTargetDescriptionBase + + +class NodeRepairTargetDescription(RepairTargetDescriptionBase): + """Describes the list of nodes targeted by a repair action. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param node_names: The list of nodes targeted by a repair action. + :type node_names: list[str] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_names': {'key': 'NodeNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(NodeRepairTargetDescription, self).__init__(**kwargs) + self.node_names = kwargs.get('node_names', None) + self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_repair_target_description_py3.py b/customSDK/servicefabric/models/node_repair_target_description_py3.py new file mode 100644 index 0000000..8820401 --- /dev/null +++ b/customSDK/servicefabric/models/node_repair_target_description_py3.py @@ -0,0 +1,40 @@ +# 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 .repair_target_description_base_py3 import RepairTargetDescriptionBase + + +class NodeRepairTargetDescription(RepairTargetDescriptionBase): + """Describes the list of nodes targeted by a repair action. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param node_names: The list of nodes targeted by a repair action. + :type node_names: list[str] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_names': {'key': 'NodeNames', 'type': '[str]'}, + } + + def __init__(self, *, node_names=None, **kwargs) -> None: + super(NodeRepairTargetDescription, self).__init__(**kwargs) + self.node_names = node_names + self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_result.py b/customSDK/servicefabric/models/node_result.py new file mode 100644 index 0000000..54e79ef --- /dev/null +++ b/customSDK/servicefabric/models/node_result.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class NodeResult(Model): + """Contains information about a node that was targeted by a user-induced + operation. + + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: The node instance id. + :type node_instance_id: str + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeResult, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.node_instance_id = kwargs.get('node_instance_id', None) diff --git a/customSDK/servicefabric/models/node_result_py3.py b/customSDK/servicefabric/models/node_result_py3.py new file mode 100644 index 0000000..6efb663 --- /dev/null +++ b/customSDK/servicefabric/models/node_result_py3.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class NodeResult(Model): + """Contains information about a node that was targeted by a user-induced + operation. + + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: The node instance id. + :type node_instance_id: str + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + } + + def __init__(self, *, node_name: str=None, node_instance_id: str=None, **kwargs) -> None: + super(NodeResult, self).__init__(**kwargs) + self.node_name = node_name + self.node_instance_id = node_instance_id diff --git a/customSDK/servicefabric/models/node_tags_description.py b/customSDK/servicefabric/models/node_tags_description.py new file mode 100644 index 0000000..1ab5d87 --- /dev/null +++ b/customSDK/servicefabric/models/node_tags_description.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class NodeTagsDescription(Model): + """Describes the tags required for placement or running of the service. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. The number of tags. + :type count: int + :param tags: Required. Array of size specified by the ‘Count’ parameter, + for the placement tags of the service. + :type tags: list[str] + """ + + _validation = { + 'count': {'required': True}, + 'tags': {'required': True}, + } + + _attribute_map = { + 'count': {'key': 'Count', 'type': 'int'}, + 'tags': {'key': 'Tags', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(NodeTagsDescription, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.tags = kwargs.get('tags', None) diff --git a/customSDK/servicefabric/models/node_tags_description_py3.py b/customSDK/servicefabric/models/node_tags_description_py3.py new file mode 100644 index 0000000..3dd9e60 --- /dev/null +++ b/customSDK/servicefabric/models/node_tags_description_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class NodeTagsDescription(Model): + """Describes the tags required for placement or running of the service. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. The number of tags. + :type count: int + :param tags: Required. Array of size specified by the ‘Count’ parameter, + for the placement tags of the service. + :type tags: list[str] + """ + + _validation = { + 'count': {'required': True}, + 'tags': {'required': True}, + } + + _attribute_map = { + 'count': {'key': 'Count', 'type': 'int'}, + 'tags': {'key': 'Tags', 'type': '[str]'}, + } + + def __init__(self, *, count: int, tags, **kwargs) -> None: + super(NodeTagsDescription, self).__init__(**kwargs) + self.count = count + self.tags = tags diff --git a/customSDK/servicefabric/models/node_transition_progress.py b/customSDK/servicefabric/models/node_transition_progress.py new file mode 100644 index 0000000..f60972e --- /dev/null +++ b/customSDK/servicefabric/models/node_transition_progress.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class NodeTransitionProgress(Model): + """Information about an NodeTransition operation. This class contains an + OperationState and a NodeTransitionResult. The NodeTransitionResult is not + valid until OperationState + is Completed or Faulted. + + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param node_transition_result: Represents information about an operation + in a terminal state (Completed or Faulted). + :type node_transition_result: + ~azure.servicefabric.models.NodeTransitionResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'node_transition_result': {'key': 'NodeTransitionResult', 'type': 'NodeTransitionResult'}, + } + + def __init__(self, **kwargs): + super(NodeTransitionProgress, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.node_transition_result = kwargs.get('node_transition_result', None) diff --git a/customSDK/servicefabric/models/node_transition_progress_py3.py b/customSDK/servicefabric/models/node_transition_progress_py3.py new file mode 100644 index 0000000..3a74806 --- /dev/null +++ b/customSDK/servicefabric/models/node_transition_progress_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class NodeTransitionProgress(Model): + """Information about an NodeTransition operation. This class contains an + OperationState and a NodeTransitionResult. The NodeTransitionResult is not + valid until OperationState + is Completed or Faulted. + + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param node_transition_result: Represents information about an operation + in a terminal state (Completed or Faulted). + :type node_transition_result: + ~azure.servicefabric.models.NodeTransitionResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'node_transition_result': {'key': 'NodeTransitionResult', 'type': 'NodeTransitionResult'}, + } + + def __init__(self, *, state=None, node_transition_result=None, **kwargs) -> None: + super(NodeTransitionProgress, self).__init__(**kwargs) + self.state = state + self.node_transition_result = node_transition_result diff --git a/customSDK/servicefabric/models/node_transition_result.py b/customSDK/servicefabric/models/node_transition_result.py new file mode 100644 index 0000000..45185d5 --- /dev/null +++ b/customSDK/servicefabric/models/node_transition_result.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class NodeTransitionResult(Model): + """Represents information about an operation in a terminal state (Completed or + Faulted). + + :param error_code: If OperationState is Completed, this is 0. If + OperationState is Faulted, this is an error code indicating the reason. + :type error_code: int + :param node_result: Contains information about a node that was targeted by + a user-induced operation. + :type node_result: ~azure.servicefabric.models.NodeResult + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'node_result': {'key': 'NodeResult', 'type': 'NodeResult'}, + } + + def __init__(self, **kwargs): + super(NodeTransitionResult, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.node_result = kwargs.get('node_result', None) diff --git a/customSDK/servicefabric/models/node_transition_result_py3.py b/customSDK/servicefabric/models/node_transition_result_py3.py new file mode 100644 index 0000000..17cbc32 --- /dev/null +++ b/customSDK/servicefabric/models/node_transition_result_py3.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class NodeTransitionResult(Model): + """Represents information about an operation in a terminal state (Completed or + Faulted). + + :param error_code: If OperationState is Completed, this is 0. If + OperationState is Faulted, this is an error code indicating the reason. + :type error_code: int + :param node_result: Contains information about a node that was targeted by + a user-induced operation. + :type node_result: ~azure.servicefabric.models.NodeResult + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'node_result': {'key': 'NodeResult', 'type': 'NodeResult'}, + } + + def __init__(self, *, error_code: int=None, node_result=None, **kwargs) -> None: + super(NodeTransitionResult, self).__init__(**kwargs) + self.error_code = error_code + self.node_result = node_result diff --git a/customSDK/servicefabric/models/node_type_health_policy_map_item.py b/customSDK/servicefabric/models/node_type_health_policy_map_item.py new file mode 100644 index 0000000..f9494a3 --- /dev/null +++ b/customSDK/servicefabric/models/node_type_health_policy_map_item.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class NodeTypeHealthPolicyMapItem(Model): + """Defines an item in NodeTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the node type health policy map item. + This is the name of the node type. + :type key: str + :param value: Required. The value of the node type health policy map item. + If the percentage is respected but there is at least one unhealthy node in + the node type, the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes + over the total number of nodes in the node type. + The computation rounds up to tolerate one failure on small numbers of + nodes. + The max percent unhealthy nodes allowed for the node type. Must be between + zero and 100. + :type value: int + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(NodeTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/node_type_health_policy_map_item_py3.py b/customSDK/servicefabric/models/node_type_health_policy_map_item_py3.py new file mode 100644 index 0000000..975a43e --- /dev/null +++ b/customSDK/servicefabric/models/node_type_health_policy_map_item_py3.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class NodeTypeHealthPolicyMapItem(Model): + """Defines an item in NodeTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the node type health policy map item. + This is the name of the node type. + :type key: str + :param value: Required. The value of the node type health policy map item. + If the percentage is respected but there is at least one unhealthy node in + the node type, the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes + over the total number of nodes in the node type. + The computation rounds up to tolerate one failure on small numbers of + nodes. + The max percent unhealthy nodes allowed for the node type. Must be between + zero and 100. + :type value: int + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + } + + def __init__(self, *, key: str, value: int, **kwargs) -> None: + super(NodeTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = key + self.value = value diff --git a/customSDK/servicefabric/models/node_type_nodes_health_evaluation.py b/customSDK/servicefabric/models/node_type_nodes_health_evaluation.py new file mode 100644 index 0000000..3734470 --- /dev/null +++ b/customSDK/servicefabric/models/node_type_nodes_health_evaluation.py @@ -0,0 +1,73 @@ +# 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 .health_evaluation import HealthEvaluation + + +class NodeTypeNodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for nodes of a particular node type. The node + type nodes evaluation can be returned when cluster health evaluation + returns unhealthy aggregated health state, either Error or Warning. It + contains health evaluations for each unhealthy node of the included node + type that impacted current aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_type_name: The node type name as defined in the cluster + manifest. + :type node_type_name: str + :param max_percent_unhealthy_nodes: Maximum allowed percentage of + unhealthy nodes for the node type, specified as an entry in + NodeTypeHealthPolicyMap. + :type max_percent_unhealthy_nodes: int + :param total_count: Total number of nodes of the node type found in the + health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation of this node type that impacted the aggregated + health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_type_name': {'key': 'NodeTypeName', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(NodeTypeNodesHealthEvaluation, self).__init__(**kwargs) + self.node_type_name = kwargs.get('node_type_name', None) + self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'NodeTypeNodes' diff --git a/customSDK/servicefabric/models/node_type_nodes_health_evaluation_py3.py b/customSDK/servicefabric/models/node_type_nodes_health_evaluation_py3.py new file mode 100644 index 0000000..d9b828e --- /dev/null +++ b/customSDK/servicefabric/models/node_type_nodes_health_evaluation_py3.py @@ -0,0 +1,73 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class NodeTypeNodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for nodes of a particular node type. The node + type nodes evaluation can be returned when cluster health evaluation + returns unhealthy aggregated health state, either Error or Warning. It + contains health evaluations for each unhealthy node of the included node + type that impacted current aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_type_name: The node type name as defined in the cluster + manifest. + :type node_type_name: str + :param max_percent_unhealthy_nodes: Maximum allowed percentage of + unhealthy nodes for the node type, specified as an entry in + NodeTypeHealthPolicyMap. + :type max_percent_unhealthy_nodes: int + :param total_count: Total number of nodes of the node type found in the + health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation of this node type that impacted the aggregated + health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_type_name': {'key': 'NodeTypeName', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, node_type_name: str=None, max_percent_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(NodeTypeNodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.node_type_name = node_type_name + self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'NodeTypeNodes' diff --git a/customSDK/servicefabric/models/node_up_event.py b/customSDK/servicefabric/models/node_up_event.py new file mode 100644 index 0000000..bcacf73 --- /dev/null +++ b/customSDK/servicefabric/models/node_up_event.py @@ -0,0 +1,64 @@ +# 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 .node_event import NodeEvent + + +class NodeUpEvent(NodeEvent): + """Node Up event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param last_node_down_at: Required. Time when Node was last down. + :type last_node_down_at: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'last_node_down_at': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'last_node_down_at': {'key': 'LastNodeDownAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(NodeUpEvent, self).__init__(**kwargs) + self.node_instance = kwargs.get('node_instance', None) + self.last_node_down_at = kwargs.get('last_node_down_at', None) + self.kind = 'NodeUp' diff --git a/customSDK/servicefabric/models/node_up_event_py3.py b/customSDK/servicefabric/models/node_up_event_py3.py new file mode 100644 index 0000000..4b02f97 --- /dev/null +++ b/customSDK/servicefabric/models/node_up_event_py3.py @@ -0,0 +1,64 @@ +# 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 .node_event_py3 import NodeEvent + + +class NodeUpEvent(NodeEvent): + """Node Up event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param last_node_down_at: Required. Time when Node was last down. + :type last_node_down_at: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'last_node_down_at': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'last_node_down_at': {'key': 'LastNodeDownAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, last_node_down_at, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeUpEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance = node_instance + self.last_node_down_at = last_node_down_at + self.kind = 'NodeUp' diff --git a/customSDK/servicefabric/models/node_upgrade_progress_info.py b/customSDK/servicefabric/models/node_upgrade_progress_info.py new file mode 100644 index 0000000..a2d26b9 --- /dev/null +++ b/customSDK/servicefabric/models/node_upgrade_progress_info.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class NodeUpgradeProgressInfo(Model): + """Information about the upgrading node and its status. + + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param upgrade_phase: The state of the upgrading node. Possible values + include: 'Invalid', 'PreUpgradeSafetyCheck', 'Upgrading', + 'PostUpgradeSafetyCheck' + :type upgrade_phase: str or ~azure.servicefabric.models.NodeUpgradePhase + :param pending_safety_checks: List of pending safety checks + :type pending_safety_checks: + list[~azure.servicefabric.models.SafetyCheckWrapper] + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'upgrade_phase': {'key': 'UpgradePhase', 'type': 'str'}, + 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, + } + + def __init__(self, **kwargs): + super(NodeUpgradeProgressInfo, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.upgrade_phase = kwargs.get('upgrade_phase', None) + self.pending_safety_checks = kwargs.get('pending_safety_checks', None) diff --git a/customSDK/servicefabric/models/node_upgrade_progress_info_py3.py b/customSDK/servicefabric/models/node_upgrade_progress_info_py3.py new file mode 100644 index 0000000..3078c43 --- /dev/null +++ b/customSDK/servicefabric/models/node_upgrade_progress_info_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class NodeUpgradeProgressInfo(Model): + """Information about the upgrading node and its status. + + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param upgrade_phase: The state of the upgrading node. Possible values + include: 'Invalid', 'PreUpgradeSafetyCheck', 'Upgrading', + 'PostUpgradeSafetyCheck' + :type upgrade_phase: str or ~azure.servicefabric.models.NodeUpgradePhase + :param pending_safety_checks: List of pending safety checks + :type pending_safety_checks: + list[~azure.servicefabric.models.SafetyCheckWrapper] + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'upgrade_phase': {'key': 'UpgradePhase', 'type': 'str'}, + 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, + } + + def __init__(self, *, node_name: str=None, upgrade_phase=None, pending_safety_checks=None, **kwargs) -> None: + super(NodeUpgradeProgressInfo, self).__init__(**kwargs) + self.node_name = node_name + self.upgrade_phase = upgrade_phase + self.pending_safety_checks = pending_safety_checks diff --git a/customSDK/servicefabric/models/nodes_health_evaluation.py b/customSDK/servicefabric/models/nodes_health_evaluation.py new file mode 100644 index 0000000..f31972d --- /dev/null +++ b/customSDK/servicefabric/models/nodes_health_evaluation.py @@ -0,0 +1,64 @@ +# 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 .health_evaluation import HealthEvaluation + + +class NodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for nodes, containing health evaluations for + each unhealthy node that impacted current aggregated health state. Can be + returned when evaluating cluster health and the aggregated health state is + either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_nodes: Maximum allowed percentage of + unhealthy nodes from the ClusterHealthPolicy. + :type max_percent_unhealthy_nodes: int + :param total_count: Total number of nodes found in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(NodesHealthEvaluation, self).__init__(**kwargs) + self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Nodes' diff --git a/customSDK/servicefabric/models/nodes_health_evaluation_py3.py b/customSDK/servicefabric/models/nodes_health_evaluation_py3.py new file mode 100644 index 0000000..208e702 --- /dev/null +++ b/customSDK/servicefabric/models/nodes_health_evaluation_py3.py @@ -0,0 +1,64 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class NodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for nodes, containing health evaluations for + each unhealthy node that impacted current aggregated health state. Can be + returned when evaluating cluster health and the aggregated health state is + either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_nodes: Maximum allowed percentage of + unhealthy nodes from the ClusterHealthPolicy. + :type max_percent_unhealthy_nodes: int + :param total_count: Total number of nodes found in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(NodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Nodes' diff --git a/customSDK/servicefabric/models/operation_status.py b/customSDK/servicefabric/models/operation_status.py new file mode 100644 index 0000000..0ac2462 --- /dev/null +++ b/customSDK/servicefabric/models/operation_status.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class OperationStatus(Model): + """Contains the OperationId, OperationState, and OperationType for + user-induced operations. + + :param operation_id: A GUID that identifies a call to this API. This is + also passed into the corresponding GetProgress API. + :type operation_id: str + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param type: The type of the operation. Possible values include: + 'Invalid', 'PartitionDataLoss', 'PartitionQuorumLoss', 'PartitionRestart', + 'NodeTransition' + :type type: str or ~azure.servicefabric.models.OperationType + """ + + _attribute_map = { + 'operation_id': {'key': 'OperationId', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + 'type': {'key': 'Type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationStatus, self).__init__(**kwargs) + self.operation_id = kwargs.get('operation_id', None) + self.state = kwargs.get('state', None) + self.type = kwargs.get('type', None) diff --git a/customSDK/servicefabric/models/operation_status_py3.py b/customSDK/servicefabric/models/operation_status_py3.py new file mode 100644 index 0000000..cb08902 --- /dev/null +++ b/customSDK/servicefabric/models/operation_status_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class OperationStatus(Model): + """Contains the OperationId, OperationState, and OperationType for + user-induced operations. + + :param operation_id: A GUID that identifies a call to this API. This is + also passed into the corresponding GetProgress API. + :type operation_id: str + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param type: The type of the operation. Possible values include: + 'Invalid', 'PartitionDataLoss', 'PartitionQuorumLoss', 'PartitionRestart', + 'NodeTransition' + :type type: str or ~azure.servicefabric.models.OperationType + """ + + _attribute_map = { + 'operation_id': {'key': 'OperationId', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + 'type': {'key': 'Type', 'type': 'str'}, + } + + def __init__(self, *, operation_id: str=None, state=None, type=None, **kwargs) -> None: + super(OperationStatus, self).__init__(**kwargs) + self.operation_id = operation_id + self.state = state + self.type = type diff --git a/customSDK/servicefabric/models/package_sharing_policy_info.py b/customSDK/servicefabric/models/package_sharing_policy_info.py new file mode 100644 index 0000000..0f8956a --- /dev/null +++ b/customSDK/servicefabric/models/package_sharing_policy_info.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class PackageSharingPolicyInfo(Model): + """Represents a policy for the package sharing. + + :param shared_package_name: The name of code, configuration or data + package that should be shared. + :type shared_package_name: str + :param package_sharing_scope: Represents the scope for + PackageSharingPolicy. This is specified during DeployServicePackageToNode + operation. Possible values include: 'None', 'All', 'Code', 'Config', + 'Data' + :type package_sharing_scope: str or + ~azure.servicefabric.models.PackageSharingPolicyScope + """ + + _attribute_map = { + 'shared_package_name': {'key': 'SharedPackageName', 'type': 'str'}, + 'package_sharing_scope': {'key': 'PackageSharingScope', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PackageSharingPolicyInfo, self).__init__(**kwargs) + self.shared_package_name = kwargs.get('shared_package_name', None) + self.package_sharing_scope = kwargs.get('package_sharing_scope', None) diff --git a/customSDK/servicefabric/models/package_sharing_policy_info_py3.py b/customSDK/servicefabric/models/package_sharing_policy_info_py3.py new file mode 100644 index 0000000..ad60c66 --- /dev/null +++ b/customSDK/servicefabric/models/package_sharing_policy_info_py3.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class PackageSharingPolicyInfo(Model): + """Represents a policy for the package sharing. + + :param shared_package_name: The name of code, configuration or data + package that should be shared. + :type shared_package_name: str + :param package_sharing_scope: Represents the scope for + PackageSharingPolicy. This is specified during DeployServicePackageToNode + operation. Possible values include: 'None', 'All', 'Code', 'Config', + 'Data' + :type package_sharing_scope: str or + ~azure.servicefabric.models.PackageSharingPolicyScope + """ + + _attribute_map = { + 'shared_package_name': {'key': 'SharedPackageName', 'type': 'str'}, + 'package_sharing_scope': {'key': 'PackageSharingScope', 'type': 'str'}, + } + + def __init__(self, *, shared_package_name: str=None, package_sharing_scope=None, **kwargs) -> None: + super(PackageSharingPolicyInfo, self).__init__(**kwargs) + self.shared_package_name = shared_package_name + self.package_sharing_scope = package_sharing_scope diff --git a/customSDK/servicefabric/models/paged_application_info_list.py b/customSDK/servicefabric/models/paged_application_info_list.py new file mode 100644 index 0000000..7aa9d71 --- /dev/null +++ b/customSDK/servicefabric/models/paged_application_info_list.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedApplicationInfoList(Model): + """The list of applications in the cluster. The list is paged when all of the + results cannot fit in a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of application information. + :type items: list[~azure.servicefabric.models.ApplicationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedApplicationInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_application_info_list_py3.py b/customSDK/servicefabric/models/paged_application_info_list_py3.py new file mode 100644 index 0000000..46dc2cc --- /dev/null +++ b/customSDK/servicefabric/models/paged_application_info_list_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedApplicationInfoList(Model): + """The list of applications in the cluster. The list is paged when all of the + results cannot fit in a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of application information. + :type items: list[~azure.servicefabric.models.ApplicationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedApplicationInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_application_resource_description_list.py b/customSDK/servicefabric/models/paged_application_resource_description_list.py new file mode 100644 index 0000000..bda0340 --- /dev/null +++ b/customSDK/servicefabric/models/paged_application_resource_description_list.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class PagedApplicationResourceDescriptionList(Model): + """The list of application resources. The list is paged when all of the + results cannot fit in a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: + list[~azure.servicefabric.models.ApplicationResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationResourceDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedApplicationResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_application_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_application_resource_description_list_py3.py new file mode 100644 index 0000000..bc5bd46 --- /dev/null +++ b/customSDK/servicefabric/models/paged_application_resource_description_list_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class PagedApplicationResourceDescriptionList(Model): + """The list of application resources. The list is paged when all of the + results cannot fit in a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: + list[~azure.servicefabric.models.ApplicationResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationResourceDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedApplicationResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_application_type_info_list.py b/customSDK/servicefabric/models/paged_application_type_info_list.py new file mode 100644 index 0000000..486df2b --- /dev/null +++ b/customSDK/servicefabric/models/paged_application_type_info_list.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedApplicationTypeInfoList(Model): + """The list of application types that are provisioned or being provisioned in + the cluster. The list is paged when all of the results cannot fit in a + single message. The next set of results can be obtained by executing the + same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of application type information. + :type items: list[~azure.servicefabric.models.ApplicationTypeInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationTypeInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedApplicationTypeInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_application_type_info_list_py3.py b/customSDK/servicefabric/models/paged_application_type_info_list_py3.py new file mode 100644 index 0000000..cfcfce6 --- /dev/null +++ b/customSDK/servicefabric/models/paged_application_type_info_list_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedApplicationTypeInfoList(Model): + """The list of application types that are provisioned or being provisioned in + the cluster. The list is paged when all of the results cannot fit in a + single message. The next set of results can be obtained by executing the + same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of application type information. + :type items: list[~azure.servicefabric.models.ApplicationTypeInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationTypeInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedApplicationTypeInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_backup_configuration_info_list.py b/customSDK/servicefabric/models/paged_backup_configuration_info_list.py new file mode 100644 index 0000000..732c5ac --- /dev/null +++ b/customSDK/servicefabric/models/paged_backup_configuration_info_list.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedBackupConfigurationInfoList(Model): + """The list of backup configuration information. The list is paged when all of + the results cannot fit in a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of backup configuration information. + :type items: list[~azure.servicefabric.models.BackupConfigurationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupConfigurationInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedBackupConfigurationInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_backup_configuration_info_list_py3.py b/customSDK/servicefabric/models/paged_backup_configuration_info_list_py3.py new file mode 100644 index 0000000..643ec9e --- /dev/null +++ b/customSDK/servicefabric/models/paged_backup_configuration_info_list_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedBackupConfigurationInfoList(Model): + """The list of backup configuration information. The list is paged when all of + the results cannot fit in a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of backup configuration information. + :type items: list[~azure.servicefabric.models.BackupConfigurationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupConfigurationInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedBackupConfigurationInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_backup_entity_list.py b/customSDK/servicefabric/models/paged_backup_entity_list.py new file mode 100644 index 0000000..08b04f6 --- /dev/null +++ b/customSDK/servicefabric/models/paged_backup_entity_list.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedBackupEntityList(Model): + """The list of backup entities that are being periodically backed. The list is + paged when all of the results cannot fit in a single message. The next set + of results can be obtained by executing the same query with the + continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of backup entity information. + :type items: list[~azure.servicefabric.models.BackupEntity] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupEntity]'}, + } + + def __init__(self, **kwargs): + super(PagedBackupEntityList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_backup_entity_list_py3.py b/customSDK/servicefabric/models/paged_backup_entity_list_py3.py new file mode 100644 index 0000000..b2e4f9e --- /dev/null +++ b/customSDK/servicefabric/models/paged_backup_entity_list_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedBackupEntityList(Model): + """The list of backup entities that are being periodically backed. The list is + paged when all of the results cannot fit in a single message. The next set + of results can be obtained by executing the same query with the + continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of backup entity information. + :type items: list[~azure.servicefabric.models.BackupEntity] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupEntity]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedBackupEntityList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_backup_info_list.py b/customSDK/servicefabric/models/paged_backup_info_list.py new file mode 100644 index 0000000..b65adcc --- /dev/null +++ b/customSDK/servicefabric/models/paged_backup_info_list.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class PagedBackupInfoList(Model): + """The list of backups. The list is paged when all of the results cannot fit + in a single message. The next set of results can be obtained by executing + the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of backup information. + :type items: list[~azure.servicefabric.models.BackupInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedBackupInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_backup_info_list_py3.py b/customSDK/servicefabric/models/paged_backup_info_list_py3.py new file mode 100644 index 0000000..f3cfc51 --- /dev/null +++ b/customSDK/servicefabric/models/paged_backup_info_list_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class PagedBackupInfoList(Model): + """The list of backups. The list is paged when all of the results cannot fit + in a single message. The next set of results can be obtained by executing + the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of backup information. + :type items: list[~azure.servicefabric.models.BackupInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedBackupInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_backup_policy_description_list.py b/customSDK/servicefabric/models/paged_backup_policy_description_list.py new file mode 100644 index 0000000..5898dc1 --- /dev/null +++ b/customSDK/servicefabric/models/paged_backup_policy_description_list.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedBackupPolicyDescriptionList(Model): + """The list of backup policies configured in the cluster. The list is paged + when all of the results cannot fit in a single message. The next set of + results can be obtained by executing the same query with the continuation + token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: The list of backup policies information. + :type items: list[~azure.servicefabric.models.BackupPolicyDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupPolicyDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedBackupPolicyDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_backup_policy_description_list_py3.py b/customSDK/servicefabric/models/paged_backup_policy_description_list_py3.py new file mode 100644 index 0000000..e87b885 --- /dev/null +++ b/customSDK/servicefabric/models/paged_backup_policy_description_list_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedBackupPolicyDescriptionList(Model): + """The list of backup policies configured in the cluster. The list is paged + when all of the results cannot fit in a single message. The next set of + results can be obtained by executing the same query with the continuation + token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: The list of backup policies information. + :type items: list[~azure.servicefabric.models.BackupPolicyDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupPolicyDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedBackupPolicyDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_compose_deployment_status_info_list.py b/customSDK/servicefabric/models/paged_compose_deployment_status_info_list.py new file mode 100644 index 0000000..1b2d2c5 --- /dev/null +++ b/customSDK/servicefabric/models/paged_compose_deployment_status_info_list.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedComposeDeploymentStatusInfoList(Model): + """The list of compose deployments in the cluster. The list is paged when all + of the results cannot fit in a single message. The next set of results can + be obtained by executing the same query with the continuation token + provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of compose deployment status information. + :type items: list[~azure.servicefabric.models.ComposeDeploymentStatusInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ComposeDeploymentStatusInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedComposeDeploymentStatusInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_compose_deployment_status_info_list_py3.py b/customSDK/servicefabric/models/paged_compose_deployment_status_info_list_py3.py new file mode 100644 index 0000000..37c8f8d --- /dev/null +++ b/customSDK/servicefabric/models/paged_compose_deployment_status_info_list_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedComposeDeploymentStatusInfoList(Model): + """The list of compose deployments in the cluster. The list is paged when all + of the results cannot fit in a single message. The next set of results can + be obtained by executing the same query with the continuation token + provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of compose deployment status information. + :type items: list[~azure.servicefabric.models.ComposeDeploymentStatusInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ComposeDeploymentStatusInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedComposeDeploymentStatusInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_deployed_application_info_list.py b/customSDK/servicefabric/models/paged_deployed_application_info_list.py new file mode 100644 index 0000000..9d6ed5e --- /dev/null +++ b/customSDK/servicefabric/models/paged_deployed_application_info_list.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class PagedDeployedApplicationInfoList(Model): + """The list of deployed applications in activating, downloading, or active + states on a node. + The list is paged when all of the results cannot fit in a single message. + The next set of results can be obtained by executing the same query with + the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of deployed application information. + :type items: list[~azure.servicefabric.models.DeployedApplicationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[DeployedApplicationInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedDeployedApplicationInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_deployed_application_info_list_py3.py b/customSDK/servicefabric/models/paged_deployed_application_info_list_py3.py new file mode 100644 index 0000000..9610051 --- /dev/null +++ b/customSDK/servicefabric/models/paged_deployed_application_info_list_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class PagedDeployedApplicationInfoList(Model): + """The list of deployed applications in activating, downloading, or active + states on a node. + The list is paged when all of the results cannot fit in a single message. + The next set of results can be obtained by executing the same query with + the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of deployed application information. + :type items: list[~azure.servicefabric.models.DeployedApplicationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[DeployedApplicationInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedDeployedApplicationInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_gateway_resource_description_list.py b/customSDK/servicefabric/models/paged_gateway_resource_description_list.py new file mode 100644 index 0000000..4c41566 --- /dev/null +++ b/customSDK/servicefabric/models/paged_gateway_resource_description_list.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class PagedGatewayResourceDescriptionList(Model): + """The list of gateway resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.GatewayResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[GatewayResourceDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedGatewayResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_gateway_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_gateway_resource_description_list_py3.py new file mode 100644 index 0000000..b4a5cbe --- /dev/null +++ b/customSDK/servicefabric/models/paged_gateway_resource_description_list_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class PagedGatewayResourceDescriptionList(Model): + """The list of gateway resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.GatewayResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[GatewayResourceDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedGatewayResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_network_resource_description_list.py b/customSDK/servicefabric/models/paged_network_resource_description_list.py new file mode 100644 index 0000000..9391a3a --- /dev/null +++ b/customSDK/servicefabric/models/paged_network_resource_description_list.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class PagedNetworkResourceDescriptionList(Model): + """The list of network resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.NetworkResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[NetworkResourceDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedNetworkResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_network_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_network_resource_description_list_py3.py new file mode 100644 index 0000000..729aeed --- /dev/null +++ b/customSDK/servicefabric/models/paged_network_resource_description_list_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class PagedNetworkResourceDescriptionList(Model): + """The list of network resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.NetworkResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[NetworkResourceDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedNetworkResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_node_info_list.py b/customSDK/servicefabric/models/paged_node_info_list.py new file mode 100644 index 0000000..4819ccb --- /dev/null +++ b/customSDK/servicefabric/models/paged_node_info_list.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class PagedNodeInfoList(Model): + """The list of nodes in the cluster. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of node information. + :type items: list[~azure.servicefabric.models.NodeInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[NodeInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedNodeInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_node_info_list_py3.py b/customSDK/servicefabric/models/paged_node_info_list_py3.py new file mode 100644 index 0000000..3834bce --- /dev/null +++ b/customSDK/servicefabric/models/paged_node_info_list_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class PagedNodeInfoList(Model): + """The list of nodes in the cluster. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of node information. + :type items: list[~azure.servicefabric.models.NodeInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[NodeInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedNodeInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_property_info_list.py b/customSDK/servicefabric/models/paged_property_info_list.py new file mode 100644 index 0000000..a4744c9 --- /dev/null +++ b/customSDK/servicefabric/models/paged_property_info_list.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class PagedPropertyInfoList(Model): + """The paged list of Service Fabric properties under a given name. The list is + paged when all of the results cannot fit in a single message. The next set + of results can be obtained by executing the same query with the + continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param is_consistent: Indicates whether any property under the given name + has been modified during the enumeration. If there was a modification, + this property value is false. + :type is_consistent: bool + :param properties: List of property information. + :type properties: list[~azure.servicefabric.models.PropertyInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, + 'properties': {'key': 'Properties', 'type': '[PropertyInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedPropertyInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.is_consistent = kwargs.get('is_consistent', None) + self.properties = kwargs.get('properties', None) diff --git a/customSDK/servicefabric/models/paged_property_info_list_py3.py b/customSDK/servicefabric/models/paged_property_info_list_py3.py new file mode 100644 index 0000000..5317c87 --- /dev/null +++ b/customSDK/servicefabric/models/paged_property_info_list_py3.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class PagedPropertyInfoList(Model): + """The paged list of Service Fabric properties under a given name. The list is + paged when all of the results cannot fit in a single message. The next set + of results can be obtained by executing the same query with the + continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param is_consistent: Indicates whether any property under the given name + has been modified during the enumeration. If there was a modification, + this property value is false. + :type is_consistent: bool + :param properties: List of property information. + :type properties: list[~azure.servicefabric.models.PropertyInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, + 'properties': {'key': 'Properties', 'type': '[PropertyInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, is_consistent: bool=None, properties=None, **kwargs) -> None: + super(PagedPropertyInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.is_consistent = is_consistent + self.properties = properties diff --git a/customSDK/servicefabric/models/paged_replica_info_list.py b/customSDK/servicefabric/models/paged_replica_info_list.py new file mode 100644 index 0000000..3fb73e2 --- /dev/null +++ b/customSDK/servicefabric/models/paged_replica_info_list.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedReplicaInfoList(Model): + """The list of replicas in the cluster for a given partition. The list is + paged when all of the results cannot fit in a single message. The next set + of results can be obtained by executing the same query with the + continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of replica information. + :type items: list[~azure.servicefabric.models.ReplicaInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ReplicaInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedReplicaInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_replica_info_list_py3.py b/customSDK/servicefabric/models/paged_replica_info_list_py3.py new file mode 100644 index 0000000..94fb1a7 --- /dev/null +++ b/customSDK/servicefabric/models/paged_replica_info_list_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedReplicaInfoList(Model): + """The list of replicas in the cluster for a given partition. The list is + paged when all of the results cannot fit in a single message. The next set + of results can be obtained by executing the same query with the + continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of replica information. + :type items: list[~azure.servicefabric.models.ReplicaInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ReplicaInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedReplicaInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_secret_resource_description_list.py b/customSDK/servicefabric/models/paged_secret_resource_description_list.py new file mode 100644 index 0000000..8ec32f9 --- /dev/null +++ b/customSDK/servicefabric/models/paged_secret_resource_description_list.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class PagedSecretResourceDescriptionList(Model): + """The list of secret resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.SecretResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[SecretResourceDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedSecretResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_secret_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_secret_resource_description_list_py3.py new file mode 100644 index 0000000..6c02124 --- /dev/null +++ b/customSDK/servicefabric/models/paged_secret_resource_description_list_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class PagedSecretResourceDescriptionList(Model): + """The list of secret resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.SecretResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[SecretResourceDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedSecretResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_secret_value_resource_description_list.py b/customSDK/servicefabric/models/paged_secret_value_resource_description_list.py new file mode 100644 index 0000000..927c0fd --- /dev/null +++ b/customSDK/servicefabric/models/paged_secret_value_resource_description_list.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class PagedSecretValueResourceDescriptionList(Model): + """The list of values of a secret resource, paged if the number of results + exceeds the limits of a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in the previous page. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: + list[~azure.servicefabric.models.SecretValueResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[SecretValueResourceDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedSecretValueResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_secret_value_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_secret_value_resource_description_list_py3.py new file mode 100644 index 0000000..683d5a3 --- /dev/null +++ b/customSDK/servicefabric/models/paged_secret_value_resource_description_list_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class PagedSecretValueResourceDescriptionList(Model): + """The list of values of a secret resource, paged if the number of results + exceeds the limits of a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in the previous page. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: + list[~azure.servicefabric.models.SecretValueResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[SecretValueResourceDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedSecretValueResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_service_info_list.py b/customSDK/servicefabric/models/paged_service_info_list.py new file mode 100644 index 0000000..f17b883 --- /dev/null +++ b/customSDK/servicefabric/models/paged_service_info_list.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedServiceInfoList(Model): + """The list of services in the cluster for an application. The list is paged + when all of the results cannot fit in a single message. The next set of + results can be obtained by executing the same query with the continuation + token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of service information. + :type items: list[~azure.servicefabric.models.ServiceInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedServiceInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_service_info_list_py3.py b/customSDK/servicefabric/models/paged_service_info_list_py3.py new file mode 100644 index 0000000..3f8d6c0 --- /dev/null +++ b/customSDK/servicefabric/models/paged_service_info_list_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedServiceInfoList(Model): + """The list of services in the cluster for an application. The list is paged + when all of the results cannot fit in a single message. The next set of + results can be obtained by executing the same query with the continuation + token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of service information. + :type items: list[~azure.servicefabric.models.ServiceInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedServiceInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_service_partition_info_list.py b/customSDK/servicefabric/models/paged_service_partition_info_list.py new file mode 100644 index 0000000..8cf85e2 --- /dev/null +++ b/customSDK/servicefabric/models/paged_service_partition_info_list.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedServicePartitionInfoList(Model): + """The list of partition in the cluster for a service. The list is paged when + all of the results cannot fit in a single message. The next set of results + can be obtained by executing the same query with the continuation token + provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of service partition information. + :type items: list[~azure.servicefabric.models.ServicePartitionInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServicePartitionInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedServicePartitionInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_service_partition_info_list_py3.py b/customSDK/servicefabric/models/paged_service_partition_info_list_py3.py new file mode 100644 index 0000000..58d90e9 --- /dev/null +++ b/customSDK/servicefabric/models/paged_service_partition_info_list_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedServicePartitionInfoList(Model): + """The list of partition in the cluster for a service. The list is paged when + all of the results cannot fit in a single message. The next set of results + can be obtained by executing the same query with the continuation token + provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of service partition information. + :type items: list[~azure.servicefabric.models.ServicePartitionInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServicePartitionInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedServicePartitionInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_service_replica_description_list.py b/customSDK/servicefabric/models/paged_service_replica_description_list.py new file mode 100644 index 0000000..94956f0 --- /dev/null +++ b/customSDK/servicefabric/models/paged_service_replica_description_list.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedServiceReplicaDescriptionList(Model): + """The list of service resource replicas in the cluster. The list is paged + when all of the results cannot fit in a single message. The next set of + results can be obtained by executing the same query with the continuation + token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of service resource replica description. + :type items: list[~azure.servicefabric.models.ServiceReplicaDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceReplicaDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedServiceReplicaDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_service_replica_description_list_py3.py b/customSDK/servicefabric/models/paged_service_replica_description_list_py3.py new file mode 100644 index 0000000..ad77f53 --- /dev/null +++ b/customSDK/servicefabric/models/paged_service_replica_description_list_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedServiceReplicaDescriptionList(Model): + """The list of service resource replicas in the cluster. The list is paged + when all of the results cannot fit in a single message. The next set of + results can be obtained by executing the same query with the continuation + token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of service resource replica description. + :type items: list[~azure.servicefabric.models.ServiceReplicaDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceReplicaDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedServiceReplicaDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_service_resource_description_list.py b/customSDK/servicefabric/models/paged_service_resource_description_list.py new file mode 100644 index 0000000..76591cd --- /dev/null +++ b/customSDK/servicefabric/models/paged_service_resource_description_list.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class PagedServiceResourceDescriptionList(Model): + """The list of service resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.ServiceResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceResourceDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedServiceResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_service_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_service_resource_description_list_py3.py new file mode 100644 index 0000000..0d17ddb --- /dev/null +++ b/customSDK/servicefabric/models/paged_service_resource_description_list_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class PagedServiceResourceDescriptionList(Model): + """The list of service resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.ServiceResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceResourceDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedServiceResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_sub_name_info_list.py b/customSDK/servicefabric/models/paged_sub_name_info_list.py new file mode 100644 index 0000000..50d6d0d --- /dev/null +++ b/customSDK/servicefabric/models/paged_sub_name_info_list.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class PagedSubNameInfoList(Model): + """A paged list of Service Fabric names. The list is paged when all of the + results cannot fit in a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param is_consistent: Indicates whether any name under the given name has + been modified during the enumeration. If there was a modification, this + property value is false. + :type is_consistent: bool + :param sub_names: List of the child names. + :type sub_names: list[str] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, + 'sub_names': {'key': 'SubNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(PagedSubNameInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.is_consistent = kwargs.get('is_consistent', None) + self.sub_names = kwargs.get('sub_names', None) diff --git a/customSDK/servicefabric/models/paged_sub_name_info_list_py3.py b/customSDK/servicefabric/models/paged_sub_name_info_list_py3.py new file mode 100644 index 0000000..04b1f66 --- /dev/null +++ b/customSDK/servicefabric/models/paged_sub_name_info_list_py3.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class PagedSubNameInfoList(Model): + """A paged list of Service Fabric names. The list is paged when all of the + results cannot fit in a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param is_consistent: Indicates whether any name under the given name has + been modified during the enumeration. If there was a modification, this + property value is false. + :type is_consistent: bool + :param sub_names: List of the child names. + :type sub_names: list[str] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, + 'sub_names': {'key': 'SubNames', 'type': '[str]'}, + } + + def __init__(self, *, continuation_token: str=None, is_consistent: bool=None, sub_names=None, **kwargs) -> None: + super(PagedSubNameInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.is_consistent = is_consistent + self.sub_names = sub_names diff --git a/customSDK/servicefabric/models/paged_update_partition_load_result_list.py b/customSDK/servicefabric/models/paged_update_partition_load_result_list.py new file mode 100644 index 0000000..1c01c71 --- /dev/null +++ b/customSDK/servicefabric/models/paged_update_partition_load_result_list.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedUpdatePartitionLoadResultList(Model): + """The list of results of the call UpdatePartitionLoad. The list is paged when + all of the results cannot fit in a single message. The next set of results + can be obtained by executing the same query with the continuation token + provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of partition load update information. + :type items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[UpdatePartitionLoadResult]'}, + } + + def __init__(self, **kwargs): + super(PagedUpdatePartitionLoadResultList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_update_partition_load_result_list_py3.py b/customSDK/servicefabric/models/paged_update_partition_load_result_list_py3.py new file mode 100644 index 0000000..bcee772 --- /dev/null +++ b/customSDK/servicefabric/models/paged_update_partition_load_result_list_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class PagedUpdatePartitionLoadResultList(Model): + """The list of results of the call UpdatePartitionLoad. The list is paged when + all of the results cannot fit in a single message. The next set of results + can be obtained by executing the same query with the continuation token + provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of partition load update information. + :type items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[UpdatePartitionLoadResult]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedUpdatePartitionLoadResultList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_volume_resource_description_list.py b/customSDK/servicefabric/models/paged_volume_resource_description_list.py new file mode 100644 index 0000000..96f1ac5 --- /dev/null +++ b/customSDK/servicefabric/models/paged_volume_resource_description_list.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class PagedVolumeResourceDescriptionList(Model): + """The list of volume resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.VolumeResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[VolumeResourceDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedVolumeResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_volume_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_volume_resource_description_list_py3.py new file mode 100644 index 0000000..a72a818 --- /dev/null +++ b/customSDK/servicefabric/models/paged_volume_resource_description_list_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class PagedVolumeResourceDescriptionList(Model): + """The list of volume resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.VolumeResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[VolumeResourceDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedVolumeResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/partition_analysis_event.py b/customSDK/servicefabric/models/partition_analysis_event.py new file mode 100644 index 0000000..1bd12ae --- /dev/null +++ b/customSDK/servicefabric/models/partition_analysis_event.py @@ -0,0 +1,70 @@ +# 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 .partition_event import PartitionEvent + + +class PartitionAnalysisEvent(PartitionEvent): + """Represents the base for all Partition Analysis Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionPrimaryMoveAnalysisEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param metadata: Required. Metadata about an Analysis Event. + :type metadata: ~azure.servicefabric.models.AnalysisEventMetadata + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'metadata': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, + } + + _subtype_map = { + 'kind': {'PartitionPrimaryMoveAnalysis': 'PartitionPrimaryMoveAnalysisEvent'} + } + + def __init__(self, **kwargs): + super(PartitionAnalysisEvent, self).__init__(**kwargs) + self.metadata = kwargs.get('metadata', None) + self.kind = 'PartitionAnalysisEvent' diff --git a/customSDK/servicefabric/models/partition_analysis_event_py3.py b/customSDK/servicefabric/models/partition_analysis_event_py3.py new file mode 100644 index 0000000..b864bde --- /dev/null +++ b/customSDK/servicefabric/models/partition_analysis_event_py3.py @@ -0,0 +1,70 @@ +# 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 .partition_event_py3 import PartitionEvent + + +class PartitionAnalysisEvent(PartitionEvent): + """Represents the base for all Partition Analysis Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionPrimaryMoveAnalysisEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param metadata: Required. Metadata about an Analysis Event. + :type metadata: ~azure.servicefabric.models.AnalysisEventMetadata + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'metadata': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, + } + + _subtype_map = { + 'kind': {'PartitionPrimaryMoveAnalysis': 'PartitionPrimaryMoveAnalysisEvent'} + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, metadata, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(PartitionAnalysisEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.metadata = metadata + self.kind = 'PartitionAnalysisEvent' diff --git a/customSDK/servicefabric/models/partition_backup_configuration_info.py b/customSDK/servicefabric/models/partition_backup_configuration_info.py new file mode 100644 index 0000000..02b4525 --- /dev/null +++ b/customSDK/servicefabric/models/partition_backup_configuration_info.py @@ -0,0 +1,57 @@ +# 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 .backup_configuration_info import BackupConfigurationInfo + + +class PartitionBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information, for a specific partition, specifying what + backup policy is being applied and suspend description, if any. + + All required parameters must be populated in order to send to Azure. + + :param policy_name: The name of the backup policy which is applicable to + this Service Fabric application or service or partition. + :type policy_name: str + :param policy_inherited_from: Specifies the scope at which the backup + policy is applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type policy_inherited_from: str or + ~azure.servicefabric.models.BackupPolicyScope + :param suspension_info: Describes the backup suspension details. + :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :param kind: Required. Constant filled by server. + :type kind: str + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param partition_id: The partition ID identifying the partition. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartitionBackupConfigurationInfo, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) + self.kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_backup_configuration_info_py3.py b/customSDK/servicefabric/models/partition_backup_configuration_info_py3.py new file mode 100644 index 0000000..0e53df1 --- /dev/null +++ b/customSDK/servicefabric/models/partition_backup_configuration_info_py3.py @@ -0,0 +1,57 @@ +# 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 .backup_configuration_info_py3 import BackupConfigurationInfo + + +class PartitionBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information, for a specific partition, specifying what + backup policy is being applied and suspend description, if any. + + All required parameters must be populated in order to send to Azure. + + :param policy_name: The name of the backup policy which is applicable to + this Service Fabric application or service or partition. + :type policy_name: str + :param policy_inherited_from: Specifies the scope at which the backup + policy is applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type policy_inherited_from: str or + ~azure.servicefabric.models.BackupPolicyScope + :param suspension_info: Describes the backup suspension details. + :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :param kind: Required. Constant filled by server. + :type kind: str + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param partition_id: The partition ID identifying the partition. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, service_name: str=None, partition_id: str=None, **kwargs) -> None: + super(PartitionBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) + self.service_name = service_name + self.partition_id = partition_id + self.kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_backup_entity.py b/customSDK/servicefabric/models/partition_backup_entity.py new file mode 100644 index 0000000..0c82327 --- /dev/null +++ b/customSDK/servicefabric/models/partition_backup_entity.py @@ -0,0 +1,43 @@ +# 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 .backup_entity import BackupEntity + + +class PartitionBackupEntity(BackupEntity): + """Identifies the Service Fabric stateful partition which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :param entity_kind: Required. Constant filled by server. + :type entity_kind: str + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param partition_id: The partition ID identifying the partition. + :type partition_id: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartitionBackupEntity, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) + self.entity_kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_backup_entity_py3.py b/customSDK/servicefabric/models/partition_backup_entity_py3.py new file mode 100644 index 0000000..2cfa5dd --- /dev/null +++ b/customSDK/servicefabric/models/partition_backup_entity_py3.py @@ -0,0 +1,43 @@ +# 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 .backup_entity_py3 import BackupEntity + + +class PartitionBackupEntity(BackupEntity): + """Identifies the Service Fabric stateful partition which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :param entity_kind: Required. Constant filled by server. + :type entity_kind: str + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param partition_id: The partition ID identifying the partition. + :type partition_id: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, service_name: str=None, partition_id: str=None, **kwargs) -> None: + super(PartitionBackupEntity, self).__init__(**kwargs) + self.service_name = service_name + self.partition_id = partition_id + self.entity_kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_data_loss_progress.py b/customSDK/servicefabric/models/partition_data_loss_progress.py new file mode 100644 index 0000000..60ca36a --- /dev/null +++ b/customSDK/servicefabric/models/partition_data_loss_progress.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class PartitionDataLossProgress(Model): + """Information about a partition data loss user-induced operation. + + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param invoke_data_loss_result: Represents information about an operation + in a terminal state (Completed or Faulted). + :type invoke_data_loss_result: + ~azure.servicefabric.models.InvokeDataLossResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'invoke_data_loss_result': {'key': 'InvokeDataLossResult', 'type': 'InvokeDataLossResult'}, + } + + def __init__(self, **kwargs): + super(PartitionDataLossProgress, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.invoke_data_loss_result = kwargs.get('invoke_data_loss_result', None) diff --git a/customSDK/servicefabric/models/partition_data_loss_progress_py3.py b/customSDK/servicefabric/models/partition_data_loss_progress_py3.py new file mode 100644 index 0000000..fa61ba3 --- /dev/null +++ b/customSDK/servicefabric/models/partition_data_loss_progress_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class PartitionDataLossProgress(Model): + """Information about a partition data loss user-induced operation. + + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param invoke_data_loss_result: Represents information about an operation + in a terminal state (Completed or Faulted). + :type invoke_data_loss_result: + ~azure.servicefabric.models.InvokeDataLossResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'invoke_data_loss_result': {'key': 'InvokeDataLossResult', 'type': 'InvokeDataLossResult'}, + } + + def __init__(self, *, state=None, invoke_data_loss_result=None, **kwargs) -> None: + super(PartitionDataLossProgress, self).__init__(**kwargs) + self.state = state + self.invoke_data_loss_result = invoke_data_loss_result diff --git a/customSDK/servicefabric/models/partition_event.py b/customSDK/servicefabric/models/partition_event.py new file mode 100644 index 0000000..9ab8f5e --- /dev/null +++ b/customSDK/servicefabric/models/partition_event.py @@ -0,0 +1,69 @@ +# 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 .fabric_event import FabricEvent + + +class PartitionEvent(FabricEvent): + """Represents the base for all Partition Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionAnalysisEvent, PartitionNewHealthReportEvent, + PartitionHealthReportExpiredEvent, PartitionReconfiguredEvent, + ChaosPartitionSecondaryMoveScheduledEvent, + ChaosPartitionPrimaryMoveScheduledEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'PartitionAnalysisEvent': 'PartitionAnalysisEvent', 'PartitionNewHealthReport': 'PartitionNewHealthReportEvent', 'PartitionHealthReportExpired': 'PartitionHealthReportExpiredEvent', 'PartitionReconfigured': 'PartitionReconfiguredEvent', 'ChaosPartitionSecondaryMoveScheduled': 'ChaosPartitionSecondaryMoveScheduledEvent', 'ChaosPartitionPrimaryMoveScheduled': 'ChaosPartitionPrimaryMoveScheduledEvent'} + } + + def __init__(self, **kwargs): + super(PartitionEvent, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.kind = 'PartitionEvent' diff --git a/customSDK/servicefabric/models/partition_event_py3.py b/customSDK/servicefabric/models/partition_event_py3.py new file mode 100644 index 0000000..dc3cdd9 --- /dev/null +++ b/customSDK/servicefabric/models/partition_event_py3.py @@ -0,0 +1,69 @@ +# 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 .fabric_event_py3 import FabricEvent + + +class PartitionEvent(FabricEvent): + """Represents the base for all Partition Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionAnalysisEvent, PartitionNewHealthReportEvent, + PartitionHealthReportExpiredEvent, PartitionReconfiguredEvent, + ChaosPartitionSecondaryMoveScheduledEvent, + ChaosPartitionPrimaryMoveScheduledEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'PartitionAnalysisEvent': 'PartitionAnalysisEvent', 'PartitionNewHealthReport': 'PartitionNewHealthReportEvent', 'PartitionHealthReportExpired': 'PartitionHealthReportExpiredEvent', 'PartitionReconfigured': 'PartitionReconfiguredEvent', 'ChaosPartitionSecondaryMoveScheduled': 'ChaosPartitionSecondaryMoveScheduledEvent', 'ChaosPartitionPrimaryMoveScheduled': 'ChaosPartitionPrimaryMoveScheduledEvent'} + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(PartitionEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.partition_id = partition_id + self.kind = 'PartitionEvent' diff --git a/customSDK/servicefabric/models/partition_health.py b/customSDK/servicefabric/models/partition_health.py new file mode 100644 index 0000000..cc54da8 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health.py @@ -0,0 +1,56 @@ +# 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 .entity_health import EntityHealth + + +class PartitionHealth(EntityHealth): + """Information about the health of a Service Fabric partition. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param partition_id: ID of the partition whose health information is + described by this object. + :type partition_id: str + :param replica_health_states: The list of replica health states associated + with the partition. + :type replica_health_states: + list[~azure.servicefabric.models.ReplicaHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_health_states': {'key': 'ReplicaHealthStates', 'type': '[ReplicaHealthState]'}, + } + + def __init__(self, **kwargs): + super(PartitionHealth, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.replica_health_states = kwargs.get('replica_health_states', None) diff --git a/customSDK/servicefabric/models/partition_health_evaluation.py b/customSDK/servicefabric/models/partition_health_evaluation.py new file mode 100644 index 0000000..1246219 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_evaluation.py @@ -0,0 +1,61 @@ +# 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 .health_evaluation import HealthEvaluation + + +class PartitionHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a partition, containing information about + the data and the algorithm used by health store to evaluate health. The + evaluation is returned only when the aggregated health state is either + Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition whose health evaluation is + described by this object. + :type partition_id: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the partition. The types of the + unhealthy evaluations can be ReplicasHealthEvaluation or + EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(PartitionHealthEvaluation, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_health_evaluation_py3.py b/customSDK/servicefabric/models/partition_health_evaluation_py3.py new file mode 100644 index 0000000..cece0bf --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_evaluation_py3.py @@ -0,0 +1,61 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class PartitionHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a partition, containing information about + the data and the algorithm used by health store to evaluate health. The + evaluation is returned only when the aggregated health state is either + Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition whose health evaluation is + described by this object. + :type partition_id: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the partition. The types of the + unhealthy evaluations can be ReplicasHealthEvaluation or + EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, partition_id: str=None, unhealthy_evaluations=None, **kwargs) -> None: + super(PartitionHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.partition_id = partition_id + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_health_py3.py b/customSDK/servicefabric/models/partition_health_py3.py new file mode 100644 index 0000000..8e8e37e --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_py3.py @@ -0,0 +1,56 @@ +# 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 .entity_health_py3 import EntityHealth + + +class PartitionHealth(EntityHealth): + """Information about the health of a Service Fabric partition. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param partition_id: ID of the partition whose health information is + described by this object. + :type partition_id: str + :param replica_health_states: The list of replica health states associated + with the partition. + :type replica_health_states: + list[~azure.servicefabric.models.ReplicaHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_health_states': {'key': 'ReplicaHealthStates', 'type': '[ReplicaHealthState]'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, replica_health_states=None, **kwargs) -> None: + super(PartitionHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.partition_id = partition_id + self.replica_health_states = replica_health_states diff --git a/customSDK/servicefabric/models/partition_health_report_expired_event.py b/customSDK/servicefabric/models/partition_health_report_expired_event.py new file mode 100644 index 0000000..3f6144e --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_report_expired_event.py @@ -0,0 +1,99 @@ +# 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 .partition_event import PartitionEvent + + +class PartitionHealthReportExpiredEvent(PartitionEvent): + """Partition Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(PartitionHealthReportExpiredEvent, self).__init__(**kwargs) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'PartitionHealthReportExpired' diff --git a/customSDK/servicefabric/models/partition_health_report_expired_event_py3.py b/customSDK/servicefabric/models/partition_health_report_expired_event_py3.py new file mode 100644 index 0000000..69430a9 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_report_expired_event_py3.py @@ -0,0 +1,99 @@ +# 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 .partition_event_py3 import PartitionEvent + + +class PartitionHealthReportExpiredEvent(PartitionEvent): + """Partition Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(PartitionHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'PartitionHealthReportExpired' diff --git a/customSDK/servicefabric/models/partition_health_state.py b/customSDK/servicefabric/models/partition_health_state.py new file mode 100644 index 0000000..37f49a7 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_state.py @@ -0,0 +1,37 @@ +# 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 .entity_health_state import EntityHealthState + + +class PartitionHealthState(EntityHealthState): + """Represents the health state of a partition, which contains the partition + identifier and its aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param partition_id: Id of the partition whose health state is described + by this object. + :type partition_id: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartitionHealthState, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) diff --git a/customSDK/servicefabric/models/partition_health_state_chunk.py b/customSDK/servicefabric/models/partition_health_state_chunk.py new file mode 100644 index 0000000..fe8fc51 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_state_chunk.py @@ -0,0 +1,42 @@ +# 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 .entity_health_state_chunk import EntityHealthStateChunk + + +class PartitionHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a partition, which contains the + partition ID, its aggregated health state and any replicas that respect the + filters in the cluster health chunk query description. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param partition_id: The Id of the partition. + :type partition_id: str + :param replica_health_state_chunks: The list of replica health state + chunks belonging to the partition that respect the filters in the cluster + health chunk query description. + :type replica_health_state_chunks: + ~azure.servicefabric.models.ReplicaHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_health_state_chunks': {'key': 'ReplicaHealthStateChunks', 'type': 'ReplicaHealthStateChunkList'}, + } + + def __init__(self, **kwargs): + super(PartitionHealthStateChunk, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.replica_health_state_chunks = kwargs.get('replica_health_state_chunks', None) diff --git a/customSDK/servicefabric/models/partition_health_state_chunk_list.py b/customSDK/servicefabric/models/partition_health_state_chunk_list.py new file mode 100644 index 0000000..7d11f66 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_state_chunk_list.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class PartitionHealthStateChunkList(Model): + """The list of partition health state chunks that respect the input filters in + the chunk query description. + Returned by get cluster health state chunks query as part of the parent + application hierarchy. + + :param items: The list of partition health state chunks that respect the + input filters in the chunk query. + :type items: list[~azure.servicefabric.models.PartitionHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[PartitionHealthStateChunk]'}, + } + + def __init__(self, **kwargs): + super(PartitionHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/partition_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/partition_health_state_chunk_list_py3.py new file mode 100644 index 0000000..163b94d --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_state_chunk_list_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class PartitionHealthStateChunkList(Model): + """The list of partition health state chunks that respect the input filters in + the chunk query description. + Returned by get cluster health state chunks query as part of the parent + application hierarchy. + + :param items: The list of partition health state chunks that respect the + input filters in the chunk query. + :type items: list[~azure.servicefabric.models.PartitionHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[PartitionHealthStateChunk]'}, + } + + def __init__(self, *, items=None, **kwargs) -> None: + super(PartitionHealthStateChunkList, self).__init__(**kwargs) + self.items = items diff --git a/customSDK/servicefabric/models/partition_health_state_chunk_py3.py b/customSDK/servicefabric/models/partition_health_state_chunk_py3.py new file mode 100644 index 0000000..52ec8ea --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_state_chunk_py3.py @@ -0,0 +1,42 @@ +# 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 .entity_health_state_chunk_py3 import EntityHealthStateChunk + + +class PartitionHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a partition, which contains the + partition ID, its aggregated health state and any replicas that respect the + filters in the cluster health chunk query description. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param partition_id: The Id of the partition. + :type partition_id: str + :param replica_health_state_chunks: The list of replica health state + chunks belonging to the partition that respect the filters in the cluster + health chunk query description. + :type replica_health_state_chunks: + ~azure.servicefabric.models.ReplicaHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_health_state_chunks': {'key': 'ReplicaHealthStateChunks', 'type': 'ReplicaHealthStateChunkList'}, + } + + def __init__(self, *, health_state=None, partition_id: str=None, replica_health_state_chunks=None, **kwargs) -> None: + super(PartitionHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.partition_id = partition_id + self.replica_health_state_chunks = replica_health_state_chunks diff --git a/customSDK/servicefabric/models/partition_health_state_filter.py b/customSDK/servicefabric/models/partition_health_state_filter.py new file mode 100644 index 0000000..485a6b8 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_state_filter.py @@ -0,0 +1,84 @@ +# 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 msrest.serialization import Model + + +class PartitionHealthStateFilter(Model): + """Defines matching criteria to determine whether a partition should be + included as a child of a service in the cluster health chunk. + The partitions are only returned if the parent entities match a filter + specified in the cluster health chunk query description. The parent service + and application must be included in the cluster health chunk. + One filter can match zero, one or multiple partitions, depending on its + properties. + + :param partition_id_filter: ID of the partition that matches the filter. + The filter is applied only to the specified partition, if it exists. + If the partition doesn't exist, no partition is returned in the cluster + health chunk based on this filter. + If the partition exists, it is included in the cluster health chunk if it + respects the other filter properties. + If not specified, all partitions that match the parent filters (if any) + are taken into consideration and matched against the other filter members, + like health state filter. + :type partition_id_filter: str + :param health_state_filter: The filter for the health state of the + partitions. It allows selecting partitions if they match the desired + health states. + The possible values are integer value of one of the following health + states. Only partitions that match the filter are returned. All partitions + are used to evaluate the cluster aggregated health state. + If not specified, default value is None, unless the partition ID is + specified. If the filter has default value and partition ID is specified, + the matching partition is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches partitions with + HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + :param replica_filters: Defines a list of filters that specify which + replicas to be included in the returned cluster health chunk as children + of the parent partition. The replicas are returned only if the parent + partition matches a filter. + If the list is empty, no replicas are returned. All the replicas are used + to evaluate the parent partition aggregated health state, regardless of + the input filters. + The partition filter may specify multiple replica filters. + For example, it can specify a filter to return all replicas with health + state Error and another filter to always include a replica identified by + its replica id. + :type replica_filters: + list[~azure.servicefabric.models.ReplicaHealthStateFilter] + """ + + _attribute_map = { + 'partition_id_filter': {'key': 'PartitionIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'replica_filters': {'key': 'ReplicaFilters', 'type': '[ReplicaHealthStateFilter]'}, + } + + def __init__(self, **kwargs): + super(PartitionHealthStateFilter, self).__init__(**kwargs) + self.partition_id_filter = kwargs.get('partition_id_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) + self.replica_filters = kwargs.get('replica_filters', None) diff --git a/customSDK/servicefabric/models/partition_health_state_filter_py3.py b/customSDK/servicefabric/models/partition_health_state_filter_py3.py new file mode 100644 index 0000000..f4e22e0 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_state_filter_py3.py @@ -0,0 +1,84 @@ +# 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 msrest.serialization import Model + + +class PartitionHealthStateFilter(Model): + """Defines matching criteria to determine whether a partition should be + included as a child of a service in the cluster health chunk. + The partitions are only returned if the parent entities match a filter + specified in the cluster health chunk query description. The parent service + and application must be included in the cluster health chunk. + One filter can match zero, one or multiple partitions, depending on its + properties. + + :param partition_id_filter: ID of the partition that matches the filter. + The filter is applied only to the specified partition, if it exists. + If the partition doesn't exist, no partition is returned in the cluster + health chunk based on this filter. + If the partition exists, it is included in the cluster health chunk if it + respects the other filter properties. + If not specified, all partitions that match the parent filters (if any) + are taken into consideration and matched against the other filter members, + like health state filter. + :type partition_id_filter: str + :param health_state_filter: The filter for the health state of the + partitions. It allows selecting partitions if they match the desired + health states. + The possible values are integer value of one of the following health + states. Only partitions that match the filter are returned. All partitions + are used to evaluate the cluster aggregated health state. + If not specified, default value is None, unless the partition ID is + specified. If the filter has default value and partition ID is specified, + the matching partition is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches partitions with + HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + :param replica_filters: Defines a list of filters that specify which + replicas to be included in the returned cluster health chunk as children + of the parent partition. The replicas are returned only if the parent + partition matches a filter. + If the list is empty, no replicas are returned. All the replicas are used + to evaluate the parent partition aggregated health state, regardless of + the input filters. + The partition filter may specify multiple replica filters. + For example, it can specify a filter to return all replicas with health + state Error and another filter to always include a replica identified by + its replica id. + :type replica_filters: + list[~azure.servicefabric.models.ReplicaHealthStateFilter] + """ + + _attribute_map = { + 'partition_id_filter': {'key': 'PartitionIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'replica_filters': {'key': 'ReplicaFilters', 'type': '[ReplicaHealthStateFilter]'}, + } + + def __init__(self, *, partition_id_filter: str=None, health_state_filter: int=0, replica_filters=None, **kwargs) -> None: + super(PartitionHealthStateFilter, self).__init__(**kwargs) + self.partition_id_filter = partition_id_filter + self.health_state_filter = health_state_filter + self.replica_filters = replica_filters diff --git a/customSDK/servicefabric/models/partition_health_state_py3.py b/customSDK/servicefabric/models/partition_health_state_py3.py new file mode 100644 index 0000000..7da6a83 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_state_py3.py @@ -0,0 +1,37 @@ +# 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 .entity_health_state_py3 import EntityHealthState + + +class PartitionHealthState(EntityHealthState): + """Represents the health state of a partition, which contains the partition + identifier and its aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param partition_id: Id of the partition whose health state is described + by this object. + :type partition_id: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, partition_id: str=None, **kwargs) -> None: + super(PartitionHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.partition_id = partition_id diff --git a/customSDK/servicefabric/models/partition_information.py b/customSDK/servicefabric/models/partition_information.py new file mode 100644 index 0000000..cbbeef9 --- /dev/null +++ b/customSDK/servicefabric/models/partition_information.py @@ -0,0 +1,51 @@ +# 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 msrest.serialization import Model + + +class PartitionInformation(Model): + """Information about the partition identity, partitioning scheme and keys + supported by it. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Int64RangePartitionInformation, NamedPartitionInformation, + SingletonPartitionInformation + + All required parameters must be populated in order to send to Azure. + + :param id: An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. + The partition ID is unique and does not change for the lifetime of the + service. If the same service was deleted and recreated the IDs of its + partitions would be different. + :type id: str + :param service_partition_kind: Required. Constant filled by server. + :type service_partition_kind: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_partition_kind': {'Int64Range': 'Int64RangePartitionInformation', 'Named': 'NamedPartitionInformation', 'Singleton': 'SingletonPartitionInformation'} + } + + def __init__(self, **kwargs): + super(PartitionInformation, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.service_partition_kind = None diff --git a/customSDK/servicefabric/models/partition_information_py3.py b/customSDK/servicefabric/models/partition_information_py3.py new file mode 100644 index 0000000..acbc354 --- /dev/null +++ b/customSDK/servicefabric/models/partition_information_py3.py @@ -0,0 +1,51 @@ +# 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 msrest.serialization import Model + + +class PartitionInformation(Model): + """Information about the partition identity, partitioning scheme and keys + supported by it. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Int64RangePartitionInformation, NamedPartitionInformation, + SingletonPartitionInformation + + All required parameters must be populated in order to send to Azure. + + :param id: An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. + The partition ID is unique and does not change for the lifetime of the + service. If the same service was deleted and recreated the IDs of its + partitions would be different. + :type id: str + :param service_partition_kind: Required. Constant filled by server. + :type service_partition_kind: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_partition_kind': {'Int64Range': 'Int64RangePartitionInformation', 'Named': 'NamedPartitionInformation', 'Singleton': 'SingletonPartitionInformation'} + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(PartitionInformation, self).__init__(**kwargs) + self.id = id + self.service_partition_kind = None diff --git a/customSDK/servicefabric/models/partition_instance_count_scale_mechanism.py b/customSDK/servicefabric/models/partition_instance_count_scale_mechanism.py new file mode 100644 index 0000000..7c0b1a8 --- /dev/null +++ b/customSDK/servicefabric/models/partition_instance_count_scale_mechanism.py @@ -0,0 +1,53 @@ +# 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 .scaling_mechanism_description import ScalingMechanismDescription + + +class PartitionInstanceCountScaleMechanism(ScalingMechanismDescription): + """Represents a scaling mechanism for adding or removing instances of + stateless service partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param min_instance_count: Required. Minimum number of instances of the + partition. + :type min_instance_count: int + :param max_instance_count: Required. Maximum number of instances of the + partition. + :type max_instance_count: int + :param scale_increment: Required. The number of instances to add or remove + during a scaling operation. + :type scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_instance_count': {'required': True}, + 'max_instance_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'max_instance_count': {'key': 'MaxInstanceCount', 'type': 'int'}, + 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(PartitionInstanceCountScaleMechanism, self).__init__(**kwargs) + self.min_instance_count = kwargs.get('min_instance_count', None) + self.max_instance_count = kwargs.get('max_instance_count', None) + self.scale_increment = kwargs.get('scale_increment', None) + self.kind = 'PartitionInstanceCount' diff --git a/customSDK/servicefabric/models/partition_instance_count_scale_mechanism_py3.py b/customSDK/servicefabric/models/partition_instance_count_scale_mechanism_py3.py new file mode 100644 index 0000000..de580ae --- /dev/null +++ b/customSDK/servicefabric/models/partition_instance_count_scale_mechanism_py3.py @@ -0,0 +1,53 @@ +# 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 .scaling_mechanism_description_py3 import ScalingMechanismDescription + + +class PartitionInstanceCountScaleMechanism(ScalingMechanismDescription): + """Represents a scaling mechanism for adding or removing instances of + stateless service partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param min_instance_count: Required. Minimum number of instances of the + partition. + :type min_instance_count: int + :param max_instance_count: Required. Maximum number of instances of the + partition. + :type max_instance_count: int + :param scale_increment: Required. The number of instances to add or remove + during a scaling operation. + :type scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_instance_count': {'required': True}, + 'max_instance_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'max_instance_count': {'key': 'MaxInstanceCount', 'type': 'int'}, + 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, + } + + def __init__(self, *, min_instance_count: int, max_instance_count: int, scale_increment: int, **kwargs) -> None: + super(PartitionInstanceCountScaleMechanism, self).__init__(**kwargs) + self.min_instance_count = min_instance_count + self.max_instance_count = max_instance_count + self.scale_increment = scale_increment + self.kind = 'PartitionInstanceCount' diff --git a/customSDK/servicefabric/models/partition_load_information.py b/customSDK/servicefabric/models/partition_load_information.py new file mode 100644 index 0000000..4991fda --- /dev/null +++ b/customSDK/servicefabric/models/partition_load_information.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class PartitionLoadInformation(Model): + """Represents load information for a partition, which contains the primary and + secondary reported load metrics. + In case there is no load reported, PartitionLoadInformation will contain + the default load for the service of the partition. + For default loads, LoadMetricReport's LastReportedUtc is set to 0. + + :param partition_id: Id of the partition. + :type partition_id: str + :param primary_load_metric_reports: Array of load reports from the primary + replica for this partition. + :type primary_load_metric_reports: + list[~azure.servicefabric.models.LoadMetricReport] + :param secondary_load_metric_reports: Array of aggregated load reports + from all secondary replicas for this partition. + Array only contains the latest reported load for each metric. + :type secondary_load_metric_reports: + list[~azure.servicefabric.models.LoadMetricReport] + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'primary_load_metric_reports': {'key': 'PrimaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + 'secondary_load_metric_reports': {'key': 'SecondaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + } + + def __init__(self, **kwargs): + super(PartitionLoadInformation, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.primary_load_metric_reports = kwargs.get('primary_load_metric_reports', None) + self.secondary_load_metric_reports = kwargs.get('secondary_load_metric_reports', None) diff --git a/customSDK/servicefabric/models/partition_load_information_py3.py b/customSDK/servicefabric/models/partition_load_information_py3.py new file mode 100644 index 0000000..fabcd88 --- /dev/null +++ b/customSDK/servicefabric/models/partition_load_information_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class PartitionLoadInformation(Model): + """Represents load information for a partition, which contains the primary and + secondary reported load metrics. + In case there is no load reported, PartitionLoadInformation will contain + the default load for the service of the partition. + For default loads, LoadMetricReport's LastReportedUtc is set to 0. + + :param partition_id: Id of the partition. + :type partition_id: str + :param primary_load_metric_reports: Array of load reports from the primary + replica for this partition. + :type primary_load_metric_reports: + list[~azure.servicefabric.models.LoadMetricReport] + :param secondary_load_metric_reports: Array of aggregated load reports + from all secondary replicas for this partition. + Array only contains the latest reported load for each metric. + :type secondary_load_metric_reports: + list[~azure.servicefabric.models.LoadMetricReport] + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'primary_load_metric_reports': {'key': 'PrimaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + 'secondary_load_metric_reports': {'key': 'SecondaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + } + + def __init__(self, *, partition_id: str=None, primary_load_metric_reports=None, secondary_load_metric_reports=None, **kwargs) -> None: + super(PartitionLoadInformation, self).__init__(**kwargs) + self.partition_id = partition_id + self.primary_load_metric_reports = primary_load_metric_reports + self.secondary_load_metric_reports = secondary_load_metric_reports diff --git a/customSDK/servicefabric/models/partition_metric_load_description.py b/customSDK/servicefabric/models/partition_metric_load_description.py new file mode 100644 index 0000000..00c9bd2 --- /dev/null +++ b/customSDK/servicefabric/models/partition_metric_load_description.py @@ -0,0 +1,49 @@ +# 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 msrest.serialization import Model + + +class PartitionMetricLoadDescription(Model): + """Represents load information for a partition, which contains the metrics + load information about primary, all secondary replicas/instances or a + specific secondary replica/instance located on a specific node. + + :param partition_id: Id of the partition. + :type partition_id: str + :param primary_replica_load_entries: Partition's load information for + primary replica, in case partition is from a stateful service. + :type primary_replica_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :param secondary_replicas_or_instances_load_entries: Partition's load + information for all secondary replicas or instances. + :type secondary_replicas_or_instances_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :param secondary_replica_or_instance_load_entries_per_node: Partition's + load information for a specific secondary replica or instance located on a + specific node. + :type secondary_replica_or_instance_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'primary_replica_load_entries': {'key': 'PrimaryReplicaLoadEntries', 'type': '[MetricLoadDescription]'}, + 'secondary_replicas_or_instances_load_entries': {'key': 'SecondaryReplicasOrInstancesLoadEntries', 'type': '[MetricLoadDescription]'}, + 'secondary_replica_or_instance_load_entries_per_node': {'key': 'SecondaryReplicaOrInstanceLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, + } + + def __init__(self, **kwargs): + super(PartitionMetricLoadDescription, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.primary_replica_load_entries = kwargs.get('primary_replica_load_entries', None) + self.secondary_replicas_or_instances_load_entries = kwargs.get('secondary_replicas_or_instances_load_entries', None) + self.secondary_replica_or_instance_load_entries_per_node = kwargs.get('secondary_replica_or_instance_load_entries_per_node', None) diff --git a/customSDK/servicefabric/models/partition_metric_load_description_py3.py b/customSDK/servicefabric/models/partition_metric_load_description_py3.py new file mode 100644 index 0000000..10536df --- /dev/null +++ b/customSDK/servicefabric/models/partition_metric_load_description_py3.py @@ -0,0 +1,49 @@ +# 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 msrest.serialization import Model + + +class PartitionMetricLoadDescription(Model): + """Represents load information for a partition, which contains the metrics + load information about primary, all secondary replicas/instances or a + specific secondary replica/instance located on a specific node. + + :param partition_id: Id of the partition. + :type partition_id: str + :param primary_replica_load_entries: Partition's load information for + primary replica, in case partition is from a stateful service. + :type primary_replica_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :param secondary_replicas_or_instances_load_entries: Partition's load + information for all secondary replicas or instances. + :type secondary_replicas_or_instances_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :param secondary_replica_or_instance_load_entries_per_node: Partition's + load information for a specific secondary replica or instance located on a + specific node. + :type secondary_replica_or_instance_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'primary_replica_load_entries': {'key': 'PrimaryReplicaLoadEntries', 'type': '[MetricLoadDescription]'}, + 'secondary_replicas_or_instances_load_entries': {'key': 'SecondaryReplicasOrInstancesLoadEntries', 'type': '[MetricLoadDescription]'}, + 'secondary_replica_or_instance_load_entries_per_node': {'key': 'SecondaryReplicaOrInstanceLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, + } + + def __init__(self, *, partition_id: str=None, primary_replica_load_entries=None, secondary_replicas_or_instances_load_entries=None, secondary_replica_or_instance_load_entries_per_node=None, **kwargs) -> None: + super(PartitionMetricLoadDescription, self).__init__(**kwargs) + self.partition_id = partition_id + self.primary_replica_load_entries = primary_replica_load_entries + self.secondary_replicas_or_instances_load_entries = secondary_replicas_or_instances_load_entries + self.secondary_replica_or_instance_load_entries_per_node = secondary_replica_or_instance_load_entries_per_node diff --git a/customSDK/servicefabric/models/partition_new_health_report_event.py b/customSDK/servicefabric/models/partition_new_health_report_event.py new file mode 100644 index 0000000..b51931d --- /dev/null +++ b/customSDK/servicefabric/models/partition_new_health_report_event.py @@ -0,0 +1,99 @@ +# 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 .partition_event import PartitionEvent + + +class PartitionNewHealthReportEvent(PartitionEvent): + """Partition Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(PartitionNewHealthReportEvent, self).__init__(**kwargs) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'PartitionNewHealthReport' diff --git a/customSDK/servicefabric/models/partition_new_health_report_event_py3.py b/customSDK/servicefabric/models/partition_new_health_report_event_py3.py new file mode 100644 index 0000000..e03c92a --- /dev/null +++ b/customSDK/servicefabric/models/partition_new_health_report_event_py3.py @@ -0,0 +1,99 @@ +# 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 .partition_event_py3 import PartitionEvent + + +class PartitionNewHealthReportEvent(PartitionEvent): + """Partition Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(PartitionNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'PartitionNewHealthReport' diff --git a/customSDK/servicefabric/models/partition_primary_move_analysis_event.py b/customSDK/servicefabric/models/partition_primary_move_analysis_event.py new file mode 100644 index 0000000..e6aefeb --- /dev/null +++ b/customSDK/servicefabric/models/partition_primary_move_analysis_event.py @@ -0,0 +1,87 @@ +# 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 .partition_analysis_event import PartitionAnalysisEvent + + +class PartitionPrimaryMoveAnalysisEvent(PartitionAnalysisEvent): + """Partition Primary Move Analysis event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param metadata: Required. Metadata about an Analysis Event. + :type metadata: ~azure.servicefabric.models.AnalysisEventMetadata + :param when_move_completed: Required. Time when the move was completed. + :type when_move_completed: datetime + :param previous_node: Required. The name of a Service Fabric node. + :type previous_node: str + :param current_node: Required. The name of a Service Fabric node. + :type current_node: str + :param move_reason: Required. Move reason. + :type move_reason: str + :param relevant_traces: Required. Relevant traces. + :type relevant_traces: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'metadata': {'required': True}, + 'when_move_completed': {'required': True}, + 'previous_node': {'required': True}, + 'current_node': {'required': True}, + 'move_reason': {'required': True}, + 'relevant_traces': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, + 'when_move_completed': {'key': 'WhenMoveCompleted', 'type': 'iso-8601'}, + 'previous_node': {'key': 'PreviousNode', 'type': 'str'}, + 'current_node': {'key': 'CurrentNode', 'type': 'str'}, + 'move_reason': {'key': 'MoveReason', 'type': 'str'}, + 'relevant_traces': {'key': 'RelevantTraces', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartitionPrimaryMoveAnalysisEvent, self).__init__(**kwargs) + self.when_move_completed = kwargs.get('when_move_completed', None) + self.previous_node = kwargs.get('previous_node', None) + self.current_node = kwargs.get('current_node', None) + self.move_reason = kwargs.get('move_reason', None) + self.relevant_traces = kwargs.get('relevant_traces', None) + self.kind = 'PartitionPrimaryMoveAnalysis' diff --git a/customSDK/servicefabric/models/partition_primary_move_analysis_event_py3.py b/customSDK/servicefabric/models/partition_primary_move_analysis_event_py3.py new file mode 100644 index 0000000..a537c95 --- /dev/null +++ b/customSDK/servicefabric/models/partition_primary_move_analysis_event_py3.py @@ -0,0 +1,87 @@ +# 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 .partition_analysis_event_py3 import PartitionAnalysisEvent + + +class PartitionPrimaryMoveAnalysisEvent(PartitionAnalysisEvent): + """Partition Primary Move Analysis event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param metadata: Required. Metadata about an Analysis Event. + :type metadata: ~azure.servicefabric.models.AnalysisEventMetadata + :param when_move_completed: Required. Time when the move was completed. + :type when_move_completed: datetime + :param previous_node: Required. The name of a Service Fabric node. + :type previous_node: str + :param current_node: Required. The name of a Service Fabric node. + :type current_node: str + :param move_reason: Required. Move reason. + :type move_reason: str + :param relevant_traces: Required. Relevant traces. + :type relevant_traces: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'metadata': {'required': True}, + 'when_move_completed': {'required': True}, + 'previous_node': {'required': True}, + 'current_node': {'required': True}, + 'move_reason': {'required': True}, + 'relevant_traces': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, + 'when_move_completed': {'key': 'WhenMoveCompleted', 'type': 'iso-8601'}, + 'previous_node': {'key': 'PreviousNode', 'type': 'str'}, + 'current_node': {'key': 'CurrentNode', 'type': 'str'}, + 'move_reason': {'key': 'MoveReason', 'type': 'str'}, + 'relevant_traces': {'key': 'RelevantTraces', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, metadata, when_move_completed, previous_node: str, current_node: str, move_reason: str, relevant_traces: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(PartitionPrimaryMoveAnalysisEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, metadata=metadata, **kwargs) + self.when_move_completed = when_move_completed + self.previous_node = previous_node + self.current_node = current_node + self.move_reason = move_reason + self.relevant_traces = relevant_traces + self.kind = 'PartitionPrimaryMoveAnalysis' diff --git a/customSDK/servicefabric/models/partition_quorum_loss_progress.py b/customSDK/servicefabric/models/partition_quorum_loss_progress.py new file mode 100644 index 0000000..f91903f --- /dev/null +++ b/customSDK/servicefabric/models/partition_quorum_loss_progress.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class PartitionQuorumLossProgress(Model): + """Information about a partition quorum loss user-induced operation. + + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param invoke_quorum_loss_result: Represents information about an + operation in a terminal state (Completed or Faulted). + :type invoke_quorum_loss_result: + ~azure.servicefabric.models.InvokeQuorumLossResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'invoke_quorum_loss_result': {'key': 'InvokeQuorumLossResult', 'type': 'InvokeQuorumLossResult'}, + } + + def __init__(self, **kwargs): + super(PartitionQuorumLossProgress, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.invoke_quorum_loss_result = kwargs.get('invoke_quorum_loss_result', None) diff --git a/customSDK/servicefabric/models/partition_quorum_loss_progress_py3.py b/customSDK/servicefabric/models/partition_quorum_loss_progress_py3.py new file mode 100644 index 0000000..ab03e5f --- /dev/null +++ b/customSDK/servicefabric/models/partition_quorum_loss_progress_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class PartitionQuorumLossProgress(Model): + """Information about a partition quorum loss user-induced operation. + + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param invoke_quorum_loss_result: Represents information about an + operation in a terminal state (Completed or Faulted). + :type invoke_quorum_loss_result: + ~azure.servicefabric.models.InvokeQuorumLossResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'invoke_quorum_loss_result': {'key': 'InvokeQuorumLossResult', 'type': 'InvokeQuorumLossResult'}, + } + + def __init__(self, *, state=None, invoke_quorum_loss_result=None, **kwargs) -> None: + super(PartitionQuorumLossProgress, self).__init__(**kwargs) + self.state = state + self.invoke_quorum_loss_result = invoke_quorum_loss_result diff --git a/customSDK/servicefabric/models/partition_reconfigured_event.py b/customSDK/servicefabric/models/partition_reconfigured_event.py new file mode 100644 index 0000000..94dd7ab --- /dev/null +++ b/customSDK/servicefabric/models/partition_reconfigured_event.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 .partition_event import PartitionEvent + + +class PartitionReconfiguredEvent(PartitionEvent): + """Partition Reconfiguration event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: Required. Id of Node instance. + :type node_instance_id: str + :param service_type: Required. Type of Service. + :type service_type: str + :param cc_epoch_data_loss_version: Required. CcEpochDataLoss version. + :type cc_epoch_data_loss_version: long + :param cc_epoch_config_version: Required. CcEpochConfig version. + :type cc_epoch_config_version: long + :param reconfig_type: Required. Type of reconfiguration. + :type reconfig_type: str + :param result: Required. Describes reconfiguration result. + :type result: str + :param phase0_duration_ms: Required. Duration of Phase0 in milli-seconds. + :type phase0_duration_ms: float + :param phase1_duration_ms: Required. Duration of Phase1 in milli-seconds. + :type phase1_duration_ms: float + :param phase2_duration_ms: Required. Duration of Phase2 in milli-seconds. + :type phase2_duration_ms: float + :param phase3_duration_ms: Required. Duration of Phase3 in milli-seconds. + :type phase3_duration_ms: float + :param phase4_duration_ms: Required. Duration of Phase4 in milli-seconds. + :type phase4_duration_ms: float + :param total_duration_ms: Required. Total duration in milli-seconds. + :type total_duration_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'service_type': {'required': True}, + 'cc_epoch_data_loss_version': {'required': True}, + 'cc_epoch_config_version': {'required': True}, + 'reconfig_type': {'required': True}, + 'result': {'required': True}, + 'phase0_duration_ms': {'required': True}, + 'phase1_duration_ms': {'required': True}, + 'phase2_duration_ms': {'required': True}, + 'phase3_duration_ms': {'required': True}, + 'phase4_duration_ms': {'required': True}, + 'total_duration_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + 'service_type': {'key': 'ServiceType', 'type': 'str'}, + 'cc_epoch_data_loss_version': {'key': 'CcEpochDataLossVersion', 'type': 'long'}, + 'cc_epoch_config_version': {'key': 'CcEpochConfigVersion', 'type': 'long'}, + 'reconfig_type': {'key': 'ReconfigType', 'type': 'str'}, + 'result': {'key': 'Result', 'type': 'str'}, + 'phase0_duration_ms': {'key': 'Phase0DurationMs', 'type': 'float'}, + 'phase1_duration_ms': {'key': 'Phase1DurationMs', 'type': 'float'}, + 'phase2_duration_ms': {'key': 'Phase2DurationMs', 'type': 'float'}, + 'phase3_duration_ms': {'key': 'Phase3DurationMs', 'type': 'float'}, + 'phase4_duration_ms': {'key': 'Phase4DurationMs', 'type': 'float'}, + 'total_duration_ms': {'key': 'TotalDurationMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(PartitionReconfiguredEvent, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.node_instance_id = kwargs.get('node_instance_id', None) + self.service_type = kwargs.get('service_type', None) + self.cc_epoch_data_loss_version = kwargs.get('cc_epoch_data_loss_version', None) + self.cc_epoch_config_version = kwargs.get('cc_epoch_config_version', None) + self.reconfig_type = kwargs.get('reconfig_type', None) + self.result = kwargs.get('result', None) + self.phase0_duration_ms = kwargs.get('phase0_duration_ms', None) + self.phase1_duration_ms = kwargs.get('phase1_duration_ms', None) + self.phase2_duration_ms = kwargs.get('phase2_duration_ms', None) + self.phase3_duration_ms = kwargs.get('phase3_duration_ms', None) + self.phase4_duration_ms = kwargs.get('phase4_duration_ms', None) + self.total_duration_ms = kwargs.get('total_duration_ms', None) + self.kind = 'PartitionReconfigured' diff --git a/customSDK/servicefabric/models/partition_reconfigured_event_py3.py b/customSDK/servicefabric/models/partition_reconfigured_event_py3.py new file mode 100644 index 0000000..d414c34 --- /dev/null +++ b/customSDK/servicefabric/models/partition_reconfigured_event_py3.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 .partition_event_py3 import PartitionEvent + + +class PartitionReconfiguredEvent(PartitionEvent): + """Partition Reconfiguration event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: Required. Id of Node instance. + :type node_instance_id: str + :param service_type: Required. Type of Service. + :type service_type: str + :param cc_epoch_data_loss_version: Required. CcEpochDataLoss version. + :type cc_epoch_data_loss_version: long + :param cc_epoch_config_version: Required. CcEpochConfig version. + :type cc_epoch_config_version: long + :param reconfig_type: Required. Type of reconfiguration. + :type reconfig_type: str + :param result: Required. Describes reconfiguration result. + :type result: str + :param phase0_duration_ms: Required. Duration of Phase0 in milli-seconds. + :type phase0_duration_ms: float + :param phase1_duration_ms: Required. Duration of Phase1 in milli-seconds. + :type phase1_duration_ms: float + :param phase2_duration_ms: Required. Duration of Phase2 in milli-seconds. + :type phase2_duration_ms: float + :param phase3_duration_ms: Required. Duration of Phase3 in milli-seconds. + :type phase3_duration_ms: float + :param phase4_duration_ms: Required. Duration of Phase4 in milli-seconds. + :type phase4_duration_ms: float + :param total_duration_ms: Required. Total duration in milli-seconds. + :type total_duration_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'service_type': {'required': True}, + 'cc_epoch_data_loss_version': {'required': True}, + 'cc_epoch_config_version': {'required': True}, + 'reconfig_type': {'required': True}, + 'result': {'required': True}, + 'phase0_duration_ms': {'required': True}, + 'phase1_duration_ms': {'required': True}, + 'phase2_duration_ms': {'required': True}, + 'phase3_duration_ms': {'required': True}, + 'phase4_duration_ms': {'required': True}, + 'total_duration_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + 'service_type': {'key': 'ServiceType', 'type': 'str'}, + 'cc_epoch_data_loss_version': {'key': 'CcEpochDataLossVersion', 'type': 'long'}, + 'cc_epoch_config_version': {'key': 'CcEpochConfigVersion', 'type': 'long'}, + 'reconfig_type': {'key': 'ReconfigType', 'type': 'str'}, + 'result': {'key': 'Result', 'type': 'str'}, + 'phase0_duration_ms': {'key': 'Phase0DurationMs', 'type': 'float'}, + 'phase1_duration_ms': {'key': 'Phase1DurationMs', 'type': 'float'}, + 'phase2_duration_ms': {'key': 'Phase2DurationMs', 'type': 'float'}, + 'phase3_duration_ms': {'key': 'Phase3DurationMs', 'type': 'float'}, + 'phase4_duration_ms': {'key': 'Phase4DurationMs', 'type': 'float'}, + 'total_duration_ms': {'key': 'TotalDurationMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, node_name: str, node_instance_id: str, service_type: str, cc_epoch_data_loss_version: int, cc_epoch_config_version: int, reconfig_type: str, result: str, phase0_duration_ms: float, phase1_duration_ms: float, phase2_duration_ms: float, phase3_duration_ms: float, phase4_duration_ms: float, total_duration_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(PartitionReconfiguredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.node_name = node_name + self.node_instance_id = node_instance_id + self.service_type = service_type + self.cc_epoch_data_loss_version = cc_epoch_data_loss_version + self.cc_epoch_config_version = cc_epoch_config_version + self.reconfig_type = reconfig_type + self.result = result + self.phase0_duration_ms = phase0_duration_ms + self.phase1_duration_ms = phase1_duration_ms + self.phase2_duration_ms = phase2_duration_ms + self.phase3_duration_ms = phase3_duration_ms + self.phase4_duration_ms = phase4_duration_ms + self.total_duration_ms = total_duration_ms + self.kind = 'PartitionReconfigured' diff --git a/customSDK/servicefabric/models/partition_restart_progress.py b/customSDK/servicefabric/models/partition_restart_progress.py new file mode 100644 index 0000000..7526c9e --- /dev/null +++ b/customSDK/servicefabric/models/partition_restart_progress.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class PartitionRestartProgress(Model): + """Information about a partition restart user-induced operation. + + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param restart_partition_result: Represents information about an operation + in a terminal state (Completed or Faulted). + :type restart_partition_result: + ~azure.servicefabric.models.RestartPartitionResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'restart_partition_result': {'key': 'RestartPartitionResult', 'type': 'RestartPartitionResult'}, + } + + def __init__(self, **kwargs): + super(PartitionRestartProgress, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.restart_partition_result = kwargs.get('restart_partition_result', None) diff --git a/customSDK/servicefabric/models/partition_restart_progress_py3.py b/customSDK/servicefabric/models/partition_restart_progress_py3.py new file mode 100644 index 0000000..5d40211 --- /dev/null +++ b/customSDK/servicefabric/models/partition_restart_progress_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class PartitionRestartProgress(Model): + """Information about a partition restart user-induced operation. + + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param restart_partition_result: Represents information about an operation + in a terminal state (Completed or Faulted). + :type restart_partition_result: + ~azure.servicefabric.models.RestartPartitionResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'restart_partition_result': {'key': 'RestartPartitionResult', 'type': 'RestartPartitionResult'}, + } + + def __init__(self, *, state=None, restart_partition_result=None, **kwargs) -> None: + super(PartitionRestartProgress, self).__init__(**kwargs) + self.state = state + self.restart_partition_result = restart_partition_result diff --git a/customSDK/servicefabric/models/partition_safety_check.py b/customSDK/servicefabric/models/partition_safety_check.py new file mode 100644 index 0000000..f3a79a5 --- /dev/null +++ b/customSDK/servicefabric/models/partition_safety_check.py @@ -0,0 +1,50 @@ +# 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 .safety_check import SafetyCheck + + +class PartitionSafetyCheck(SafetyCheck): + """Represents a safety check for the service partition being performed by + service fabric before continuing with operations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EnsureAvailabilitySafetyCheck, + EnsurePartitionQuorumSafetyCheck, WaitForInbuildReplicaSafetyCheck, + WaitForPrimaryPlacementSafetyCheck, WaitForPrimarySwapSafetyCheck, + WaitForReconfigurationSafetyCheck + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'EnsureAvailability': 'EnsureAvailabilitySafetyCheck', 'EnsurePartitionQuorum': 'EnsurePartitionQuorumSafetyCheck', 'WaitForInbuildReplica': 'WaitForInbuildReplicaSafetyCheck', 'WaitForPrimaryPlacement': 'WaitForPrimaryPlacementSafetyCheck', 'WaitForPrimarySwap': 'WaitForPrimarySwapSafetyCheck', 'WaitForReconfiguration': 'WaitForReconfigurationSafetyCheck'} + } + + def __init__(self, **kwargs): + super(PartitionSafetyCheck, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.kind = 'PartitionSafetyCheck' diff --git a/customSDK/servicefabric/models/partition_safety_check_py3.py b/customSDK/servicefabric/models/partition_safety_check_py3.py new file mode 100644 index 0000000..86c54d0 --- /dev/null +++ b/customSDK/servicefabric/models/partition_safety_check_py3.py @@ -0,0 +1,50 @@ +# 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 .safety_check_py3 import SafetyCheck + + +class PartitionSafetyCheck(SafetyCheck): + """Represents a safety check for the service partition being performed by + service fabric before continuing with operations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EnsureAvailabilitySafetyCheck, + EnsurePartitionQuorumSafetyCheck, WaitForInbuildReplicaSafetyCheck, + WaitForPrimaryPlacementSafetyCheck, WaitForPrimarySwapSafetyCheck, + WaitForReconfigurationSafetyCheck + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'EnsureAvailability': 'EnsureAvailabilitySafetyCheck', 'EnsurePartitionQuorum': 'EnsurePartitionQuorumSafetyCheck', 'WaitForInbuildReplica': 'WaitForInbuildReplicaSafetyCheck', 'WaitForPrimaryPlacement': 'WaitForPrimaryPlacementSafetyCheck', 'WaitForPrimarySwap': 'WaitForPrimarySwapSafetyCheck', 'WaitForReconfiguration': 'WaitForReconfigurationSafetyCheck'} + } + + def __init__(self, *, partition_id: str=None, **kwargs) -> None: + super(PartitionSafetyCheck, self).__init__(**kwargs) + self.partition_id = partition_id + self.kind = 'PartitionSafetyCheck' diff --git a/customSDK/servicefabric/models/partition_scheme_description.py b/customSDK/servicefabric/models/partition_scheme_description.py new file mode 100644 index 0000000..205c3d5 --- /dev/null +++ b/customSDK/servicefabric/models/partition_scheme_description.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class PartitionSchemeDescription(Model): + """Describes how the service is partitioned. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NamedPartitionSchemeDescription, + SingletonPartitionSchemeDescription, + UniformInt64RangePartitionSchemeDescription + + All required parameters must be populated in order to send to Azure. + + :param partition_scheme: Required. Constant filled by server. + :type partition_scheme: str + """ + + _validation = { + 'partition_scheme': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + } + + _subtype_map = { + 'partition_scheme': {'Named': 'NamedPartitionSchemeDescription', 'Singleton': 'SingletonPartitionSchemeDescription', 'UniformInt64Range': 'UniformInt64RangePartitionSchemeDescription'} + } + + def __init__(self, **kwargs): + super(PartitionSchemeDescription, self).__init__(**kwargs) + self.partition_scheme = None diff --git a/customSDK/servicefabric/models/partition_scheme_description_py3.py b/customSDK/servicefabric/models/partition_scheme_description_py3.py new file mode 100644 index 0000000..88805c4 --- /dev/null +++ b/customSDK/servicefabric/models/partition_scheme_description_py3.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class PartitionSchemeDescription(Model): + """Describes how the service is partitioned. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NamedPartitionSchemeDescription, + SingletonPartitionSchemeDescription, + UniformInt64RangePartitionSchemeDescription + + All required parameters must be populated in order to send to Azure. + + :param partition_scheme: Required. Constant filled by server. + :type partition_scheme: str + """ + + _validation = { + 'partition_scheme': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + } + + _subtype_map = { + 'partition_scheme': {'Named': 'NamedPartitionSchemeDescription', 'Singleton': 'SingletonPartitionSchemeDescription', 'UniformInt64Range': 'UniformInt64RangePartitionSchemeDescription'} + } + + def __init__(self, **kwargs) -> None: + super(PartitionSchemeDescription, self).__init__(**kwargs) + self.partition_scheme = None diff --git a/customSDK/servicefabric/models/partitions_health_evaluation.py b/customSDK/servicefabric/models/partitions_health_evaluation.py new file mode 100644 index 0000000..2fbf52e --- /dev/null +++ b/customSDK/servicefabric/models/partitions_health_evaluation.py @@ -0,0 +1,66 @@ +# 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 .health_evaluation import HealthEvaluation + + +class PartitionsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for the partitions of a service, containing + health evaluations for each unhealthy partition that impacts current + aggregated health state. Can be returned when evaluating service health and + the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_partitions_per_service: Maximum allowed + percentage of unhealthy partitions per service from the + ServiceTypeHealthPolicy. + :type max_percent_unhealthy_partitions_per_service: int + :param total_count: Total number of partitions of the service from the + health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + PartitionHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(PartitionsHealthEvaluation, self).__init__(**kwargs) + self.max_percent_unhealthy_partitions_per_service = kwargs.get('max_percent_unhealthy_partitions_per_service', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Partitions' diff --git a/customSDK/servicefabric/models/partitions_health_evaluation_py3.py b/customSDK/servicefabric/models/partitions_health_evaluation_py3.py new file mode 100644 index 0000000..012f066 --- /dev/null +++ b/customSDK/servicefabric/models/partitions_health_evaluation_py3.py @@ -0,0 +1,66 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class PartitionsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for the partitions of a service, containing + health evaluations for each unhealthy partition that impacts current + aggregated health state. Can be returned when evaluating service health and + the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_partitions_per_service: Maximum allowed + percentage of unhealthy partitions per service from the + ServiceTypeHealthPolicy. + :type max_percent_unhealthy_partitions_per_service: int + :param total_count: Total number of partitions of the service from the + health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + PartitionHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_partitions_per_service: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(PartitionsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.max_percent_unhealthy_partitions_per_service = max_percent_unhealthy_partitions_per_service + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Partitions' diff --git a/customSDK/servicefabric/models/primary_replicator_status.py b/customSDK/servicefabric/models/primary_replicator_status.py new file mode 100644 index 0000000..eea2a13 --- /dev/null +++ b/customSDK/servicefabric/models/primary_replicator_status.py @@ -0,0 +1,47 @@ +# 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 .replicator_status import ReplicatorStatus + + +class PrimaryReplicatorStatus(ReplicatorStatus): + """Provides statistics about the Service Fabric Replicator, when it is + functioning in a Primary role. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param replication_queue_status: Details about the replication queue on + the primary replicator. + :type replication_queue_status: + ~azure.servicefabric.models.ReplicatorQueueStatus + :param remote_replicators: The status of all the active and idle secondary + replicators that the primary is aware of. + :type remote_replicators: + list[~azure.servicefabric.models.RemoteReplicatorStatus] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'remote_replicators': {'key': 'RemoteReplicators', 'type': '[RemoteReplicatorStatus]'}, + } + + def __init__(self, **kwargs): + super(PrimaryReplicatorStatus, self).__init__(**kwargs) + self.replication_queue_status = kwargs.get('replication_queue_status', None) + self.remote_replicators = kwargs.get('remote_replicators', None) + self.kind = 'Primary' diff --git a/customSDK/servicefabric/models/primary_replicator_status_py3.py b/customSDK/servicefabric/models/primary_replicator_status_py3.py new file mode 100644 index 0000000..cbffe9c --- /dev/null +++ b/customSDK/servicefabric/models/primary_replicator_status_py3.py @@ -0,0 +1,47 @@ +# 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 .replicator_status_py3 import ReplicatorStatus + + +class PrimaryReplicatorStatus(ReplicatorStatus): + """Provides statistics about the Service Fabric Replicator, when it is + functioning in a Primary role. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param replication_queue_status: Details about the replication queue on + the primary replicator. + :type replication_queue_status: + ~azure.servicefabric.models.ReplicatorQueueStatus + :param remote_replicators: The status of all the active and idle secondary + replicators that the primary is aware of. + :type remote_replicators: + list[~azure.servicefabric.models.RemoteReplicatorStatus] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'remote_replicators': {'key': 'RemoteReplicators', 'type': '[RemoteReplicatorStatus]'}, + } + + def __init__(self, *, replication_queue_status=None, remote_replicators=None, **kwargs) -> None: + super(PrimaryReplicatorStatus, self).__init__(**kwargs) + self.replication_queue_status = replication_queue_status + self.remote_replicators = remote_replicators + self.kind = 'Primary' diff --git a/customSDK/servicefabric/models/probe.py b/customSDK/servicefabric/models/probe.py new file mode 100644 index 0000000..f151436 --- /dev/null +++ b/customSDK/servicefabric/models/probe.py @@ -0,0 +1,61 @@ +# 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 msrest.serialization import Model + + +class Probe(Model): + """Probes have a number of fields that you can use to control their behavior. + + :param initial_delay_seconds: The initial delay in seconds to start + executing probe once codepackage has started. Default value: 0 . + :type initial_delay_seconds: int + :param period_seconds: Periodic seconds to execute probe. Default value: + 10 . + :type period_seconds: int + :param timeout_seconds: Period after which probe is considered as failed + if it hasn't completed successfully. Default value: 1 . + :type timeout_seconds: int + :param success_threshold: The count of successful probe executions after + which probe is considered success. Default value: 1 . + :type success_threshold: int + :param failure_threshold: The count of failures after which probe is + considered failed. Default value: 3 . + :type failure_threshold: int + :param exec_property: Exec command to run inside the container. + :type exec_property: ~azure.servicefabric.models.ProbeExec + :param http_get: Http probe for the container. + :type http_get: ~azure.servicefabric.models.ProbeHttpGet + :param tcp_socket: Tcp port to probe inside the container. + :type tcp_socket: ~azure.servicefabric.models.ProbeTcpSocket + """ + + _attribute_map = { + 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, + 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, + 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, + 'exec_property': {'key': 'exec', 'type': 'ProbeExec'}, + 'http_get': {'key': 'httpGet', 'type': 'ProbeHttpGet'}, + 'tcp_socket': {'key': 'tcpSocket', 'type': 'ProbeTcpSocket'}, + } + + def __init__(self, **kwargs): + super(Probe, self).__init__(**kwargs) + self.initial_delay_seconds = kwargs.get('initial_delay_seconds', 0) + self.period_seconds = kwargs.get('period_seconds', 10) + self.timeout_seconds = kwargs.get('timeout_seconds', 1) + self.success_threshold = kwargs.get('success_threshold', 1) + self.failure_threshold = kwargs.get('failure_threshold', 3) + self.exec_property = kwargs.get('exec_property', None) + self.http_get = kwargs.get('http_get', None) + self.tcp_socket = kwargs.get('tcp_socket', None) diff --git a/customSDK/servicefabric/models/probe_exec.py b/customSDK/servicefabric/models/probe_exec.py new file mode 100644 index 0000000..3bd118a --- /dev/null +++ b/customSDK/servicefabric/models/probe_exec.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class ProbeExec(Model): + """Exec command to run inside the container. + + All required parameters must be populated in order to send to Azure. + + :param command: Required. Comma separated command to run inside the + container for example "sh, -c, echo hello world". + :type command: str + """ + + _validation = { + 'command': {'required': True}, + } + + _attribute_map = { + 'command': {'key': 'command', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProbeExec, self).__init__(**kwargs) + self.command = kwargs.get('command', None) diff --git a/customSDK/servicefabric/models/probe_exec_py3.py b/customSDK/servicefabric/models/probe_exec_py3.py new file mode 100644 index 0000000..4e7a9d8 --- /dev/null +++ b/customSDK/servicefabric/models/probe_exec_py3.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class ProbeExec(Model): + """Exec command to run inside the container. + + All required parameters must be populated in order to send to Azure. + + :param command: Required. Comma separated command to run inside the + container for example "sh, -c, echo hello world". + :type command: str + """ + + _validation = { + 'command': {'required': True}, + } + + _attribute_map = { + 'command': {'key': 'command', 'type': 'str'}, + } + + def __init__(self, *, command: str, **kwargs) -> None: + super(ProbeExec, self).__init__(**kwargs) + self.command = command diff --git a/customSDK/servicefabric/models/probe_http_get.py b/customSDK/servicefabric/models/probe_http_get.py new file mode 100644 index 0000000..acc0ef3 --- /dev/null +++ b/customSDK/servicefabric/models/probe_http_get.py @@ -0,0 +1,51 @@ +# 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 msrest.serialization import Model + + +class ProbeHttpGet(Model): + """Http probe for the container. + + All required parameters must be populated in order to send to Azure. + + :param port: Required. Port to access for probe. + :type port: int + :param path: Path to access on the HTTP request. + :type path: str + :param host: Host IP to connect to. + :type host: str + :param http_headers: Headers to set in the request. + :type http_headers: list[~azure.servicefabric.models.ProbeHttpGetHeaders] + :param scheme: Scheme for the http probe. Can be Http or Https. Possible + values include: 'http', 'https' + :type scheme: str or ~azure.servicefabric.models.Scheme + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + 'path': {'key': 'path', 'type': 'str'}, + 'host': {'key': 'host', 'type': 'str'}, + 'http_headers': {'key': 'httpHeaders', 'type': '[ProbeHttpGetHeaders]'}, + 'scheme': {'key': 'scheme', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProbeHttpGet, self).__init__(**kwargs) + self.port = kwargs.get('port', None) + self.path = kwargs.get('path', None) + self.host = kwargs.get('host', None) + self.http_headers = kwargs.get('http_headers', None) + self.scheme = kwargs.get('scheme', None) diff --git a/customSDK/servicefabric/models/probe_http_get_headers.py b/customSDK/servicefabric/models/probe_http_get_headers.py new file mode 100644 index 0000000..9d70540 --- /dev/null +++ b/customSDK/servicefabric/models/probe_http_get_headers.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class ProbeHttpGetHeaders(Model): + """Http headers. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the header. + :type name: str + :param value: Required. The value of the header. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProbeHttpGetHeaders, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/probe_http_get_headers_py3.py b/customSDK/servicefabric/models/probe_http_get_headers_py3.py new file mode 100644 index 0000000..877c9ea --- /dev/null +++ b/customSDK/servicefabric/models/probe_http_get_headers_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class ProbeHttpGetHeaders(Model): + """Http headers. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the header. + :type name: str + :param value: Required. The value of the header. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(ProbeHttpGetHeaders, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/customSDK/servicefabric/models/probe_http_get_py3.py b/customSDK/servicefabric/models/probe_http_get_py3.py new file mode 100644 index 0000000..c304181 --- /dev/null +++ b/customSDK/servicefabric/models/probe_http_get_py3.py @@ -0,0 +1,51 @@ +# 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 msrest.serialization import Model + + +class ProbeHttpGet(Model): + """Http probe for the container. + + All required parameters must be populated in order to send to Azure. + + :param port: Required. Port to access for probe. + :type port: int + :param path: Path to access on the HTTP request. + :type path: str + :param host: Host IP to connect to. + :type host: str + :param http_headers: Headers to set in the request. + :type http_headers: list[~azure.servicefabric.models.ProbeHttpGetHeaders] + :param scheme: Scheme for the http probe. Can be Http or Https. Possible + values include: 'http', 'https' + :type scheme: str or ~azure.servicefabric.models.Scheme + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + 'path': {'key': 'path', 'type': 'str'}, + 'host': {'key': 'host', 'type': 'str'}, + 'http_headers': {'key': 'httpHeaders', 'type': '[ProbeHttpGetHeaders]'}, + 'scheme': {'key': 'scheme', 'type': 'str'}, + } + + def __init__(self, *, port: int, path: str=None, host: str=None, http_headers=None, scheme=None, **kwargs) -> None: + super(ProbeHttpGet, self).__init__(**kwargs) + self.port = port + self.path = path + self.host = host + self.http_headers = http_headers + self.scheme = scheme diff --git a/customSDK/servicefabric/models/probe_py3.py b/customSDK/servicefabric/models/probe_py3.py new file mode 100644 index 0000000..13e5626 --- /dev/null +++ b/customSDK/servicefabric/models/probe_py3.py @@ -0,0 +1,61 @@ +# 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 msrest.serialization import Model + + +class Probe(Model): + """Probes have a number of fields that you can use to control their behavior. + + :param initial_delay_seconds: The initial delay in seconds to start + executing probe once codepackage has started. Default value: 0 . + :type initial_delay_seconds: int + :param period_seconds: Periodic seconds to execute probe. Default value: + 10 . + :type period_seconds: int + :param timeout_seconds: Period after which probe is considered as failed + if it hasn't completed successfully. Default value: 1 . + :type timeout_seconds: int + :param success_threshold: The count of successful probe executions after + which probe is considered success. Default value: 1 . + :type success_threshold: int + :param failure_threshold: The count of failures after which probe is + considered failed. Default value: 3 . + :type failure_threshold: int + :param exec_property: Exec command to run inside the container. + :type exec_property: ~azure.servicefabric.models.ProbeExec + :param http_get: Http probe for the container. + :type http_get: ~azure.servicefabric.models.ProbeHttpGet + :param tcp_socket: Tcp port to probe inside the container. + :type tcp_socket: ~azure.servicefabric.models.ProbeTcpSocket + """ + + _attribute_map = { + 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, + 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, + 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, + 'exec_property': {'key': 'exec', 'type': 'ProbeExec'}, + 'http_get': {'key': 'httpGet', 'type': 'ProbeHttpGet'}, + 'tcp_socket': {'key': 'tcpSocket', 'type': 'ProbeTcpSocket'}, + } + + def __init__(self, *, initial_delay_seconds: int=0, period_seconds: int=10, timeout_seconds: int=1, success_threshold: int=1, failure_threshold: int=3, exec_property=None, http_get=None, tcp_socket=None, **kwargs) -> None: + super(Probe, self).__init__(**kwargs) + self.initial_delay_seconds = initial_delay_seconds + self.period_seconds = period_seconds + self.timeout_seconds = timeout_seconds + self.success_threshold = success_threshold + self.failure_threshold = failure_threshold + self.exec_property = exec_property + self.http_get = http_get + self.tcp_socket = tcp_socket diff --git a/customSDK/servicefabric/models/probe_tcp_socket.py b/customSDK/servicefabric/models/probe_tcp_socket.py new file mode 100644 index 0000000..73259a6 --- /dev/null +++ b/customSDK/servicefabric/models/probe_tcp_socket.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class ProbeTcpSocket(Model): + """Tcp port to probe inside the container. + + All required parameters must be populated in order to send to Azure. + + :param port: Required. Port to access for probe. + :type port: int + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ProbeTcpSocket, self).__init__(**kwargs) + self.port = kwargs.get('port', None) diff --git a/customSDK/servicefabric/models/probe_tcp_socket_py3.py b/customSDK/servicefabric/models/probe_tcp_socket_py3.py new file mode 100644 index 0000000..07e97f8 --- /dev/null +++ b/customSDK/servicefabric/models/probe_tcp_socket_py3.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class ProbeTcpSocket(Model): + """Tcp port to probe inside the container. + + All required parameters must be populated in order to send to Azure. + + :param port: Required. Port to access for probe. + :type port: int + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, *, port: int, **kwargs) -> None: + super(ProbeTcpSocket, self).__init__(**kwargs) + self.port = port diff --git a/customSDK/servicefabric/models/property_batch_description_list.py b/customSDK/servicefabric/models/property_batch_description_list.py new file mode 100644 index 0000000..d3f8aa2 --- /dev/null +++ b/customSDK/servicefabric/models/property_batch_description_list.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class PropertyBatchDescriptionList(Model): + """Describes a list of property batch operations to be executed. Either all or + none of the operations will be committed. + + :param operations: A list of the property batch operations to be executed. + :type operations: list[~azure.servicefabric.models.PropertyBatchOperation] + """ + + _attribute_map = { + 'operations': {'key': 'Operations', 'type': '[PropertyBatchOperation]'}, + } + + def __init__(self, **kwargs): + super(PropertyBatchDescriptionList, self).__init__(**kwargs) + self.operations = kwargs.get('operations', None) diff --git a/customSDK/servicefabric/models/property_batch_description_list_py3.py b/customSDK/servicefabric/models/property_batch_description_list_py3.py new file mode 100644 index 0000000..80a6a22 --- /dev/null +++ b/customSDK/servicefabric/models/property_batch_description_list_py3.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class PropertyBatchDescriptionList(Model): + """Describes a list of property batch operations to be executed. Either all or + none of the operations will be committed. + + :param operations: A list of the property batch operations to be executed. + :type operations: list[~azure.servicefabric.models.PropertyBatchOperation] + """ + + _attribute_map = { + 'operations': {'key': 'Operations', 'type': '[PropertyBatchOperation]'}, + } + + def __init__(self, *, operations=None, **kwargs) -> None: + super(PropertyBatchDescriptionList, self).__init__(**kwargs) + self.operations = operations diff --git a/customSDK/servicefabric/models/property_batch_info.py b/customSDK/servicefabric/models/property_batch_info.py new file mode 100644 index 0000000..cd752c9 --- /dev/null +++ b/customSDK/servicefabric/models/property_batch_info.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class PropertyBatchInfo(Model): + """Information about the results of a property batch. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SuccessfulPropertyBatchInfo, FailedPropertyBatchInfo + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Successful': 'SuccessfulPropertyBatchInfo', 'Failed': 'FailedPropertyBatchInfo'} + } + + def __init__(self, **kwargs): + super(PropertyBatchInfo, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/property_batch_info_py3.py b/customSDK/servicefabric/models/property_batch_info_py3.py new file mode 100644 index 0000000..e11f1fd --- /dev/null +++ b/customSDK/servicefabric/models/property_batch_info_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class PropertyBatchInfo(Model): + """Information about the results of a property batch. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SuccessfulPropertyBatchInfo, FailedPropertyBatchInfo + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Successful': 'SuccessfulPropertyBatchInfo', 'Failed': 'FailedPropertyBatchInfo'} + } + + def __init__(self, **kwargs) -> None: + super(PropertyBatchInfo, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/property_batch_operation.py b/customSDK/servicefabric/models/property_batch_operation.py new file mode 100644 index 0000000..59bd0c2 --- /dev/null +++ b/customSDK/servicefabric/models/property_batch_operation.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class PropertyBatchOperation(Model): + """Represents the base type for property operations that can be put into a + batch and submitted. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CheckExistsPropertyBatchOperation, + CheckSequencePropertyBatchOperation, CheckValuePropertyBatchOperation, + DeletePropertyBatchOperation, GetPropertyBatchOperation, + PutPropertyBatchOperation + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CheckExists': 'CheckExistsPropertyBatchOperation', 'CheckSequence': 'CheckSequencePropertyBatchOperation', 'CheckValue': 'CheckValuePropertyBatchOperation', 'Delete': 'DeletePropertyBatchOperation', 'Get': 'GetPropertyBatchOperation', 'Put': 'PutPropertyBatchOperation'} + } + + def __init__(self, **kwargs): + super(PropertyBatchOperation, self).__init__(**kwargs) + self.property_name = kwargs.get('property_name', None) + self.kind = None diff --git a/customSDK/servicefabric/models/property_batch_operation_py3.py b/customSDK/servicefabric/models/property_batch_operation_py3.py new file mode 100644 index 0000000..de40056 --- /dev/null +++ b/customSDK/servicefabric/models/property_batch_operation_py3.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class PropertyBatchOperation(Model): + """Represents the base type for property operations that can be put into a + batch and submitted. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CheckExistsPropertyBatchOperation, + CheckSequencePropertyBatchOperation, CheckValuePropertyBatchOperation, + DeletePropertyBatchOperation, GetPropertyBatchOperation, + PutPropertyBatchOperation + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CheckExists': 'CheckExistsPropertyBatchOperation', 'CheckSequence': 'CheckSequencePropertyBatchOperation', 'CheckValue': 'CheckValuePropertyBatchOperation', 'Delete': 'DeletePropertyBatchOperation', 'Get': 'GetPropertyBatchOperation', 'Put': 'PutPropertyBatchOperation'} + } + + def __init__(self, *, property_name: str, **kwargs) -> None: + super(PropertyBatchOperation, self).__init__(**kwargs) + self.property_name = property_name + self.kind = None diff --git a/customSDK/servicefabric/models/property_description.py b/customSDK/servicefabric/models/property_description.py new file mode 100644 index 0000000..f94b470 --- /dev/null +++ b/customSDK/servicefabric/models/property_description.py @@ -0,0 +1,44 @@ +# 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 msrest.serialization import Model + + +class PropertyDescription(Model): + """Description of a Service Fabric property. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param custom_type_id: The property's custom type ID. Using this property, + the user is able to tag the type of the value of the property. + :type custom_type_id: str + :param value: Required. Describes a Service Fabric property value. + :type value: ~azure.servicefabric.models.PropertyValue + """ + + _validation = { + 'property_name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + } + + def __init__(self, **kwargs): + super(PropertyDescription, self).__init__(**kwargs) + self.property_name = kwargs.get('property_name', None) + self.custom_type_id = kwargs.get('custom_type_id', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/property_description_py3.py b/customSDK/servicefabric/models/property_description_py3.py new file mode 100644 index 0000000..bfdb021 --- /dev/null +++ b/customSDK/servicefabric/models/property_description_py3.py @@ -0,0 +1,44 @@ +# 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 msrest.serialization import Model + + +class PropertyDescription(Model): + """Description of a Service Fabric property. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param custom_type_id: The property's custom type ID. Using this property, + the user is able to tag the type of the value of the property. + :type custom_type_id: str + :param value: Required. Describes a Service Fabric property value. + :type value: ~azure.servicefabric.models.PropertyValue + """ + + _validation = { + 'property_name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + } + + def __init__(self, *, property_name: str, value, custom_type_id: str=None, **kwargs) -> None: + super(PropertyDescription, self).__init__(**kwargs) + self.property_name = property_name + self.custom_type_id = custom_type_id + self.value = value diff --git a/customSDK/servicefabric/models/property_info.py b/customSDK/servicefabric/models/property_info.py new file mode 100644 index 0000000..943ae11 --- /dev/null +++ b/customSDK/servicefabric/models/property_info.py @@ -0,0 +1,44 @@ +# 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 msrest.serialization import Model + + +class PropertyInfo(Model): + """Information about a Service Fabric property. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Service Fabric property. + :type name: str + :param value: Describes a Service Fabric property value. + :type value: ~azure.servicefabric.models.PropertyValue + :param metadata: Required. The metadata associated with a property, + including the property's name. + :type metadata: ~azure.servicefabric.models.PropertyMetadata + """ + + _validation = { + 'name': {'required': True}, + 'metadata': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + 'metadata': {'key': 'Metadata', 'type': 'PropertyMetadata'}, + } + + def __init__(self, **kwargs): + super(PropertyInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + self.metadata = kwargs.get('metadata', None) diff --git a/customSDK/servicefabric/models/property_info_py3.py b/customSDK/servicefabric/models/property_info_py3.py new file mode 100644 index 0000000..b5a72e5 --- /dev/null +++ b/customSDK/servicefabric/models/property_info_py3.py @@ -0,0 +1,44 @@ +# 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 msrest.serialization import Model + + +class PropertyInfo(Model): + """Information about a Service Fabric property. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Service Fabric property. + :type name: str + :param value: Describes a Service Fabric property value. + :type value: ~azure.servicefabric.models.PropertyValue + :param metadata: Required. The metadata associated with a property, + including the property's name. + :type metadata: ~azure.servicefabric.models.PropertyMetadata + """ + + _validation = { + 'name': {'required': True}, + 'metadata': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + 'metadata': {'key': 'Metadata', 'type': 'PropertyMetadata'}, + } + + def __init__(self, *, name: str, metadata, value=None, **kwargs) -> None: + super(PropertyInfo, self).__init__(**kwargs) + self.name = name + self.value = value + self.metadata = metadata diff --git a/customSDK/servicefabric/models/property_metadata.py b/customSDK/servicefabric/models/property_metadata.py new file mode 100644 index 0000000..8c77204 --- /dev/null +++ b/customSDK/servicefabric/models/property_metadata.py @@ -0,0 +1,54 @@ +# 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 msrest.serialization import Model + + +class PropertyMetadata(Model): + """The metadata associated with a property, including the property's name. + + :param type_id: The kind of property, determined by the type of data. + Following are the possible values. Possible values include: 'Invalid', + 'Binary', 'Int64', 'Double', 'String', 'Guid' + :type type_id: str or ~azure.servicefabric.models.PropertyValueKind + :param custom_type_id: The property's custom type ID. + :type custom_type_id: str + :param parent: The name of the parent Service Fabric Name for the + property. It could be thought of as the name-space/table under which the + property exists. + :type parent: str + :param size_in_bytes: The length of the serialized property value. + :type size_in_bytes: int + :param last_modified_utc_timestamp: Represents when the Property was last + modified. Only write operations will cause this field to be updated. + :type last_modified_utc_timestamp: datetime + :param sequence_number: The version of the property. Every time a property + is modified, its sequence number is increased. + :type sequence_number: str + """ + + _attribute_map = { + 'type_id': {'key': 'TypeId', 'type': 'str'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + 'parent': {'key': 'Parent', 'type': 'str'}, + 'size_in_bytes': {'key': 'SizeInBytes', 'type': 'int'}, + 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PropertyMetadata, self).__init__(**kwargs) + self.type_id = kwargs.get('type_id', None) + self.custom_type_id = kwargs.get('custom_type_id', None) + self.parent = kwargs.get('parent', None) + self.size_in_bytes = kwargs.get('size_in_bytes', None) + self.last_modified_utc_timestamp = kwargs.get('last_modified_utc_timestamp', None) + self.sequence_number = kwargs.get('sequence_number', None) diff --git a/customSDK/servicefabric/models/property_metadata_py3.py b/customSDK/servicefabric/models/property_metadata_py3.py new file mode 100644 index 0000000..8d3d2a9 --- /dev/null +++ b/customSDK/servicefabric/models/property_metadata_py3.py @@ -0,0 +1,54 @@ +# 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 msrest.serialization import Model + + +class PropertyMetadata(Model): + """The metadata associated with a property, including the property's name. + + :param type_id: The kind of property, determined by the type of data. + Following are the possible values. Possible values include: 'Invalid', + 'Binary', 'Int64', 'Double', 'String', 'Guid' + :type type_id: str or ~azure.servicefabric.models.PropertyValueKind + :param custom_type_id: The property's custom type ID. + :type custom_type_id: str + :param parent: The name of the parent Service Fabric Name for the + property. It could be thought of as the name-space/table under which the + property exists. + :type parent: str + :param size_in_bytes: The length of the serialized property value. + :type size_in_bytes: int + :param last_modified_utc_timestamp: Represents when the Property was last + modified. Only write operations will cause this field to be updated. + :type last_modified_utc_timestamp: datetime + :param sequence_number: The version of the property. Every time a property + is modified, its sequence number is increased. + :type sequence_number: str + """ + + _attribute_map = { + 'type_id': {'key': 'TypeId', 'type': 'str'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + 'parent': {'key': 'Parent', 'type': 'str'}, + 'size_in_bytes': {'key': 'SizeInBytes', 'type': 'int'}, + 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + } + + def __init__(self, *, type_id=None, custom_type_id: str=None, parent: str=None, size_in_bytes: int=None, last_modified_utc_timestamp=None, sequence_number: str=None, **kwargs) -> None: + super(PropertyMetadata, self).__init__(**kwargs) + self.type_id = type_id + self.custom_type_id = custom_type_id + self.parent = parent + self.size_in_bytes = size_in_bytes + self.last_modified_utc_timestamp = last_modified_utc_timestamp + self.sequence_number = sequence_number diff --git a/customSDK/servicefabric/models/property_value.py b/customSDK/servicefabric/models/property_value.py new file mode 100644 index 0000000..6c56b26 --- /dev/null +++ b/customSDK/servicefabric/models/property_value.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class PropertyValue(Model): + """Describes a Service Fabric property value. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BinaryPropertyValue, Int64PropertyValue, + DoublePropertyValue, StringPropertyValue, GuidPropertyValue + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Binary': 'BinaryPropertyValue', 'Int64': 'Int64PropertyValue', 'Double': 'DoublePropertyValue', 'String': 'StringPropertyValue', 'Guid': 'GuidPropertyValue'} + } + + def __init__(self, **kwargs): + super(PropertyValue, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/property_value_py3.py b/customSDK/servicefabric/models/property_value_py3.py new file mode 100644 index 0000000..44b7c3b --- /dev/null +++ b/customSDK/servicefabric/models/property_value_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class PropertyValue(Model): + """Describes a Service Fabric property value. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BinaryPropertyValue, Int64PropertyValue, + DoublePropertyValue, StringPropertyValue, GuidPropertyValue + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Binary': 'BinaryPropertyValue', 'Int64': 'Int64PropertyValue', 'Double': 'DoublePropertyValue', 'String': 'StringPropertyValue', 'Guid': 'GuidPropertyValue'} + } + + def __init__(self, **kwargs) -> None: + super(PropertyValue, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/provision_application_type_description.py b/customSDK/servicefabric/models/provision_application_type_description.py new file mode 100644 index 0000000..78928bf --- /dev/null +++ b/customSDK/servicefabric/models/provision_application_type_description.py @@ -0,0 +1,58 @@ +# 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 .provision_application_type_description_base import ProvisionApplicationTypeDescriptionBase + + +class ProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): + """Describes the operation to register or provision an application type using + an application package uploaded to the Service Fabric image store. + + All required parameters must be populated in order to send to Azure. + + :param async_property: Required. Indicates whether or not provisioning + should occur asynchronously. When set to true, the provision operation + returns when the request is accepted by the system, and the provision + operation continues without any timeout limit. The default value is false. + For large application packages, we recommend setting the value to true. + :type async_property: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_type_build_path: Required. The relative path for the + application package in the image store specified during the prior upload + operation. + :type application_type_build_path: str + :param application_package_cleanup_policy: The kind of action that needs + to be taken for cleaning up the application package after successful + provision. Possible values include: 'Invalid', 'Default', 'Automatic', + 'Manual' + :type application_package_cleanup_policy: str or + ~azure.servicefabric.models.ApplicationPackageCleanupPolicy + """ + + _validation = { + 'async_property': {'required': True}, + 'kind': {'required': True}, + 'application_type_build_path': {'required': True}, + } + + _attribute_map = { + 'async_property': {'key': 'Async', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, + 'application_package_cleanup_policy': {'key': 'ApplicationPackageCleanupPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProvisionApplicationTypeDescription, self).__init__(**kwargs) + self.application_type_build_path = kwargs.get('application_type_build_path', None) + self.application_package_cleanup_policy = kwargs.get('application_package_cleanup_policy', None) + self.kind = 'ImageStorePath' diff --git a/customSDK/servicefabric/models/provision_application_type_description_base.py b/customSDK/servicefabric/models/provision_application_type_description_base.py new file mode 100644 index 0000000..e1e3c99 --- /dev/null +++ b/customSDK/servicefabric/models/provision_application_type_description_base.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class ProvisionApplicationTypeDescriptionBase(Model): + """Represents the type of registration or provision requested, and if the + operation needs to be asynchronous or not. Supported types of provision + operations are from either image store or external store. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ProvisionApplicationTypeDescription, + ExternalStoreProvisionApplicationTypeDescription + + All required parameters must be populated in order to send to Azure. + + :param async_property: Required. Indicates whether or not provisioning + should occur asynchronously. When set to true, the provision operation + returns when the request is accepted by the system, and the provision + operation continues without any timeout limit. The default value is false. + For large application packages, we recommend setting the value to true. + :type async_property: bool + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'async_property': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'async_property': {'key': 'Async', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ImageStorePath': 'ProvisionApplicationTypeDescription', 'ExternalStore': 'ExternalStoreProvisionApplicationTypeDescription'} + } + + def __init__(self, **kwargs): + super(ProvisionApplicationTypeDescriptionBase, self).__init__(**kwargs) + self.async_property = kwargs.get('async_property', None) + self.kind = None diff --git a/customSDK/servicefabric/models/provision_application_type_description_base_py3.py b/customSDK/servicefabric/models/provision_application_type_description_base_py3.py new file mode 100644 index 0000000..df9452e --- /dev/null +++ b/customSDK/servicefabric/models/provision_application_type_description_base_py3.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class ProvisionApplicationTypeDescriptionBase(Model): + """Represents the type of registration or provision requested, and if the + operation needs to be asynchronous or not. Supported types of provision + operations are from either image store or external store. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ProvisionApplicationTypeDescription, + ExternalStoreProvisionApplicationTypeDescription + + All required parameters must be populated in order to send to Azure. + + :param async_property: Required. Indicates whether or not provisioning + should occur asynchronously. When set to true, the provision operation + returns when the request is accepted by the system, and the provision + operation continues without any timeout limit. The default value is false. + For large application packages, we recommend setting the value to true. + :type async_property: bool + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'async_property': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'async_property': {'key': 'Async', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ImageStorePath': 'ProvisionApplicationTypeDescription', 'ExternalStore': 'ExternalStoreProvisionApplicationTypeDescription'} + } + + def __init__(self, *, async_property: bool, **kwargs) -> None: + super(ProvisionApplicationTypeDescriptionBase, self).__init__(**kwargs) + self.async_property = async_property + self.kind = None diff --git a/customSDK/servicefabric/models/provision_application_type_description_py3.py b/customSDK/servicefabric/models/provision_application_type_description_py3.py new file mode 100644 index 0000000..3a40324 --- /dev/null +++ b/customSDK/servicefabric/models/provision_application_type_description_py3.py @@ -0,0 +1,58 @@ +# 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 .provision_application_type_description_base_py3 import ProvisionApplicationTypeDescriptionBase + + +class ProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): + """Describes the operation to register or provision an application type using + an application package uploaded to the Service Fabric image store. + + All required parameters must be populated in order to send to Azure. + + :param async_property: Required. Indicates whether or not provisioning + should occur asynchronously. When set to true, the provision operation + returns when the request is accepted by the system, and the provision + operation continues without any timeout limit. The default value is false. + For large application packages, we recommend setting the value to true. + :type async_property: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_type_build_path: Required. The relative path for the + application package in the image store specified during the prior upload + operation. + :type application_type_build_path: str + :param application_package_cleanup_policy: The kind of action that needs + to be taken for cleaning up the application package after successful + provision. Possible values include: 'Invalid', 'Default', 'Automatic', + 'Manual' + :type application_package_cleanup_policy: str or + ~azure.servicefabric.models.ApplicationPackageCleanupPolicy + """ + + _validation = { + 'async_property': {'required': True}, + 'kind': {'required': True}, + 'application_type_build_path': {'required': True}, + } + + _attribute_map = { + 'async_property': {'key': 'Async', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, + 'application_package_cleanup_policy': {'key': 'ApplicationPackageCleanupPolicy', 'type': 'str'}, + } + + def __init__(self, *, async_property: bool, application_type_build_path: str, application_package_cleanup_policy=None, **kwargs) -> None: + super(ProvisionApplicationTypeDescription, self).__init__(async_property=async_property, **kwargs) + self.application_type_build_path = application_type_build_path + self.application_package_cleanup_policy = application_package_cleanup_policy + self.kind = 'ImageStorePath' diff --git a/customSDK/servicefabric/models/provision_fabric_description.py b/customSDK/servicefabric/models/provision_fabric_description.py new file mode 100644 index 0000000..b033b3d --- /dev/null +++ b/customSDK/servicefabric/models/provision_fabric_description.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class ProvisionFabricDescription(Model): + """Describes the parameters for provisioning a cluster. + + :param code_file_path: The cluster code package file path. + :type code_file_path: str + :param cluster_manifest_file_path: The cluster manifest file path. + :type cluster_manifest_file_path: str + """ + + _attribute_map = { + 'code_file_path': {'key': 'CodeFilePath', 'type': 'str'}, + 'cluster_manifest_file_path': {'key': 'ClusterManifestFilePath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProvisionFabricDescription, self).__init__(**kwargs) + self.code_file_path = kwargs.get('code_file_path', None) + self.cluster_manifest_file_path = kwargs.get('cluster_manifest_file_path', None) diff --git a/customSDK/servicefabric/models/provision_fabric_description_py3.py b/customSDK/servicefabric/models/provision_fabric_description_py3.py new file mode 100644 index 0000000..674a40c --- /dev/null +++ b/customSDK/servicefabric/models/provision_fabric_description_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class ProvisionFabricDescription(Model): + """Describes the parameters for provisioning a cluster. + + :param code_file_path: The cluster code package file path. + :type code_file_path: str + :param cluster_manifest_file_path: The cluster manifest file path. + :type cluster_manifest_file_path: str + """ + + _attribute_map = { + 'code_file_path': {'key': 'CodeFilePath', 'type': 'str'}, + 'cluster_manifest_file_path': {'key': 'ClusterManifestFilePath', 'type': 'str'}, + } + + def __init__(self, *, code_file_path: str=None, cluster_manifest_file_path: str=None, **kwargs) -> None: + super(ProvisionFabricDescription, self).__init__(**kwargs) + self.code_file_path = code_file_path + self.cluster_manifest_file_path = cluster_manifest_file_path diff --git a/customSDK/servicefabric/models/put_property_batch_operation.py b/customSDK/servicefabric/models/put_property_batch_operation.py new file mode 100644 index 0000000..c1e4a26 --- /dev/null +++ b/customSDK/servicefabric/models/put_property_batch_operation.py @@ -0,0 +1,50 @@ +# 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 .property_batch_operation import PropertyBatchOperation + + +class PutPropertyBatchOperation(PropertyBatchOperation): + """Puts the specified property under the specified name. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param value: Required. Describes a Service Fabric property value. + :type value: ~azure.servicefabric.models.PropertyValue + :param custom_type_id: The property's custom type ID. Using this property, + the user is able to tag the type of the value of the property. + :type custom_type_id: str + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PutPropertyBatchOperation, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.custom_type_id = kwargs.get('custom_type_id', None) + self.kind = 'Put' diff --git a/customSDK/servicefabric/models/put_property_batch_operation_py3.py b/customSDK/servicefabric/models/put_property_batch_operation_py3.py new file mode 100644 index 0000000..862605a --- /dev/null +++ b/customSDK/servicefabric/models/put_property_batch_operation_py3.py @@ -0,0 +1,50 @@ +# 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 .property_batch_operation_py3 import PropertyBatchOperation + + +class PutPropertyBatchOperation(PropertyBatchOperation): + """Puts the specified property under the specified name. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param value: Required. Describes a Service Fabric property value. + :type value: ~azure.servicefabric.models.PropertyValue + :param custom_type_id: The property's custom type ID. Using this property, + the user is able to tag the type of the value of the property. + :type custom_type_id: str + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + } + + def __init__(self, *, property_name: str, value, custom_type_id: str=None, **kwargs) -> None: + super(PutPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.value = value + self.custom_type_id = custom_type_id + self.kind = 'Put' diff --git a/customSDK/servicefabric/models/reconfiguration_information.py b/customSDK/servicefabric/models/reconfiguration_information.py new file mode 100644 index 0000000..0bcb0a6 --- /dev/null +++ b/customSDK/servicefabric/models/reconfiguration_information.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class ReconfigurationInformation(Model): + """Information about current reconfiguration like phase, type, previous + configuration role of replica and reconfiguration start date time. + + :param previous_configuration_role: Replica role before reconfiguration + started. Possible values include: 'Unknown', 'None', 'Primary', + 'IdleSecondary', 'ActiveSecondary' + :type previous_configuration_role: str or + ~azure.servicefabric.models.ReplicaRole + :param reconfiguration_phase: Current phase of ongoing reconfiguration. If + no reconfiguration is taking place then this value will be "None". + Possible values include: 'Unknown', 'None', 'Phase0', 'Phase1', 'Phase2', + 'Phase3', 'Phase4', 'AbortPhaseZero' + :type reconfiguration_phase: str or + ~azure.servicefabric.models.ReconfigurationPhase + :param reconfiguration_type: Type of current ongoing reconfiguration. If + no reconfiguration is taking place then this value will be "None". + Possible values include: 'Unknown', 'SwapPrimary', 'Failover', 'Other' + :type reconfiguration_type: str or + ~azure.servicefabric.models.ReconfigurationType + :param reconfiguration_start_time_utc: Start time (in UTC) of the ongoing + reconfiguration. If no reconfiguration is taking place then this value + will be zero date-time. + :type reconfiguration_start_time_utc: datetime + """ + + _attribute_map = { + 'previous_configuration_role': {'key': 'PreviousConfigurationRole', 'type': 'str'}, + 'reconfiguration_phase': {'key': 'ReconfigurationPhase', 'type': 'str'}, + 'reconfiguration_type': {'key': 'ReconfigurationType', 'type': 'str'}, + 'reconfiguration_start_time_utc': {'key': 'ReconfigurationStartTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ReconfigurationInformation, self).__init__(**kwargs) + self.previous_configuration_role = kwargs.get('previous_configuration_role', None) + self.reconfiguration_phase = kwargs.get('reconfiguration_phase', None) + self.reconfiguration_type = kwargs.get('reconfiguration_type', None) + self.reconfiguration_start_time_utc = kwargs.get('reconfiguration_start_time_utc', None) diff --git a/customSDK/servicefabric/models/reconfiguration_information_py3.py b/customSDK/servicefabric/models/reconfiguration_information_py3.py new file mode 100644 index 0000000..d7bcfc1 --- /dev/null +++ b/customSDK/servicefabric/models/reconfiguration_information_py3.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class ReconfigurationInformation(Model): + """Information about current reconfiguration like phase, type, previous + configuration role of replica and reconfiguration start date time. + + :param previous_configuration_role: Replica role before reconfiguration + started. Possible values include: 'Unknown', 'None', 'Primary', + 'IdleSecondary', 'ActiveSecondary' + :type previous_configuration_role: str or + ~azure.servicefabric.models.ReplicaRole + :param reconfiguration_phase: Current phase of ongoing reconfiguration. If + no reconfiguration is taking place then this value will be "None". + Possible values include: 'Unknown', 'None', 'Phase0', 'Phase1', 'Phase2', + 'Phase3', 'Phase4', 'AbortPhaseZero' + :type reconfiguration_phase: str or + ~azure.servicefabric.models.ReconfigurationPhase + :param reconfiguration_type: Type of current ongoing reconfiguration. If + no reconfiguration is taking place then this value will be "None". + Possible values include: 'Unknown', 'SwapPrimary', 'Failover', 'Other' + :type reconfiguration_type: str or + ~azure.servicefabric.models.ReconfigurationType + :param reconfiguration_start_time_utc: Start time (in UTC) of the ongoing + reconfiguration. If no reconfiguration is taking place then this value + will be zero date-time. + :type reconfiguration_start_time_utc: datetime + """ + + _attribute_map = { + 'previous_configuration_role': {'key': 'PreviousConfigurationRole', 'type': 'str'}, + 'reconfiguration_phase': {'key': 'ReconfigurationPhase', 'type': 'str'}, + 'reconfiguration_type': {'key': 'ReconfigurationType', 'type': 'str'}, + 'reconfiguration_start_time_utc': {'key': 'ReconfigurationStartTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, *, previous_configuration_role=None, reconfiguration_phase=None, reconfiguration_type=None, reconfiguration_start_time_utc=None, **kwargs) -> None: + super(ReconfigurationInformation, self).__init__(**kwargs) + self.previous_configuration_role = previous_configuration_role + self.reconfiguration_phase = reconfiguration_phase + self.reconfiguration_type = reconfiguration_type + self.reconfiguration_start_time_utc = reconfiguration_start_time_utc diff --git a/customSDK/servicefabric/models/registry_credential.py b/customSDK/servicefabric/models/registry_credential.py new file mode 100644 index 0000000..983e928 --- /dev/null +++ b/customSDK/servicefabric/models/registry_credential.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class RegistryCredential(Model): + """Credential information to connect to container registry. + + :param registry_user_name: The user name to connect to container registry. + :type registry_user_name: str + :param registry_password: The password for supplied username to connect to + container registry. + :type registry_password: str + :param password_encrypted: Indicates that supplied container registry + password is encrypted. + :type password_encrypted: bool + """ + + _attribute_map = { + 'registry_user_name': {'key': 'RegistryUserName', 'type': 'str'}, + 'registry_password': {'key': 'RegistryPassword', 'type': 'str'}, + 'password_encrypted': {'key': 'PasswordEncrypted', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RegistryCredential, self).__init__(**kwargs) + self.registry_user_name = kwargs.get('registry_user_name', None) + self.registry_password = kwargs.get('registry_password', None) + self.password_encrypted = kwargs.get('password_encrypted', None) diff --git a/customSDK/servicefabric/models/registry_credential_py3.py b/customSDK/servicefabric/models/registry_credential_py3.py new file mode 100644 index 0000000..babd043 --- /dev/null +++ b/customSDK/servicefabric/models/registry_credential_py3.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class RegistryCredential(Model): + """Credential information to connect to container registry. + + :param registry_user_name: The user name to connect to container registry. + :type registry_user_name: str + :param registry_password: The password for supplied username to connect to + container registry. + :type registry_password: str + :param password_encrypted: Indicates that supplied container registry + password is encrypted. + :type password_encrypted: bool + """ + + _attribute_map = { + 'registry_user_name': {'key': 'RegistryUserName', 'type': 'str'}, + 'registry_password': {'key': 'RegistryPassword', 'type': 'str'}, + 'password_encrypted': {'key': 'PasswordEncrypted', 'type': 'bool'}, + } + + def __init__(self, *, registry_user_name: str=None, registry_password: str=None, password_encrypted: bool=None, **kwargs) -> None: + super(RegistryCredential, self).__init__(**kwargs) + self.registry_user_name = registry_user_name + self.registry_password = registry_password + self.password_encrypted = password_encrypted diff --git a/customSDK/servicefabric/models/reliable_collections_ref.py b/customSDK/servicefabric/models/reliable_collections_ref.py new file mode 100644 index 0000000..0bdbaa8 --- /dev/null +++ b/customSDK/servicefabric/models/reliable_collections_ref.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class ReliableCollectionsRef(Model): + """Specifying this parameter adds support for reliable collections. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of ReliableCollection resource. Right now it's + not used and you can use any string. + :type name: str + :param do_not_persist_state: False (the default) if ReliableCollections + state is persisted to disk as usual. True if you do not want to persist + state, in which case replication is still enabled and you can use + ReliableCollections as distributed cache. + :type do_not_persist_state: bool + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'do_not_persist_state': {'key': 'doNotPersistState', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ReliableCollectionsRef, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.do_not_persist_state = kwargs.get('do_not_persist_state', None) diff --git a/customSDK/servicefabric/models/reliable_collections_ref_py3.py b/customSDK/servicefabric/models/reliable_collections_ref_py3.py new file mode 100644 index 0000000..c517f34 --- /dev/null +++ b/customSDK/servicefabric/models/reliable_collections_ref_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class ReliableCollectionsRef(Model): + """Specifying this parameter adds support for reliable collections. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of ReliableCollection resource. Right now it's + not used and you can use any string. + :type name: str + :param do_not_persist_state: False (the default) if ReliableCollections + state is persisted to disk as usual. True if you do not want to persist + state, in which case replication is still enabled and you can use + ReliableCollections as distributed cache. + :type do_not_persist_state: bool + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'do_not_persist_state': {'key': 'doNotPersistState', 'type': 'bool'}, + } + + def __init__(self, *, name: str, do_not_persist_state: bool=None, **kwargs) -> None: + super(ReliableCollectionsRef, self).__init__(**kwargs) + self.name = name + self.do_not_persist_state = do_not_persist_state diff --git a/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail.py b/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail.py new file mode 100644 index 0000000..3195474 --- /dev/null +++ b/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class RemoteReplicatorAcknowledgementDetail(Model): + """Provides various statistics of the acknowledgements that are being received + from the remote replicator. + + :param average_receive_duration: Represents the average duration it takes + for the remote replicator to receive an operation. + :type average_receive_duration: str + :param average_apply_duration: Represents the average duration it takes + for the remote replicator to apply an operation. This usually entails + writing the operation to disk. + :type average_apply_duration: str + :param not_received_count: Represents the number of operations not yet + received by a remote replicator. + :type not_received_count: str + :param received_and_not_applied_count: Represents the number of operations + received and not yet applied by a remote replicator. + :type received_and_not_applied_count: str + """ + + _attribute_map = { + 'average_receive_duration': {'key': 'AverageReceiveDuration', 'type': 'str'}, + 'average_apply_duration': {'key': 'AverageApplyDuration', 'type': 'str'}, + 'not_received_count': {'key': 'NotReceivedCount', 'type': 'str'}, + 'received_and_not_applied_count': {'key': 'ReceivedAndNotAppliedCount', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RemoteReplicatorAcknowledgementDetail, self).__init__(**kwargs) + self.average_receive_duration = kwargs.get('average_receive_duration', None) + self.average_apply_duration = kwargs.get('average_apply_duration', None) + self.not_received_count = kwargs.get('not_received_count', None) + self.received_and_not_applied_count = kwargs.get('received_and_not_applied_count', None) diff --git a/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail_py3.py b/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail_py3.py new file mode 100644 index 0000000..ade7b3c --- /dev/null +++ b/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail_py3.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class RemoteReplicatorAcknowledgementDetail(Model): + """Provides various statistics of the acknowledgements that are being received + from the remote replicator. + + :param average_receive_duration: Represents the average duration it takes + for the remote replicator to receive an operation. + :type average_receive_duration: str + :param average_apply_duration: Represents the average duration it takes + for the remote replicator to apply an operation. This usually entails + writing the operation to disk. + :type average_apply_duration: str + :param not_received_count: Represents the number of operations not yet + received by a remote replicator. + :type not_received_count: str + :param received_and_not_applied_count: Represents the number of operations + received and not yet applied by a remote replicator. + :type received_and_not_applied_count: str + """ + + _attribute_map = { + 'average_receive_duration': {'key': 'AverageReceiveDuration', 'type': 'str'}, + 'average_apply_duration': {'key': 'AverageApplyDuration', 'type': 'str'}, + 'not_received_count': {'key': 'NotReceivedCount', 'type': 'str'}, + 'received_and_not_applied_count': {'key': 'ReceivedAndNotAppliedCount', 'type': 'str'}, + } + + def __init__(self, *, average_receive_duration: str=None, average_apply_duration: str=None, not_received_count: str=None, received_and_not_applied_count: str=None, **kwargs) -> None: + super(RemoteReplicatorAcknowledgementDetail, self).__init__(**kwargs) + self.average_receive_duration = average_receive_duration + self.average_apply_duration = average_apply_duration + self.not_received_count = not_received_count + self.received_and_not_applied_count = received_and_not_applied_count diff --git a/customSDK/servicefabric/models/remote_replicator_acknowledgement_status.py b/customSDK/servicefabric/models/remote_replicator_acknowledgement_status.py new file mode 100644 index 0000000..5b4f6e7 --- /dev/null +++ b/customSDK/servicefabric/models/remote_replicator_acknowledgement_status.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class RemoteReplicatorAcknowledgementStatus(Model): + """Provides details about the remote replicators from the primary replicator's + point of view. + + :param replication_stream_acknowledgement_detail: Details about the + acknowledgements for operations that are part of the replication stream + data. + :type replication_stream_acknowledgement_detail: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail + :param copy_stream_acknowledgement_detail: Details about the + acknowledgements for operations that are part of the copy stream data. + :type copy_stream_acknowledgement_detail: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail + """ + + _attribute_map = { + 'replication_stream_acknowledgement_detail': {'key': 'ReplicationStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, + 'copy_stream_acknowledgement_detail': {'key': 'CopyStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, + } + + def __init__(self, **kwargs): + super(RemoteReplicatorAcknowledgementStatus, self).__init__(**kwargs) + self.replication_stream_acknowledgement_detail = kwargs.get('replication_stream_acknowledgement_detail', None) + self.copy_stream_acknowledgement_detail = kwargs.get('copy_stream_acknowledgement_detail', None) diff --git a/customSDK/servicefabric/models/remote_replicator_acknowledgement_status_py3.py b/customSDK/servicefabric/models/remote_replicator_acknowledgement_status_py3.py new file mode 100644 index 0000000..3742834 --- /dev/null +++ b/customSDK/servicefabric/models/remote_replicator_acknowledgement_status_py3.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class RemoteReplicatorAcknowledgementStatus(Model): + """Provides details about the remote replicators from the primary replicator's + point of view. + + :param replication_stream_acknowledgement_detail: Details about the + acknowledgements for operations that are part of the replication stream + data. + :type replication_stream_acknowledgement_detail: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail + :param copy_stream_acknowledgement_detail: Details about the + acknowledgements for operations that are part of the copy stream data. + :type copy_stream_acknowledgement_detail: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail + """ + + _attribute_map = { + 'replication_stream_acknowledgement_detail': {'key': 'ReplicationStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, + 'copy_stream_acknowledgement_detail': {'key': 'CopyStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, + } + + def __init__(self, *, replication_stream_acknowledgement_detail=None, copy_stream_acknowledgement_detail=None, **kwargs) -> None: + super(RemoteReplicatorAcknowledgementStatus, self).__init__(**kwargs) + self.replication_stream_acknowledgement_detail = replication_stream_acknowledgement_detail + self.copy_stream_acknowledgement_detail = copy_stream_acknowledgement_detail diff --git a/customSDK/servicefabric/models/remote_replicator_status.py b/customSDK/servicefabric/models/remote_replicator_status.py new file mode 100644 index 0000000..0258c84 --- /dev/null +++ b/customSDK/servicefabric/models/remote_replicator_status.py @@ -0,0 +1,73 @@ +# 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 msrest.serialization import Model + + +class RemoteReplicatorStatus(Model): + """Represents the state of the secondary replicator from the primary + replicator’s point of view. + + :param replica_id: Represents the replica ID of the remote secondary + replicator. + :type replica_id: str + :param last_acknowledgement_processed_time_utc: The last timestamp (in + UTC) when an acknowledgement from the secondary replicator was processed + on the primary. + UTC 0 represents an invalid value, indicating that no acknowledgement + messages were ever processed. + :type last_acknowledgement_processed_time_utc: datetime + :param last_received_replication_sequence_number: The highest replication + operation sequence number that the secondary has received from the + primary. + :type last_received_replication_sequence_number: str + :param last_applied_replication_sequence_number: The highest replication + operation sequence number that the secondary has applied to its state. + :type last_applied_replication_sequence_number: str + :param is_in_build: A value that indicates whether the secondary replica + is in the process of being built. + :type is_in_build: bool + :param last_received_copy_sequence_number: The highest copy operation + sequence number that the secondary has received from the primary. + A value of -1 implies that the secondary has received all copy operations. + :type last_received_copy_sequence_number: str + :param last_applied_copy_sequence_number: The highest copy operation + sequence number that the secondary has applied to its state. + A value of -1 implies that the secondary has applied all copy operations + and the copy process is complete. + :type last_applied_copy_sequence_number: str + :param remote_replicator_acknowledgement_status: Represents the + acknowledgment status for the remote secondary replicator. + :type remote_replicator_acknowledgement_status: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementStatus + """ + + _attribute_map = { + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'last_acknowledgement_processed_time_utc': {'key': 'LastAcknowledgementProcessedTimeUtc', 'type': 'iso-8601'}, + 'last_received_replication_sequence_number': {'key': 'LastReceivedReplicationSequenceNumber', 'type': 'str'}, + 'last_applied_replication_sequence_number': {'key': 'LastAppliedReplicationSequenceNumber', 'type': 'str'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'last_received_copy_sequence_number': {'key': 'LastReceivedCopySequenceNumber', 'type': 'str'}, + 'last_applied_copy_sequence_number': {'key': 'LastAppliedCopySequenceNumber', 'type': 'str'}, + 'remote_replicator_acknowledgement_status': {'key': 'RemoteReplicatorAcknowledgementStatus', 'type': 'RemoteReplicatorAcknowledgementStatus'}, + } + + def __init__(self, **kwargs): + super(RemoteReplicatorStatus, self).__init__(**kwargs) + self.replica_id = kwargs.get('replica_id', None) + self.last_acknowledgement_processed_time_utc = kwargs.get('last_acknowledgement_processed_time_utc', None) + self.last_received_replication_sequence_number = kwargs.get('last_received_replication_sequence_number', None) + self.last_applied_replication_sequence_number = kwargs.get('last_applied_replication_sequence_number', None) + self.is_in_build = kwargs.get('is_in_build', None) + self.last_received_copy_sequence_number = kwargs.get('last_received_copy_sequence_number', None) + self.last_applied_copy_sequence_number = kwargs.get('last_applied_copy_sequence_number', None) + self.remote_replicator_acknowledgement_status = kwargs.get('remote_replicator_acknowledgement_status', None) diff --git a/customSDK/servicefabric/models/remote_replicator_status_py3.py b/customSDK/servicefabric/models/remote_replicator_status_py3.py new file mode 100644 index 0000000..99c71f0 --- /dev/null +++ b/customSDK/servicefabric/models/remote_replicator_status_py3.py @@ -0,0 +1,73 @@ +# 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 msrest.serialization import Model + + +class RemoteReplicatorStatus(Model): + """Represents the state of the secondary replicator from the primary + replicator’s point of view. + + :param replica_id: Represents the replica ID of the remote secondary + replicator. + :type replica_id: str + :param last_acknowledgement_processed_time_utc: The last timestamp (in + UTC) when an acknowledgement from the secondary replicator was processed + on the primary. + UTC 0 represents an invalid value, indicating that no acknowledgement + messages were ever processed. + :type last_acknowledgement_processed_time_utc: datetime + :param last_received_replication_sequence_number: The highest replication + operation sequence number that the secondary has received from the + primary. + :type last_received_replication_sequence_number: str + :param last_applied_replication_sequence_number: The highest replication + operation sequence number that the secondary has applied to its state. + :type last_applied_replication_sequence_number: str + :param is_in_build: A value that indicates whether the secondary replica + is in the process of being built. + :type is_in_build: bool + :param last_received_copy_sequence_number: The highest copy operation + sequence number that the secondary has received from the primary. + A value of -1 implies that the secondary has received all copy operations. + :type last_received_copy_sequence_number: str + :param last_applied_copy_sequence_number: The highest copy operation + sequence number that the secondary has applied to its state. + A value of -1 implies that the secondary has applied all copy operations + and the copy process is complete. + :type last_applied_copy_sequence_number: str + :param remote_replicator_acknowledgement_status: Represents the + acknowledgment status for the remote secondary replicator. + :type remote_replicator_acknowledgement_status: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementStatus + """ + + _attribute_map = { + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'last_acknowledgement_processed_time_utc': {'key': 'LastAcknowledgementProcessedTimeUtc', 'type': 'iso-8601'}, + 'last_received_replication_sequence_number': {'key': 'LastReceivedReplicationSequenceNumber', 'type': 'str'}, + 'last_applied_replication_sequence_number': {'key': 'LastAppliedReplicationSequenceNumber', 'type': 'str'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'last_received_copy_sequence_number': {'key': 'LastReceivedCopySequenceNumber', 'type': 'str'}, + 'last_applied_copy_sequence_number': {'key': 'LastAppliedCopySequenceNumber', 'type': 'str'}, + 'remote_replicator_acknowledgement_status': {'key': 'RemoteReplicatorAcknowledgementStatus', 'type': 'RemoteReplicatorAcknowledgementStatus'}, + } + + def __init__(self, *, replica_id: str=None, last_acknowledgement_processed_time_utc=None, last_received_replication_sequence_number: str=None, last_applied_replication_sequence_number: str=None, is_in_build: bool=None, last_received_copy_sequence_number: str=None, last_applied_copy_sequence_number: str=None, remote_replicator_acknowledgement_status=None, **kwargs) -> None: + super(RemoteReplicatorStatus, self).__init__(**kwargs) + self.replica_id = replica_id + self.last_acknowledgement_processed_time_utc = last_acknowledgement_processed_time_utc + self.last_received_replication_sequence_number = last_received_replication_sequence_number + self.last_applied_replication_sequence_number = last_applied_replication_sequence_number + self.is_in_build = is_in_build + self.last_received_copy_sequence_number = last_received_copy_sequence_number + self.last_applied_copy_sequence_number = last_applied_copy_sequence_number + self.remote_replicator_acknowledgement_status = remote_replicator_acknowledgement_status diff --git a/customSDK/servicefabric/models/repair_impact_description_base.py b/customSDK/servicefabric/models/repair_impact_description_base.py new file mode 100644 index 0000000..5e691e7 --- /dev/null +++ b/customSDK/servicefabric/models/repair_impact_description_base.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class RepairImpactDescriptionBase(Model): + """Describes the expected impact of executing a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NodeRepairImpactDescription + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Node': 'NodeRepairImpactDescription'} + } + + def __init__(self, **kwargs): + super(RepairImpactDescriptionBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/repair_impact_description_base_py3.py b/customSDK/servicefabric/models/repair_impact_description_base_py3.py new file mode 100644 index 0000000..3569e10 --- /dev/null +++ b/customSDK/servicefabric/models/repair_impact_description_base_py3.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class RepairImpactDescriptionBase(Model): + """Describes the expected impact of executing a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NodeRepairImpactDescription + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Node': 'NodeRepairImpactDescription'} + } + + def __init__(self, **kwargs) -> None: + super(RepairImpactDescriptionBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/repair_target_description_base.py b/customSDK/servicefabric/models/repair_target_description_base.py new file mode 100644 index 0000000..5bedd76 --- /dev/null +++ b/customSDK/servicefabric/models/repair_target_description_base.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class RepairTargetDescriptionBase(Model): + """Describes the entities targeted by a repair action. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NodeRepairTargetDescription + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Node': 'NodeRepairTargetDescription'} + } + + def __init__(self, **kwargs): + super(RepairTargetDescriptionBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/repair_target_description_base_py3.py b/customSDK/servicefabric/models/repair_target_description_base_py3.py new file mode 100644 index 0000000..d68058e --- /dev/null +++ b/customSDK/servicefabric/models/repair_target_description_base_py3.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class RepairTargetDescriptionBase(Model): + """Describes the entities targeted by a repair action. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NodeRepairTargetDescription + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Node': 'NodeRepairTargetDescription'} + } + + def __init__(self, **kwargs) -> None: + super(RepairTargetDescriptionBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/repair_task.py b/customSDK/servicefabric/models/repair_task.py new file mode 100644 index 0000000..068b3c3 --- /dev/null +++ b/customSDK/servicefabric/models/repair_task.py @@ -0,0 +1,153 @@ +# 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 msrest.serialization import Model + + +class RepairTask(Model): + """Represents a repair task, which includes information about what kind of + repair was requested, what its progress is, and what its final result was. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the repair task. + :type task_id: str + :param version: The version of the repair task. + When creating a new repair task, the version must be set to zero. When + updating a repair task, + the version is used for optimistic concurrency checks. If the version is + set to zero, the update will not check for write conflicts. If the + version is set to a non-zero value, then the + update will only succeed if the actual current version of the repair task + matches this value. + :type version: str + :param description: A description of the purpose of the repair task, or + other informational details. + May be set when the repair task is created, and is immutable once set. + :type description: str + :param state: Required. The workflow state of the repair task. Valid + initial states are Created, Claimed, and Preparing. Possible values + include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', + 'Executing', 'Restoring', 'Completed' + :type state: str or ~azure.servicefabric.models.State + :param flags: A bitwise-OR of the following values, which gives additional + details about the status of the repair task. + - 1 - Cancellation of the repair has been requested + - 2 - Abort of the repair has been requested + - 4 - Approval of the repair was forced via client request + :type flags: int + :param action: Required. The requested repair action. Must be specified + when the repair task is created, and is immutable once set. + :type action: str + :param target: The target object determines what actions the system will + take to prepare for the impact of the repair, prior to approving execution + of the repair. + May be set when the repair task is created, and is immutable once set. + :type target: ~azure.servicefabric.models.RepairTargetDescriptionBase + :param executor: The name of the repair executor. Must be specified in + Claimed and later states, and is immutable once set. + :type executor: str + :param executor_data: A data string that the repair executor can use to + store its internal state. + :type executor_data: str + :param impact: The impact object determines what actions the system will + take to prepare for the impact of the repair, prior to approving execution + of the repair. + Impact must be specified by the repair executor when transitioning to the + Preparing state, and is immutable once set. + :type impact: ~azure.servicefabric.models.RepairImpactDescriptionBase + :param result_status: A value describing the overall result of the repair + task execution. Must be specified in the Restoring and later states, and + is immutable once set. Possible values include: 'Invalid', 'Succeeded', + 'Cancelled', 'Interrupted', 'Failed', 'Pending' + :type result_status: str or ~azure.servicefabric.models.ResultStatus + :param result_code: A numeric value providing additional details about the + result of the repair task execution. + May be specified in the Restoring and later states, and is immutable once + set. + :type result_code: int + :param result_details: A string providing additional details about the + result of the repair task execution. + May be specified in the Restoring and later states, and is immutable once + set. + :type result_details: str + :param history: An object that contains timestamps of the repair task's + state transitions. + These timestamps are updated by the system, and cannot be directly + modified. + :type history: ~azure.servicefabric.models.RepairTaskHistory + :param preparing_health_check_state: The workflow state of the health + check when the repair task is in the Preparing state. Possible values + include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + :type preparing_health_check_state: str or + ~azure.servicefabric.models.RepairTaskHealthCheckState + :param restoring_health_check_state: The workflow state of the health + check when the repair task is in the Restoring state. Possible values + include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + :type restoring_health_check_state: str or + ~azure.servicefabric.models.RepairTaskHealthCheckState + :param perform_preparing_health_check: A value to determine if health + checks will be performed when the repair task enters the Preparing state. + :type perform_preparing_health_check: bool + :param perform_restoring_health_check: A value to determine if health + checks will be performed when the repair task enters the Restoring state. + :type perform_restoring_health_check: bool + """ + + _validation = { + 'task_id': {'required': True}, + 'state': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'action': {'key': 'Action', 'type': 'str'}, + 'target': {'key': 'Target', 'type': 'RepairTargetDescriptionBase'}, + 'executor': {'key': 'Executor', 'type': 'str'}, + 'executor_data': {'key': 'ExecutorData', 'type': 'str'}, + 'impact': {'key': 'Impact', 'type': 'RepairImpactDescriptionBase'}, + 'result_status': {'key': 'ResultStatus', 'type': 'str'}, + 'result_code': {'key': 'ResultCode', 'type': 'int'}, + 'result_details': {'key': 'ResultDetails', 'type': 'str'}, + 'history': {'key': 'History', 'type': 'RepairTaskHistory'}, + 'preparing_health_check_state': {'key': 'PreparingHealthCheckState', 'type': 'str'}, + 'restoring_health_check_state': {'key': 'RestoringHealthCheckState', 'type': 'str'}, + 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, + 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RepairTask, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.version = kwargs.get('version', None) + self.description = kwargs.get('description', None) + self.state = kwargs.get('state', None) + self.flags = kwargs.get('flags', None) + self.action = kwargs.get('action', None) + self.target = kwargs.get('target', None) + self.executor = kwargs.get('executor', None) + self.executor_data = kwargs.get('executor_data', None) + self.impact = kwargs.get('impact', None) + self.result_status = kwargs.get('result_status', None) + self.result_code = kwargs.get('result_code', None) + self.result_details = kwargs.get('result_details', None) + self.history = kwargs.get('history', None) + self.preparing_health_check_state = kwargs.get('preparing_health_check_state', None) + self.restoring_health_check_state = kwargs.get('restoring_health_check_state', None) + self.perform_preparing_health_check = kwargs.get('perform_preparing_health_check', None) + self.perform_restoring_health_check = kwargs.get('perform_restoring_health_check', None) diff --git a/customSDK/servicefabric/models/repair_task_approve_description.py b/customSDK/servicefabric/models/repair_task_approve_description.py new file mode 100644 index 0000000..132dcbd --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_approve_description.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class RepairTaskApproveDescription(Model): + """Describes a request for forced approval of a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the repair task. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current version of the repair task. If zero, then no version check + is performed. + :type version: str + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RepairTaskApproveDescription, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.version = kwargs.get('version', None) diff --git a/customSDK/servicefabric/models/repair_task_approve_description_py3.py b/customSDK/servicefabric/models/repair_task_approve_description_py3.py new file mode 100644 index 0000000..78c312a --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_approve_description_py3.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class RepairTaskApproveDescription(Model): + """Describes a request for forced approval of a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the repair task. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current version of the repair task. If zero, then no version check + is performed. + :type version: str + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, *, task_id: str, version: str=None, **kwargs) -> None: + super(RepairTaskApproveDescription, self).__init__(**kwargs) + self.task_id = task_id + self.version = version diff --git a/customSDK/servicefabric/models/repair_task_cancel_description.py b/customSDK/servicefabric/models/repair_task_cancel_description.py new file mode 100644 index 0000000..63767fb --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_cancel_description.py @@ -0,0 +1,49 @@ +# 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 msrest.serialization import Model + + +class RepairTaskCancelDescription(Model): + """Describes a request to cancel a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the repair task. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current version of the repair task. If zero, then no version check + is performed. + :type version: str + :param request_abort: _True_ if the repair should be stopped as soon as + possible even if it has already started executing. _False_ if the repair + should be cancelled only if execution has not yet started. + :type request_abort: bool + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'request_abort': {'key': 'RequestAbort', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RepairTaskCancelDescription, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.version = kwargs.get('version', None) + self.request_abort = kwargs.get('request_abort', None) diff --git a/customSDK/servicefabric/models/repair_task_cancel_description_py3.py b/customSDK/servicefabric/models/repair_task_cancel_description_py3.py new file mode 100644 index 0000000..d4dcde4 --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_cancel_description_py3.py @@ -0,0 +1,49 @@ +# 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 msrest.serialization import Model + + +class RepairTaskCancelDescription(Model): + """Describes a request to cancel a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the repair task. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current version of the repair task. If zero, then no version check + is performed. + :type version: str + :param request_abort: _True_ if the repair should be stopped as soon as + possible even if it has already started executing. _False_ if the repair + should be cancelled only if execution has not yet started. + :type request_abort: bool + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'request_abort': {'key': 'RequestAbort', 'type': 'bool'}, + } + + def __init__(self, *, task_id: str, version: str=None, request_abort: bool=None, **kwargs) -> None: + super(RepairTaskCancelDescription, self).__init__(**kwargs) + self.task_id = task_id + self.version = version + self.request_abort = request_abort diff --git a/customSDK/servicefabric/models/repair_task_delete_description.py b/customSDK/servicefabric/models/repair_task_delete_description.py new file mode 100644 index 0000000..910f4fe --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_delete_description.py @@ -0,0 +1,44 @@ +# 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 msrest.serialization import Model + + +class RepairTaskDeleteDescription(Model): + """Describes a request to delete a completed repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the completed repair task to be + deleted. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current version of the repair task. If zero, then no version check + is performed. + :type version: str + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RepairTaskDeleteDescription, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.version = kwargs.get('version', None) diff --git a/customSDK/servicefabric/models/repair_task_delete_description_py3.py b/customSDK/servicefabric/models/repair_task_delete_description_py3.py new file mode 100644 index 0000000..60ca772 --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_delete_description_py3.py @@ -0,0 +1,44 @@ +# 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 msrest.serialization import Model + + +class RepairTaskDeleteDescription(Model): + """Describes a request to delete a completed repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the completed repair task to be + deleted. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current version of the repair task. If zero, then no version check + is performed. + :type version: str + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, *, task_id: str, version: str=None, **kwargs) -> None: + super(RepairTaskDeleteDescription, self).__init__(**kwargs) + self.task_id = task_id + self.version = version diff --git a/customSDK/servicefabric/models/repair_task_history.py b/customSDK/servicefabric/models/repair_task_history.py new file mode 100644 index 0000000..476516d --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_history.py @@ -0,0 +1,81 @@ +# 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 msrest.serialization import Model + + +class RepairTaskHistory(Model): + """A record of the times when the repair task entered each state. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + :param created_utc_timestamp: The time when the repair task entered the + Created state. + :type created_utc_timestamp: datetime + :param claimed_utc_timestamp: The time when the repair task entered the + Claimed state. + :type claimed_utc_timestamp: datetime + :param preparing_utc_timestamp: The time when the repair task entered the + Preparing state. + :type preparing_utc_timestamp: datetime + :param approved_utc_timestamp: The time when the repair task entered the + Approved state + :type approved_utc_timestamp: datetime + :param executing_utc_timestamp: The time when the repair task entered the + Executing state + :type executing_utc_timestamp: datetime + :param restoring_utc_timestamp: The time when the repair task entered the + Restoring state + :type restoring_utc_timestamp: datetime + :param completed_utc_timestamp: The time when the repair task entered the + Completed state + :type completed_utc_timestamp: datetime + :param preparing_health_check_start_utc_timestamp: The time when the + repair task started the health check in the Preparing state. + :type preparing_health_check_start_utc_timestamp: datetime + :param preparing_health_check_end_utc_timestamp: The time when the repair + task completed the health check in the Preparing state. + :type preparing_health_check_end_utc_timestamp: datetime + :param restoring_health_check_start_utc_timestamp: The time when the + repair task started the health check in the Restoring state. + :type restoring_health_check_start_utc_timestamp: datetime + :param restoring_health_check_end_utc_timestamp: The time when the repair + task completed the health check in the Restoring state. + :type restoring_health_check_end_utc_timestamp: datetime + """ + + _attribute_map = { + 'created_utc_timestamp': {'key': 'CreatedUtcTimestamp', 'type': 'iso-8601'}, + 'claimed_utc_timestamp': {'key': 'ClaimedUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_utc_timestamp': {'key': 'PreparingUtcTimestamp', 'type': 'iso-8601'}, + 'approved_utc_timestamp': {'key': 'ApprovedUtcTimestamp', 'type': 'iso-8601'}, + 'executing_utc_timestamp': {'key': 'ExecutingUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_utc_timestamp': {'key': 'RestoringUtcTimestamp', 'type': 'iso-8601'}, + 'completed_utc_timestamp': {'key': 'CompletedUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_health_check_start_utc_timestamp': {'key': 'PreparingHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_health_check_end_utc_timestamp': {'key': 'PreparingHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_health_check_start_utc_timestamp': {'key': 'RestoringHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_health_check_end_utc_timestamp': {'key': 'RestoringHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RepairTaskHistory, self).__init__(**kwargs) + self.created_utc_timestamp = kwargs.get('created_utc_timestamp', None) + self.claimed_utc_timestamp = kwargs.get('claimed_utc_timestamp', None) + self.preparing_utc_timestamp = kwargs.get('preparing_utc_timestamp', None) + self.approved_utc_timestamp = kwargs.get('approved_utc_timestamp', None) + self.executing_utc_timestamp = kwargs.get('executing_utc_timestamp', None) + self.restoring_utc_timestamp = kwargs.get('restoring_utc_timestamp', None) + self.completed_utc_timestamp = kwargs.get('completed_utc_timestamp', None) + self.preparing_health_check_start_utc_timestamp = kwargs.get('preparing_health_check_start_utc_timestamp', None) + self.preparing_health_check_end_utc_timestamp = kwargs.get('preparing_health_check_end_utc_timestamp', None) + self.restoring_health_check_start_utc_timestamp = kwargs.get('restoring_health_check_start_utc_timestamp', None) + self.restoring_health_check_end_utc_timestamp = kwargs.get('restoring_health_check_end_utc_timestamp', None) diff --git a/customSDK/servicefabric/models/repair_task_history_py3.py b/customSDK/servicefabric/models/repair_task_history_py3.py new file mode 100644 index 0000000..923526b --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_history_py3.py @@ -0,0 +1,81 @@ +# 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 msrest.serialization import Model + + +class RepairTaskHistory(Model): + """A record of the times when the repair task entered each state. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + :param created_utc_timestamp: The time when the repair task entered the + Created state. + :type created_utc_timestamp: datetime + :param claimed_utc_timestamp: The time when the repair task entered the + Claimed state. + :type claimed_utc_timestamp: datetime + :param preparing_utc_timestamp: The time when the repair task entered the + Preparing state. + :type preparing_utc_timestamp: datetime + :param approved_utc_timestamp: The time when the repair task entered the + Approved state + :type approved_utc_timestamp: datetime + :param executing_utc_timestamp: The time when the repair task entered the + Executing state + :type executing_utc_timestamp: datetime + :param restoring_utc_timestamp: The time when the repair task entered the + Restoring state + :type restoring_utc_timestamp: datetime + :param completed_utc_timestamp: The time when the repair task entered the + Completed state + :type completed_utc_timestamp: datetime + :param preparing_health_check_start_utc_timestamp: The time when the + repair task started the health check in the Preparing state. + :type preparing_health_check_start_utc_timestamp: datetime + :param preparing_health_check_end_utc_timestamp: The time when the repair + task completed the health check in the Preparing state. + :type preparing_health_check_end_utc_timestamp: datetime + :param restoring_health_check_start_utc_timestamp: The time when the + repair task started the health check in the Restoring state. + :type restoring_health_check_start_utc_timestamp: datetime + :param restoring_health_check_end_utc_timestamp: The time when the repair + task completed the health check in the Restoring state. + :type restoring_health_check_end_utc_timestamp: datetime + """ + + _attribute_map = { + 'created_utc_timestamp': {'key': 'CreatedUtcTimestamp', 'type': 'iso-8601'}, + 'claimed_utc_timestamp': {'key': 'ClaimedUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_utc_timestamp': {'key': 'PreparingUtcTimestamp', 'type': 'iso-8601'}, + 'approved_utc_timestamp': {'key': 'ApprovedUtcTimestamp', 'type': 'iso-8601'}, + 'executing_utc_timestamp': {'key': 'ExecutingUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_utc_timestamp': {'key': 'RestoringUtcTimestamp', 'type': 'iso-8601'}, + 'completed_utc_timestamp': {'key': 'CompletedUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_health_check_start_utc_timestamp': {'key': 'PreparingHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_health_check_end_utc_timestamp': {'key': 'PreparingHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_health_check_start_utc_timestamp': {'key': 'RestoringHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_health_check_end_utc_timestamp': {'key': 'RestoringHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, created_utc_timestamp=None, claimed_utc_timestamp=None, preparing_utc_timestamp=None, approved_utc_timestamp=None, executing_utc_timestamp=None, restoring_utc_timestamp=None, completed_utc_timestamp=None, preparing_health_check_start_utc_timestamp=None, preparing_health_check_end_utc_timestamp=None, restoring_health_check_start_utc_timestamp=None, restoring_health_check_end_utc_timestamp=None, **kwargs) -> None: + super(RepairTaskHistory, self).__init__(**kwargs) + self.created_utc_timestamp = created_utc_timestamp + self.claimed_utc_timestamp = claimed_utc_timestamp + self.preparing_utc_timestamp = preparing_utc_timestamp + self.approved_utc_timestamp = approved_utc_timestamp + self.executing_utc_timestamp = executing_utc_timestamp + self.restoring_utc_timestamp = restoring_utc_timestamp + self.completed_utc_timestamp = completed_utc_timestamp + self.preparing_health_check_start_utc_timestamp = preparing_health_check_start_utc_timestamp + self.preparing_health_check_end_utc_timestamp = preparing_health_check_end_utc_timestamp + self.restoring_health_check_start_utc_timestamp = restoring_health_check_start_utc_timestamp + self.restoring_health_check_end_utc_timestamp = restoring_health_check_end_utc_timestamp diff --git a/customSDK/servicefabric/models/repair_task_py3.py b/customSDK/servicefabric/models/repair_task_py3.py new file mode 100644 index 0000000..fbcc3c5 --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_py3.py @@ -0,0 +1,153 @@ +# 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 msrest.serialization import Model + + +class RepairTask(Model): + """Represents a repair task, which includes information about what kind of + repair was requested, what its progress is, and what its final result was. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the repair task. + :type task_id: str + :param version: The version of the repair task. + When creating a new repair task, the version must be set to zero. When + updating a repair task, + the version is used for optimistic concurrency checks. If the version is + set to zero, the update will not check for write conflicts. If the + version is set to a non-zero value, then the + update will only succeed if the actual current version of the repair task + matches this value. + :type version: str + :param description: A description of the purpose of the repair task, or + other informational details. + May be set when the repair task is created, and is immutable once set. + :type description: str + :param state: Required. The workflow state of the repair task. Valid + initial states are Created, Claimed, and Preparing. Possible values + include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', + 'Executing', 'Restoring', 'Completed' + :type state: str or ~azure.servicefabric.models.State + :param flags: A bitwise-OR of the following values, which gives additional + details about the status of the repair task. + - 1 - Cancellation of the repair has been requested + - 2 - Abort of the repair has been requested + - 4 - Approval of the repair was forced via client request + :type flags: int + :param action: Required. The requested repair action. Must be specified + when the repair task is created, and is immutable once set. + :type action: str + :param target: The target object determines what actions the system will + take to prepare for the impact of the repair, prior to approving execution + of the repair. + May be set when the repair task is created, and is immutable once set. + :type target: ~azure.servicefabric.models.RepairTargetDescriptionBase + :param executor: The name of the repair executor. Must be specified in + Claimed and later states, and is immutable once set. + :type executor: str + :param executor_data: A data string that the repair executor can use to + store its internal state. + :type executor_data: str + :param impact: The impact object determines what actions the system will + take to prepare for the impact of the repair, prior to approving execution + of the repair. + Impact must be specified by the repair executor when transitioning to the + Preparing state, and is immutable once set. + :type impact: ~azure.servicefabric.models.RepairImpactDescriptionBase + :param result_status: A value describing the overall result of the repair + task execution. Must be specified in the Restoring and later states, and + is immutable once set. Possible values include: 'Invalid', 'Succeeded', + 'Cancelled', 'Interrupted', 'Failed', 'Pending' + :type result_status: str or ~azure.servicefabric.models.ResultStatus + :param result_code: A numeric value providing additional details about the + result of the repair task execution. + May be specified in the Restoring and later states, and is immutable once + set. + :type result_code: int + :param result_details: A string providing additional details about the + result of the repair task execution. + May be specified in the Restoring and later states, and is immutable once + set. + :type result_details: str + :param history: An object that contains timestamps of the repair task's + state transitions. + These timestamps are updated by the system, and cannot be directly + modified. + :type history: ~azure.servicefabric.models.RepairTaskHistory + :param preparing_health_check_state: The workflow state of the health + check when the repair task is in the Preparing state. Possible values + include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + :type preparing_health_check_state: str or + ~azure.servicefabric.models.RepairTaskHealthCheckState + :param restoring_health_check_state: The workflow state of the health + check when the repair task is in the Restoring state. Possible values + include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + :type restoring_health_check_state: str or + ~azure.servicefabric.models.RepairTaskHealthCheckState + :param perform_preparing_health_check: A value to determine if health + checks will be performed when the repair task enters the Preparing state. + :type perform_preparing_health_check: bool + :param perform_restoring_health_check: A value to determine if health + checks will be performed when the repair task enters the Restoring state. + :type perform_restoring_health_check: bool + """ + + _validation = { + 'task_id': {'required': True}, + 'state': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'action': {'key': 'Action', 'type': 'str'}, + 'target': {'key': 'Target', 'type': 'RepairTargetDescriptionBase'}, + 'executor': {'key': 'Executor', 'type': 'str'}, + 'executor_data': {'key': 'ExecutorData', 'type': 'str'}, + 'impact': {'key': 'Impact', 'type': 'RepairImpactDescriptionBase'}, + 'result_status': {'key': 'ResultStatus', 'type': 'str'}, + 'result_code': {'key': 'ResultCode', 'type': 'int'}, + 'result_details': {'key': 'ResultDetails', 'type': 'str'}, + 'history': {'key': 'History', 'type': 'RepairTaskHistory'}, + 'preparing_health_check_state': {'key': 'PreparingHealthCheckState', 'type': 'str'}, + 'restoring_health_check_state': {'key': 'RestoringHealthCheckState', 'type': 'str'}, + 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, + 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, + } + + def __init__(self, *, task_id: str, state, action: str, version: str=None, description: str=None, flags: int=None, target=None, executor: str=None, executor_data: str=None, impact=None, result_status=None, result_code: int=None, result_details: str=None, history=None, preparing_health_check_state=None, restoring_health_check_state=None, perform_preparing_health_check: bool=None, perform_restoring_health_check: bool=None, **kwargs) -> None: + super(RepairTask, self).__init__(**kwargs) + self.task_id = task_id + self.version = version + self.description = description + self.state = state + self.flags = flags + self.action = action + self.target = target + self.executor = executor + self.executor_data = executor_data + self.impact = impact + self.result_status = result_status + self.result_code = result_code + self.result_details = result_details + self.history = history + self.preparing_health_check_state = preparing_health_check_state + self.restoring_health_check_state = restoring_health_check_state + self.perform_preparing_health_check = perform_preparing_health_check + self.perform_restoring_health_check = perform_restoring_health_check diff --git a/customSDK/servicefabric/models/repair_task_update_health_policy_description.py b/customSDK/servicefabric/models/repair_task_update_health_policy_description.py new file mode 100644 index 0000000..6191602 --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_update_health_policy_description.py @@ -0,0 +1,57 @@ +# 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 msrest.serialization import Model + + +class RepairTaskUpdateHealthPolicyDescription(Model): + """Describes a request to update the health policy of a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the repair task to be updated. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current value of the repair task. If zero, then no version check is + performed. + :type version: str + :param perform_preparing_health_check: A boolean indicating if health + check is to be performed in the Preparing stage of the repair task. If not + specified the existing value should not be altered. Otherwise, specify the + desired new value. + :type perform_preparing_health_check: bool + :param perform_restoring_health_check: A boolean indicating if health + check is to be performed in the Restoring stage of the repair task. If not + specified the existing value should not be altered. Otherwise, specify the + desired new value. + :type perform_restoring_health_check: bool + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, + 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RepairTaskUpdateHealthPolicyDescription, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.version = kwargs.get('version', None) + self.perform_preparing_health_check = kwargs.get('perform_preparing_health_check', None) + self.perform_restoring_health_check = kwargs.get('perform_restoring_health_check', None) diff --git a/customSDK/servicefabric/models/repair_task_update_health_policy_description_py3.py b/customSDK/servicefabric/models/repair_task_update_health_policy_description_py3.py new file mode 100644 index 0000000..58615aa --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_update_health_policy_description_py3.py @@ -0,0 +1,57 @@ +# 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 msrest.serialization import Model + + +class RepairTaskUpdateHealthPolicyDescription(Model): + """Describes a request to update the health policy of a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the repair task to be updated. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current value of the repair task. If zero, then no version check is + performed. + :type version: str + :param perform_preparing_health_check: A boolean indicating if health + check is to be performed in the Preparing stage of the repair task. If not + specified the existing value should not be altered. Otherwise, specify the + desired new value. + :type perform_preparing_health_check: bool + :param perform_restoring_health_check: A boolean indicating if health + check is to be performed in the Restoring stage of the repair task. If not + specified the existing value should not be altered. Otherwise, specify the + desired new value. + :type perform_restoring_health_check: bool + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, + 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, + } + + def __init__(self, *, task_id: str, version: str=None, perform_preparing_health_check: bool=None, perform_restoring_health_check: bool=None, **kwargs) -> None: + super(RepairTaskUpdateHealthPolicyDescription, self).__init__(**kwargs) + self.task_id = task_id + self.version = version + self.perform_preparing_health_check = perform_preparing_health_check + self.perform_restoring_health_check = perform_restoring_health_check diff --git a/customSDK/servicefabric/models/repair_task_update_info.py b/customSDK/servicefabric/models/repair_task_update_info.py new file mode 100644 index 0000000..e034e7c --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_update_info.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class RepairTaskUpdateInfo(Model): + """Describes the result of an operation that created or updated a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param version: Required. The new version of the repair task. + :type version: str + """ + + _validation = { + 'version': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RepairTaskUpdateInfo, self).__init__(**kwargs) + self.version = kwargs.get('version', None) diff --git a/customSDK/servicefabric/models/repair_task_update_info_py3.py b/customSDK/servicefabric/models/repair_task_update_info_py3.py new file mode 100644 index 0000000..6d3897b --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_update_info_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class RepairTaskUpdateInfo(Model): + """Describes the result of an operation that created or updated a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param version: Required. The new version of the repair task. + :type version: str + """ + + _validation = { + 'version': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, *, version: str, **kwargs) -> None: + super(RepairTaskUpdateInfo, self).__init__(**kwargs) + self.version = version diff --git a/customSDK/servicefabric/models/replica_event.py b/customSDK/servicefabric/models/replica_event.py new file mode 100644 index 0000000..62dbd95 --- /dev/null +++ b/customSDK/servicefabric/models/replica_event.py @@ -0,0 +1,81 @@ +# 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 .fabric_event import FabricEvent + + +class ReplicaEvent(FabricEvent): + """Represents the base for all Replica Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulReplicaNewHealthReportEvent, + StatefulReplicaHealthReportExpiredEvent, + StatelessReplicaNewHealthReportEvent, + StatelessReplicaHealthReportExpiredEvent, + ChaosReplicaRemovalScheduledEvent, ChaosReplicaRestartScheduledEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + } + + _subtype_map = { + 'kind': {'StatefulReplicaNewHealthReport': 'StatefulReplicaNewHealthReportEvent', 'StatefulReplicaHealthReportExpired': 'StatefulReplicaHealthReportExpiredEvent', 'StatelessReplicaNewHealthReport': 'StatelessReplicaNewHealthReportEvent', 'StatelessReplicaHealthReportExpired': 'StatelessReplicaHealthReportExpiredEvent', 'ChaosReplicaRemovalScheduled': 'ChaosReplicaRemovalScheduledEvent', 'ChaosReplicaRestartScheduled': 'ChaosReplicaRestartScheduledEvent'} + } + + def __init__(self, **kwargs): + super(ReplicaEvent, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.replica_id = kwargs.get('replica_id', None) + self.kind = 'ReplicaEvent' diff --git a/customSDK/servicefabric/models/replica_event_py3.py b/customSDK/servicefabric/models/replica_event_py3.py new file mode 100644 index 0000000..e9f5342 --- /dev/null +++ b/customSDK/servicefabric/models/replica_event_py3.py @@ -0,0 +1,81 @@ +# 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 .fabric_event_py3 import FabricEvent + + +class ReplicaEvent(FabricEvent): + """Represents the base for all Replica Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulReplicaNewHealthReportEvent, + StatefulReplicaHealthReportExpiredEvent, + StatelessReplicaNewHealthReportEvent, + StatelessReplicaHealthReportExpiredEvent, + ChaosReplicaRemovalScheduledEvent, ChaosReplicaRestartScheduledEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + } + + _subtype_map = { + 'kind': {'StatefulReplicaNewHealthReport': 'StatefulReplicaNewHealthReportEvent', 'StatefulReplicaHealthReportExpired': 'StatefulReplicaHealthReportExpiredEvent', 'StatelessReplicaNewHealthReport': 'StatelessReplicaNewHealthReportEvent', 'StatelessReplicaHealthReportExpired': 'StatelessReplicaHealthReportExpiredEvent', 'ChaosReplicaRemovalScheduled': 'ChaosReplicaRemovalScheduledEvent', 'ChaosReplicaRestartScheduled': 'ChaosReplicaRestartScheduledEvent'} + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ReplicaEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.partition_id = partition_id + self.replica_id = replica_id + self.kind = 'ReplicaEvent' diff --git a/customSDK/servicefabric/models/replica_health.py b/customSDK/servicefabric/models/replica_health.py new file mode 100644 index 0000000..5555190 --- /dev/null +++ b/customSDK/servicefabric/models/replica_health.py @@ -0,0 +1,71 @@ +# 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 .entity_health import EntityHealth + + +class ReplicaHealth(EntityHealth): + """Represents a base class for stateful service replica or stateless service + instance health. + Contains the replica aggregated health state, the health events and the + unhealthy evaluations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaHealth, + StatelessServiceInstanceHealth + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param partition_id: Id of the partition to which this replica belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaHealth', 'Stateless': 'StatelessServiceInstanceHealth'} + } + + def __init__(self, **kwargs): + super(ReplicaHealth, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.service_kind = None + self.service_kind = 'ReplicaHealth' diff --git a/customSDK/servicefabric/models/replica_health_evaluation.py b/customSDK/servicefabric/models/replica_health_evaluation.py new file mode 100644 index 0000000..6799d1a --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_evaluation.py @@ -0,0 +1,72 @@ +# 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 .health_evaluation import HealthEvaluation + + +class ReplicaHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a replica, containing information about + the data and the algorithm used by health store to evaluate health. The + evaluation is returned only when the aggregated health state is either + Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition to which the replica belongs. + :type partition_id: str + :param replica_or_instance_id: Id of a stateful service replica or a + stateless service instance. This ID is used in the queries that apply to + both stateful and stateless services. It is used by Service Fabric to + uniquely identify a replica of a partition of a stateful service or an + instance of a stateless service partition. It is unique within a partition + and does not change for the lifetime of the replica or the instance. If a + stateful replica gets dropped and another replica gets created on the same + node for the same partition, it will get a different value for the ID. If + a stateless instance is failed over on the same or different node it will + get a different value for the ID. + :type replica_or_instance_id: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the replica. The types of the + unhealthy evaluations can be EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(ReplicaHealthEvaluation, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.replica_or_instance_id = kwargs.get('replica_or_instance_id', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Replica' diff --git a/customSDK/servicefabric/models/replica_health_evaluation_py3.py b/customSDK/servicefabric/models/replica_health_evaluation_py3.py new file mode 100644 index 0000000..3f8641a --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_evaluation_py3.py @@ -0,0 +1,72 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class ReplicaHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a replica, containing information about + the data and the algorithm used by health store to evaluate health. The + evaluation is returned only when the aggregated health state is either + Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition to which the replica belongs. + :type partition_id: str + :param replica_or_instance_id: Id of a stateful service replica or a + stateless service instance. This ID is used in the queries that apply to + both stateful and stateless services. It is used by Service Fabric to + uniquely identify a replica of a partition of a stateful service or an + instance of a stateless service partition. It is unique within a partition + and does not change for the lifetime of the replica or the instance. If a + stateful replica gets dropped and another replica gets created on the same + node for the same partition, it will get a different value for the ID. If + a stateless instance is failed over on the same or different node it will + get a different value for the ID. + :type replica_or_instance_id: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the replica. The types of the + unhealthy evaluations can be EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, partition_id: str=None, replica_or_instance_id: str=None, unhealthy_evaluations=None, **kwargs) -> None: + super(ReplicaHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.partition_id = partition_id + self.replica_or_instance_id = replica_or_instance_id + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Replica' diff --git a/customSDK/servicefabric/models/replica_health_py3.py b/customSDK/servicefabric/models/replica_health_py3.py new file mode 100644 index 0000000..1e67205 --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_py3.py @@ -0,0 +1,71 @@ +# 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 .entity_health_py3 import EntityHealth + + +class ReplicaHealth(EntityHealth): + """Represents a base class for stateful service replica or stateless service + instance health. + Contains the replica aggregated health state, the health events and the + unhealthy evaluations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaHealth, + StatelessServiceInstanceHealth + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param partition_id: Id of the partition to which this replica belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaHealth', 'Stateless': 'StatelessServiceInstanceHealth'} + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, **kwargs) -> None: + super(ReplicaHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.partition_id = partition_id + self.service_kind = None + self.service_kind = 'ReplicaHealth' diff --git a/customSDK/servicefabric/models/replica_health_state.py b/customSDK/servicefabric/models/replica_health_state.py new file mode 100644 index 0000000..6f21de2 --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_state.py @@ -0,0 +1,56 @@ +# 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 .entity_health_state import EntityHealthState + + +class ReplicaHealthState(EntityHealthState): + """Represents a base class for stateful service replica or stateless service + instance health state. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaHealthState, + StatelessServiceInstanceHealthState + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param partition_id: The ID of the partition to which this replica + belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaHealthState', 'Stateless': 'StatelessServiceInstanceHealthState'} + } + + def __init__(self, **kwargs): + super(ReplicaHealthState, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.service_kind = None + self.service_kind = 'ReplicaHealthState' diff --git a/customSDK/servicefabric/models/replica_health_state_chunk.py b/customSDK/servicefabric/models/replica_health_state_chunk.py new file mode 100644 index 0000000..8f3b8e9 --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_state_chunk.py @@ -0,0 +1,45 @@ +# 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 .entity_health_state_chunk import EntityHealthStateChunk + + +class ReplicaHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a stateful service replica or a + stateless service instance. + The replica health state contains the replica ID and its aggregated health + state. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param replica_or_instance_id: Id of a stateful service replica or a + stateless service instance. This ID is used in the queries that apply to + both stateful and stateless services. It is used by Service Fabric to + uniquely identify a replica of a partition of a stateful service or an + instance of a stateless service partition. It is unique within a partition + and does not change for the lifetime of the replica or the instance. If a + stateful replica gets dropped and another replica gets created on the same + node for the same partition, it will get a different value for the ID. If + a stateless instance is failed over on the same or different node it will + get a different value for the ID. + :type replica_or_instance_id: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ReplicaHealthStateChunk, self).__init__(**kwargs) + self.replica_or_instance_id = kwargs.get('replica_or_instance_id', None) diff --git a/customSDK/servicefabric/models/replica_health_state_chunk_list.py b/customSDK/servicefabric/models/replica_health_state_chunk_list.py new file mode 100644 index 0000000..6f8ba7e --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_state_chunk_list.py @@ -0,0 +1,30 @@ +# 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 msrest.serialization import Model + + +class ReplicaHealthStateChunkList(Model): + """The list of replica health state chunks that respect the input filters in + the chunk query. Returned by get cluster health state chunks query. + + :param items: The list of replica health state chunks that respect the + input filters in the chunk query. + :type items: list[~azure.servicefabric.models.ReplicaHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[ReplicaHealthStateChunk]'}, + } + + def __init__(self, **kwargs): + super(ReplicaHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/replica_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/replica_health_state_chunk_list_py3.py new file mode 100644 index 0000000..90e8476 --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_state_chunk_list_py3.py @@ -0,0 +1,30 @@ +# 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 msrest.serialization import Model + + +class ReplicaHealthStateChunkList(Model): + """The list of replica health state chunks that respect the input filters in + the chunk query. Returned by get cluster health state chunks query. + + :param items: The list of replica health state chunks that respect the + input filters in the chunk query. + :type items: list[~azure.servicefabric.models.ReplicaHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[ReplicaHealthStateChunk]'}, + } + + def __init__(self, *, items=None, **kwargs) -> None: + super(ReplicaHealthStateChunkList, self).__init__(**kwargs) + self.items = items diff --git a/customSDK/servicefabric/models/replica_health_state_chunk_py3.py b/customSDK/servicefabric/models/replica_health_state_chunk_py3.py new file mode 100644 index 0000000..8a21181 --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_state_chunk_py3.py @@ -0,0 +1,45 @@ +# 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 .entity_health_state_chunk_py3 import EntityHealthStateChunk + + +class ReplicaHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a stateful service replica or a + stateless service instance. + The replica health state contains the replica ID and its aggregated health + state. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param replica_or_instance_id: Id of a stateful service replica or a + stateless service instance. This ID is used in the queries that apply to + both stateful and stateless services. It is used by Service Fabric to + uniquely identify a replica of a partition of a stateful service or an + instance of a stateless service partition. It is unique within a partition + and does not change for the lifetime of the replica or the instance. If a + stateful replica gets dropped and another replica gets created on the same + node for the same partition, it will get a different value for the ID. If + a stateless instance is failed over on the same or different node it will + get a different value for the ID. + :type replica_or_instance_id: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, + } + + def __init__(self, *, health_state=None, replica_or_instance_id: str=None, **kwargs) -> None: + super(ReplicaHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.replica_or_instance_id = replica_or_instance_id diff --git a/customSDK/servicefabric/models/replica_health_state_filter.py b/customSDK/servicefabric/models/replica_health_state_filter.py new file mode 100644 index 0000000..c736e81 --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_state_filter.py @@ -0,0 +1,71 @@ +# 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 msrest.serialization import Model + + +class ReplicaHealthStateFilter(Model): + """Defines matching criteria to determine whether a replica should be included + as a child of a partition in the cluster health chunk. + The replicas are only returned if the parent entities match a filter + specified in the cluster health chunk query description. The parent + partition, service and application must be included in the cluster health + chunk. + One filter can match zero, one or multiple replicas, depending on its + properties. + + :param replica_or_instance_id_filter: Id of the stateful service replica + or stateless service instance that matches the filter. The filter is + applied only to the specified replica, if it exists. + If the replica doesn't exist, no replica is returned in the cluster health + chunk based on this filter. + If the replica exists, it is included in the cluster health chunk if it + respects the other filter properties. + If not specified, all replicas that match the parent filters (if any) are + taken into consideration and matched against the other filter members, + like health state filter. + :type replica_or_instance_id_filter: str + :param health_state_filter: The filter for the health state of the + replicas. It allows selecting replicas if they match the desired health + states. + The possible values are integer value of one of the following health + states. Only replicas that match the filter are returned. All replicas are + used to evaluate the parent partition aggregated health state. + If not specified, default value is None, unless the replica ID is + specified. If the filter has default value and replica ID is specified, + the matching replica is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches replicas with + HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + """ + + _attribute_map = { + 'replica_or_instance_id_filter': {'key': 'ReplicaOrInstanceIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ReplicaHealthStateFilter, self).__init__(**kwargs) + self.replica_or_instance_id_filter = kwargs.get('replica_or_instance_id_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) diff --git a/customSDK/servicefabric/models/replica_health_state_filter_py3.py b/customSDK/servicefabric/models/replica_health_state_filter_py3.py new file mode 100644 index 0000000..29a2950 --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_state_filter_py3.py @@ -0,0 +1,71 @@ +# 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 msrest.serialization import Model + + +class ReplicaHealthStateFilter(Model): + """Defines matching criteria to determine whether a replica should be included + as a child of a partition in the cluster health chunk. + The replicas are only returned if the parent entities match a filter + specified in the cluster health chunk query description. The parent + partition, service and application must be included in the cluster health + chunk. + One filter can match zero, one or multiple replicas, depending on its + properties. + + :param replica_or_instance_id_filter: Id of the stateful service replica + or stateless service instance that matches the filter. The filter is + applied only to the specified replica, if it exists. + If the replica doesn't exist, no replica is returned in the cluster health + chunk based on this filter. + If the replica exists, it is included in the cluster health chunk if it + respects the other filter properties. + If not specified, all replicas that match the parent filters (if any) are + taken into consideration and matched against the other filter members, + like health state filter. + :type replica_or_instance_id_filter: str + :param health_state_filter: The filter for the health state of the + replicas. It allows selecting replicas if they match the desired health + states. + The possible values are integer value of one of the following health + states. Only replicas that match the filter are returned. All replicas are + used to evaluate the parent partition aggregated health state. + If not specified, default value is None, unless the replica ID is + specified. If the filter has default value and replica ID is specified, + the matching replica is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches replicas with + HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + """ + + _attribute_map = { + 'replica_or_instance_id_filter': {'key': 'ReplicaOrInstanceIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__(self, *, replica_or_instance_id_filter: str=None, health_state_filter: int=0, **kwargs) -> None: + super(ReplicaHealthStateFilter, self).__init__(**kwargs) + self.replica_or_instance_id_filter = replica_or_instance_id_filter + self.health_state_filter = health_state_filter diff --git a/customSDK/servicefabric/models/replica_health_state_py3.py b/customSDK/servicefabric/models/replica_health_state_py3.py new file mode 100644 index 0000000..f9e5cad --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_state_py3.py @@ -0,0 +1,56 @@ +# 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 .entity_health_state_py3 import EntityHealthState + + +class ReplicaHealthState(EntityHealthState): + """Represents a base class for stateful service replica or stateless service + instance health state. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaHealthState, + StatelessServiceInstanceHealthState + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param partition_id: The ID of the partition to which this replica + belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaHealthState', 'Stateless': 'StatelessServiceInstanceHealthState'} + } + + def __init__(self, *, aggregated_health_state=None, partition_id: str=None, **kwargs) -> None: + super(ReplicaHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.partition_id = partition_id + self.service_kind = None + self.service_kind = 'ReplicaHealthState' diff --git a/customSDK/servicefabric/models/replica_info.py b/customSDK/servicefabric/models/replica_info.py new file mode 100644 index 0000000..ac8fde7 --- /dev/null +++ b/customSDK/servicefabric/models/replica_info.py @@ -0,0 +1,67 @@ +# 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 msrest.serialization import Model + + +class ReplicaInfo(Model): + """Information about the identity, status, health, node name, uptime, and + other details about the replica. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaInfo, StatelessServiceInstanceInfo + + All required parameters must be populated in order to send to Azure. + + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param address: The address the replica is listening on. + :type address: str + :param last_in_build_duration_in_seconds: The last in build duration of + the replica in seconds. + :type last_in_build_duration_in_seconds: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaInfo', 'Stateless': 'StatelessServiceInstanceInfo'} + } + + def __init__(self, **kwargs): + super(ReplicaInfo, self).__init__(**kwargs) + self.replica_status = kwargs.get('replica_status', None) + self.health_state = kwargs.get('health_state', None) + self.node_name = kwargs.get('node_name', None) + self.address = kwargs.get('address', None) + self.last_in_build_duration_in_seconds = kwargs.get('last_in_build_duration_in_seconds', None) + self.service_kind = None diff --git a/customSDK/servicefabric/models/replica_info_py3.py b/customSDK/servicefabric/models/replica_info_py3.py new file mode 100644 index 0000000..d27367c --- /dev/null +++ b/customSDK/servicefabric/models/replica_info_py3.py @@ -0,0 +1,67 @@ +# 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 msrest.serialization import Model + + +class ReplicaInfo(Model): + """Information about the identity, status, health, node name, uptime, and + other details about the replica. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaInfo, StatelessServiceInstanceInfo + + All required parameters must be populated in order to send to Azure. + + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param address: The address the replica is listening on. + :type address: str + :param last_in_build_duration_in_seconds: The last in build duration of + the replica in seconds. + :type last_in_build_duration_in_seconds: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaInfo', 'Stateless': 'StatelessServiceInstanceInfo'} + } + + def __init__(self, *, replica_status=None, health_state=None, node_name: str=None, address: str=None, last_in_build_duration_in_seconds: str=None, **kwargs) -> None: + super(ReplicaInfo, self).__init__(**kwargs) + self.replica_status = replica_status + self.health_state = health_state + self.node_name = node_name + self.address = address + self.last_in_build_duration_in_seconds = last_in_build_duration_in_seconds + self.service_kind = None diff --git a/customSDK/servicefabric/models/replica_lifecycle_description.py b/customSDK/servicefabric/models/replica_lifecycle_description.py new file mode 100644 index 0000000..e82aa2b --- /dev/null +++ b/customSDK/servicefabric/models/replica_lifecycle_description.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class ReplicaLifecycleDescription(Model): + """Describes how the replica will behave. + + :param is_singleton_replica_move_allowed_during_upgrade: If set to true, + replicas with a target replica set size of 1 will be permitted to move + during upgrade. + :type is_singleton_replica_move_allowed_during_upgrade: bool + :param restore_replica_location_after_upgrade: If set to true, move/swap + replica to original location after upgrade. + :type restore_replica_location_after_upgrade: bool + """ + + _attribute_map = { + 'is_singleton_replica_move_allowed_during_upgrade': {'key': 'IsSingletonReplicaMoveAllowedDuringUpgrade', 'type': 'bool'}, + 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ReplicaLifecycleDescription, self).__init__(**kwargs) + self.is_singleton_replica_move_allowed_during_upgrade = kwargs.get('is_singleton_replica_move_allowed_during_upgrade', None) + self.restore_replica_location_after_upgrade = kwargs.get('restore_replica_location_after_upgrade', None) diff --git a/customSDK/servicefabric/models/replica_lifecycle_description_py3.py b/customSDK/servicefabric/models/replica_lifecycle_description_py3.py new file mode 100644 index 0000000..9bec34e --- /dev/null +++ b/customSDK/servicefabric/models/replica_lifecycle_description_py3.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class ReplicaLifecycleDescription(Model): + """Describes how the replica will behave. + + :param is_singleton_replica_move_allowed_during_upgrade: If set to true, + replicas with a target replica set size of 1 will be permitted to move + during upgrade. + :type is_singleton_replica_move_allowed_during_upgrade: bool + :param restore_replica_location_after_upgrade: If set to true, move/swap + replica to original location after upgrade. + :type restore_replica_location_after_upgrade: bool + """ + + _attribute_map = { + 'is_singleton_replica_move_allowed_during_upgrade': {'key': 'IsSingletonReplicaMoveAllowedDuringUpgrade', 'type': 'bool'}, + 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + } + + def __init__(self, *, is_singleton_replica_move_allowed_during_upgrade: bool=None, restore_replica_location_after_upgrade: bool=None, **kwargs) -> None: + super(ReplicaLifecycleDescription, self).__init__(**kwargs) + self.is_singleton_replica_move_allowed_during_upgrade = is_singleton_replica_move_allowed_during_upgrade + self.restore_replica_location_after_upgrade = restore_replica_location_after_upgrade diff --git a/customSDK/servicefabric/models/replica_metric_load_description.py b/customSDK/servicefabric/models/replica_metric_load_description.py new file mode 100644 index 0000000..4497ccb --- /dev/null +++ b/customSDK/servicefabric/models/replica_metric_load_description.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class ReplicaMetricLoadDescription(Model): + """Specifies metric loads of a partition's specific secondary replica or + instance. + + :param node_name: Node name of a specific secondary replica or instance. + :type node_name: str + :param replica_or_instance_load_entries: Loads of a different metrics for + a partition's secondary replica or instance. + :type replica_or_instance_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'replica_or_instance_load_entries': {'key': 'ReplicaOrInstanceLoadEntries', 'type': '[MetricLoadDescription]'}, + } + + def __init__(self, **kwargs): + super(ReplicaMetricLoadDescription, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.replica_or_instance_load_entries = kwargs.get('replica_or_instance_load_entries', None) diff --git a/customSDK/servicefabric/models/replica_metric_load_description_py3.py b/customSDK/servicefabric/models/replica_metric_load_description_py3.py new file mode 100644 index 0000000..8ac6133 --- /dev/null +++ b/customSDK/servicefabric/models/replica_metric_load_description_py3.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class ReplicaMetricLoadDescription(Model): + """Specifies metric loads of a partition's specific secondary replica or + instance. + + :param node_name: Node name of a specific secondary replica or instance. + :type node_name: str + :param replica_or_instance_load_entries: Loads of a different metrics for + a partition's secondary replica or instance. + :type replica_or_instance_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'replica_or_instance_load_entries': {'key': 'ReplicaOrInstanceLoadEntries', 'type': '[MetricLoadDescription]'}, + } + + def __init__(self, *, node_name: str=None, replica_or_instance_load_entries=None, **kwargs) -> None: + super(ReplicaMetricLoadDescription, self).__init__(**kwargs) + self.node_name = node_name + self.replica_or_instance_load_entries = replica_or_instance_load_entries diff --git a/customSDK/servicefabric/models/replica_status_base.py b/customSDK/servicefabric/models/replica_status_base.py new file mode 100644 index 0000000..e95b500 --- /dev/null +++ b/customSDK/servicefabric/models/replica_status_base.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class ReplicaStatusBase(Model): + """Information about the replica. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: KeyValueStoreReplicaStatus + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'KeyValueStore': 'KeyValueStoreReplicaStatus'} + } + + def __init__(self, **kwargs): + super(ReplicaStatusBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/replica_status_base_py3.py b/customSDK/servicefabric/models/replica_status_base_py3.py new file mode 100644 index 0000000..f279cb3 --- /dev/null +++ b/customSDK/servicefabric/models/replica_status_base_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class ReplicaStatusBase(Model): + """Information about the replica. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: KeyValueStoreReplicaStatus + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'KeyValueStore': 'KeyValueStoreReplicaStatus'} + } + + def __init__(self, **kwargs) -> None: + super(ReplicaStatusBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/replicas_health_evaluation.py b/customSDK/servicefabric/models/replicas_health_evaluation.py new file mode 100644 index 0000000..7987191 --- /dev/null +++ b/customSDK/servicefabric/models/replicas_health_evaluation.py @@ -0,0 +1,66 @@ +# 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 .health_evaluation import HealthEvaluation + + +class ReplicasHealthEvaluation(HealthEvaluation): + """Represents health evaluation for replicas, containing health evaluations + for each unhealthy replica that impacted current aggregated health state. + Can be returned when evaluating partition health and the aggregated health + state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_replicas_per_partition: Maximum allowed + percentage of unhealthy replicas per partition from the + ApplicationHealthPolicy. + :type max_percent_unhealthy_replicas_per_partition: int + :param total_count: Total number of replicas in the partition from the + health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + ReplicaHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(ReplicasHealthEvaluation, self).__init__(**kwargs) + self.max_percent_unhealthy_replicas_per_partition = kwargs.get('max_percent_unhealthy_replicas_per_partition', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Replicas' diff --git a/customSDK/servicefabric/models/replicas_health_evaluation_py3.py b/customSDK/servicefabric/models/replicas_health_evaluation_py3.py new file mode 100644 index 0000000..4cc1aa3 --- /dev/null +++ b/customSDK/servicefabric/models/replicas_health_evaluation_py3.py @@ -0,0 +1,66 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class ReplicasHealthEvaluation(HealthEvaluation): + """Represents health evaluation for replicas, containing health evaluations + for each unhealthy replica that impacted current aggregated health state. + Can be returned when evaluating partition health and the aggregated health + state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_replicas_per_partition: Maximum allowed + percentage of unhealthy replicas per partition from the + ApplicationHealthPolicy. + :type max_percent_unhealthy_replicas_per_partition: int + :param total_count: Total number of replicas in the partition from the + health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + ReplicaHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_replicas_per_partition: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(ReplicasHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.max_percent_unhealthy_replicas_per_partition = max_percent_unhealthy_replicas_per_partition + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Replicas' diff --git a/customSDK/servicefabric/models/replicator_queue_status.py b/customSDK/servicefabric/models/replicator_queue_status.py new file mode 100644 index 0000000..043c067 --- /dev/null +++ b/customSDK/servicefabric/models/replicator_queue_status.py @@ -0,0 +1,70 @@ +# 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 msrest.serialization import Model + + +class ReplicatorQueueStatus(Model): + """Provides various statistics of the queue used in the service fabric + replicator. + Contains information about the service fabric replicator like the + replication/copy queue utilization, last acknowledgement received + timestamp, etc. + Depending on the role of the replicator, the properties in this type imply + different meanings. + + :param queue_utilization_percentage: Represents the utilization of the + queue. A value of 0 indicates that the queue is empty and a value of 100 + indicates the queue is full. + :type queue_utilization_percentage: int + :param queue_memory_size: Represents the virtual memory consumed by the + queue in bytes. + :type queue_memory_size: str + :param first_sequence_number: On a primary replicator, this is + semantically the sequence number of the operation for which all the + secondary replicas have sent an acknowledgement. + On a secondary replicator, this is the smallest sequence number of the + operation that is present in the queue. + :type first_sequence_number: str + :param completed_sequence_number: On a primary replicator, this is + semantically the highest sequence number of the operation for which all + the secondary replicas have sent an acknowledgement. + On a secondary replicator, this is semantically the highest sequence + number that has been applied to the persistent state. + :type completed_sequence_number: str + :param committed_sequence_number: On a primary replicator, this is + semantically the highest sequence number of the operation for which a + write quorum of the secondary replicas have sent an acknowledgement. + On a secondary replicator, this is semantically the highest sequence + number of the in-order operation received from the primary. + :type committed_sequence_number: str + :param last_sequence_number: Represents the latest sequence number of the + operation that is available in the queue. + :type last_sequence_number: str + """ + + _attribute_map = { + 'queue_utilization_percentage': {'key': 'QueueUtilizationPercentage', 'type': 'int'}, + 'queue_memory_size': {'key': 'QueueMemorySize', 'type': 'str'}, + 'first_sequence_number': {'key': 'FirstSequenceNumber', 'type': 'str'}, + 'completed_sequence_number': {'key': 'CompletedSequenceNumber', 'type': 'str'}, + 'committed_sequence_number': {'key': 'CommittedSequenceNumber', 'type': 'str'}, + 'last_sequence_number': {'key': 'LastSequenceNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ReplicatorQueueStatus, self).__init__(**kwargs) + self.queue_utilization_percentage = kwargs.get('queue_utilization_percentage', None) + self.queue_memory_size = kwargs.get('queue_memory_size', None) + self.first_sequence_number = kwargs.get('first_sequence_number', None) + self.completed_sequence_number = kwargs.get('completed_sequence_number', None) + self.committed_sequence_number = kwargs.get('committed_sequence_number', None) + self.last_sequence_number = kwargs.get('last_sequence_number', None) diff --git a/customSDK/servicefabric/models/replicator_queue_status_py3.py b/customSDK/servicefabric/models/replicator_queue_status_py3.py new file mode 100644 index 0000000..112316e --- /dev/null +++ b/customSDK/servicefabric/models/replicator_queue_status_py3.py @@ -0,0 +1,70 @@ +# 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 msrest.serialization import Model + + +class ReplicatorQueueStatus(Model): + """Provides various statistics of the queue used in the service fabric + replicator. + Contains information about the service fabric replicator like the + replication/copy queue utilization, last acknowledgement received + timestamp, etc. + Depending on the role of the replicator, the properties in this type imply + different meanings. + + :param queue_utilization_percentage: Represents the utilization of the + queue. A value of 0 indicates that the queue is empty and a value of 100 + indicates the queue is full. + :type queue_utilization_percentage: int + :param queue_memory_size: Represents the virtual memory consumed by the + queue in bytes. + :type queue_memory_size: str + :param first_sequence_number: On a primary replicator, this is + semantically the sequence number of the operation for which all the + secondary replicas have sent an acknowledgement. + On a secondary replicator, this is the smallest sequence number of the + operation that is present in the queue. + :type first_sequence_number: str + :param completed_sequence_number: On a primary replicator, this is + semantically the highest sequence number of the operation for which all + the secondary replicas have sent an acknowledgement. + On a secondary replicator, this is semantically the highest sequence + number that has been applied to the persistent state. + :type completed_sequence_number: str + :param committed_sequence_number: On a primary replicator, this is + semantically the highest sequence number of the operation for which a + write quorum of the secondary replicas have sent an acknowledgement. + On a secondary replicator, this is semantically the highest sequence + number of the in-order operation received from the primary. + :type committed_sequence_number: str + :param last_sequence_number: Represents the latest sequence number of the + operation that is available in the queue. + :type last_sequence_number: str + """ + + _attribute_map = { + 'queue_utilization_percentage': {'key': 'QueueUtilizationPercentage', 'type': 'int'}, + 'queue_memory_size': {'key': 'QueueMemorySize', 'type': 'str'}, + 'first_sequence_number': {'key': 'FirstSequenceNumber', 'type': 'str'}, + 'completed_sequence_number': {'key': 'CompletedSequenceNumber', 'type': 'str'}, + 'committed_sequence_number': {'key': 'CommittedSequenceNumber', 'type': 'str'}, + 'last_sequence_number': {'key': 'LastSequenceNumber', 'type': 'str'}, + } + + def __init__(self, *, queue_utilization_percentage: int=None, queue_memory_size: str=None, first_sequence_number: str=None, completed_sequence_number: str=None, committed_sequence_number: str=None, last_sequence_number: str=None, **kwargs) -> None: + super(ReplicatorQueueStatus, self).__init__(**kwargs) + self.queue_utilization_percentage = queue_utilization_percentage + self.queue_memory_size = queue_memory_size + self.first_sequence_number = first_sequence_number + self.completed_sequence_number = completed_sequence_number + self.committed_sequence_number = committed_sequence_number + self.last_sequence_number = last_sequence_number diff --git a/customSDK/servicefabric/models/replicator_status.py b/customSDK/servicefabric/models/replicator_status.py new file mode 100644 index 0000000..7e1fb2a --- /dev/null +++ b/customSDK/servicefabric/models/replicator_status.py @@ -0,0 +1,44 @@ +# 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 msrest.serialization import Model + + +class ReplicatorStatus(Model): + """Represents a base class for primary or secondary replicator status. + Contains information about the service fabric replicator like the + replication/copy queue utilization, last acknowledgement received + timestamp, etc. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PrimaryReplicatorStatus, SecondaryReplicatorStatus + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Primary': 'PrimaryReplicatorStatus', 'SecondaryReplicatorStatus': 'SecondaryReplicatorStatus'} + } + + def __init__(self, **kwargs): + super(ReplicatorStatus, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/replicator_status_py3.py b/customSDK/servicefabric/models/replicator_status_py3.py new file mode 100644 index 0000000..b11fc83 --- /dev/null +++ b/customSDK/servicefabric/models/replicator_status_py3.py @@ -0,0 +1,44 @@ +# 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 msrest.serialization import Model + + +class ReplicatorStatus(Model): + """Represents a base class for primary or secondary replicator status. + Contains information about the service fabric replicator like the + replication/copy queue utilization, last acknowledgement received + timestamp, etc. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PrimaryReplicatorStatus, SecondaryReplicatorStatus + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Primary': 'PrimaryReplicatorStatus', 'SecondaryReplicatorStatus': 'SecondaryReplicatorStatus'} + } + + def __init__(self, **kwargs) -> None: + super(ReplicatorStatus, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/resolved_service_endpoint.py b/customSDK/servicefabric/models/resolved_service_endpoint.py new file mode 100644 index 0000000..2a06250 --- /dev/null +++ b/customSDK/servicefabric/models/resolved_service_endpoint.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class ResolvedServiceEndpoint(Model): + """Endpoint of a resolved service partition. + + :param kind: The role of the replica where the endpoint is reported. + Possible values include: 'Invalid', 'Stateless', 'StatefulPrimary', + 'StatefulSecondary' + :type kind: str or ~azure.servicefabric.models.ServiceEndpointRole + :param address: The address of the endpoint. If the endpoint has multiple + listeners the address is a JSON object with one property per listener with + the value as the address of that listener. + :type address: str + """ + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResolvedServiceEndpoint, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.address = kwargs.get('address', None) diff --git a/customSDK/servicefabric/models/resolved_service_endpoint_py3.py b/customSDK/servicefabric/models/resolved_service_endpoint_py3.py new file mode 100644 index 0000000..c016e4d --- /dev/null +++ b/customSDK/servicefabric/models/resolved_service_endpoint_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class ResolvedServiceEndpoint(Model): + """Endpoint of a resolved service partition. + + :param kind: The role of the replica where the endpoint is reported. + Possible values include: 'Invalid', 'Stateless', 'StatefulPrimary', + 'StatefulSecondary' + :type kind: str or ~azure.servicefabric.models.ServiceEndpointRole + :param address: The address of the endpoint. If the endpoint has multiple + listeners the address is a JSON object with one property per listener with + the value as the address of that listener. + :type address: str + """ + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + } + + def __init__(self, *, kind=None, address: str=None, **kwargs) -> None: + super(ResolvedServiceEndpoint, self).__init__(**kwargs) + self.kind = kind + self.address = address diff --git a/customSDK/servicefabric/models/resolved_service_partition.py b/customSDK/servicefabric/models/resolved_service_partition.py new file mode 100644 index 0000000..d788d26 --- /dev/null +++ b/customSDK/servicefabric/models/resolved_service_partition.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class ResolvedServicePartition(Model): + """Information about a service partition and its associated endpoints. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The full name of the service with 'fabric:' URI + scheme. + :type name: str + :param partition_information: Required. A representation of the resolved + partition. + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param endpoints: Required. List of resolved service endpoints of a + service partition. + :type endpoints: list[~azure.servicefabric.models.ResolvedServiceEndpoint] + :param version: Required. The version of this resolved service partition + result. This version should be passed in the next time the ResolveService + call is made via the PreviousRspVersion query parameter. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'partition_information': {'required': True}, + 'endpoints': {'required': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'endpoints': {'key': 'Endpoints', 'type': '[ResolvedServiceEndpoint]'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResolvedServicePartition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.partition_information = kwargs.get('partition_information', None) + self.endpoints = kwargs.get('endpoints', None) + self.version = kwargs.get('version', None) diff --git a/customSDK/servicefabric/models/resolved_service_partition_py3.py b/customSDK/servicefabric/models/resolved_service_partition_py3.py new file mode 100644 index 0000000..5b26f0f --- /dev/null +++ b/customSDK/servicefabric/models/resolved_service_partition_py3.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class ResolvedServicePartition(Model): + """Information about a service partition and its associated endpoints. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The full name of the service with 'fabric:' URI + scheme. + :type name: str + :param partition_information: Required. A representation of the resolved + partition. + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param endpoints: Required. List of resolved service endpoints of a + service partition. + :type endpoints: list[~azure.servicefabric.models.ResolvedServiceEndpoint] + :param version: Required. The version of this resolved service partition + result. This version should be passed in the next time the ResolveService + call is made via the PreviousRspVersion query parameter. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'partition_information': {'required': True}, + 'endpoints': {'required': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'endpoints': {'key': 'Endpoints', 'type': '[ResolvedServiceEndpoint]'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, *, name: str, partition_information, endpoints, version: str, **kwargs) -> None: + super(ResolvedServicePartition, self).__init__(**kwargs) + self.name = name + self.partition_information = partition_information + self.endpoints = endpoints + self.version = version diff --git a/customSDK/servicefabric/models/resource_limits.py b/customSDK/servicefabric/models/resource_limits.py new file mode 100644 index 0000000..9653965 --- /dev/null +++ b/customSDK/servicefabric/models/resource_limits.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class ResourceLimits(Model): + """This type describes the resource limits for a given container. It describes + the most amount of resources a container is allowed to use before being + restarted. + + :param memory_in_gb: The memory limit in GB. + :type memory_in_gb: float + :param cpu: CPU limits in cores. At present, only full cores are + supported. + :type cpu: float + """ + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ResourceLimits, self).__init__(**kwargs) + self.memory_in_gb = kwargs.get('memory_in_gb', None) + self.cpu = kwargs.get('cpu', None) diff --git a/customSDK/servicefabric/models/resource_limits_py3.py b/customSDK/servicefabric/models/resource_limits_py3.py new file mode 100644 index 0000000..2817c55 --- /dev/null +++ b/customSDK/servicefabric/models/resource_limits_py3.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class ResourceLimits(Model): + """This type describes the resource limits for a given container. It describes + the most amount of resources a container is allowed to use before being + restarted. + + :param memory_in_gb: The memory limit in GB. + :type memory_in_gb: float + :param cpu: CPU limits in cores. At present, only full cores are + supported. + :type cpu: float + """ + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + } + + def __init__(self, *, memory_in_gb: float=None, cpu: float=None, **kwargs) -> None: + super(ResourceLimits, self).__init__(**kwargs) + self.memory_in_gb = memory_in_gb + self.cpu = cpu diff --git a/customSDK/servicefabric/models/resource_requests.py b/customSDK/servicefabric/models/resource_requests.py new file mode 100644 index 0000000..1a1b725 --- /dev/null +++ b/customSDK/servicefabric/models/resource_requests.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class ResourceRequests(Model): + """This type describes the requested resources for a given container. It + describes the least amount of resources required for the container. A + container can consume more than requested resources up to the specified + limits before being restarted. Currently, the requested resources are + treated as limits. + + All required parameters must be populated in order to send to Azure. + + :param memory_in_gb: Required. The memory request in GB for this + container. + :type memory_in_gb: float + :param cpu: Required. Requested number of CPU cores. At present, only full + cores are supported. + :type cpu: float + """ + + _validation = { + 'memory_in_gb': {'required': True}, + 'cpu': {'required': True}, + } + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ResourceRequests, self).__init__(**kwargs) + self.memory_in_gb = kwargs.get('memory_in_gb', None) + self.cpu = kwargs.get('cpu', None) diff --git a/customSDK/servicefabric/models/resource_requests_py3.py b/customSDK/servicefabric/models/resource_requests_py3.py new file mode 100644 index 0000000..ffa4373 --- /dev/null +++ b/customSDK/servicefabric/models/resource_requests_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class ResourceRequests(Model): + """This type describes the requested resources for a given container. It + describes the least amount of resources required for the container. A + container can consume more than requested resources up to the specified + limits before being restarted. Currently, the requested resources are + treated as limits. + + All required parameters must be populated in order to send to Azure. + + :param memory_in_gb: Required. The memory request in GB for this + container. + :type memory_in_gb: float + :param cpu: Required. Requested number of CPU cores. At present, only full + cores are supported. + :type cpu: float + """ + + _validation = { + 'memory_in_gb': {'required': True}, + 'cpu': {'required': True}, + } + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + } + + def __init__(self, *, memory_in_gb: float, cpu: float, **kwargs) -> None: + super(ResourceRequests, self).__init__(**kwargs) + self.memory_in_gb = memory_in_gb + self.cpu = cpu diff --git a/customSDK/servicefabric/models/resource_requirements.py b/customSDK/servicefabric/models/resource_requirements.py new file mode 100644 index 0000000..e280157 --- /dev/null +++ b/customSDK/servicefabric/models/resource_requirements.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class ResourceRequirements(Model): + """This type describes the resource requirements for a container or a service. + + All required parameters must be populated in order to send to Azure. + + :param requests: Required. Describes the requested resources for a given + container. + :type requests: ~azure.servicefabric.models.ResourceRequests + :param limits: Describes the maximum limits on the resources for a given + container. + :type limits: ~azure.servicefabric.models.ResourceLimits + """ + + _validation = { + 'requests': {'required': True}, + } + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'ResourceRequests'}, + 'limits': {'key': 'limits', 'type': 'ResourceLimits'}, + } + + def __init__(self, **kwargs): + super(ResourceRequirements, self).__init__(**kwargs) + self.requests = kwargs.get('requests', None) + self.limits = kwargs.get('limits', None) diff --git a/customSDK/servicefabric/models/resource_requirements_py3.py b/customSDK/servicefabric/models/resource_requirements_py3.py new file mode 100644 index 0000000..09945aa --- /dev/null +++ b/customSDK/servicefabric/models/resource_requirements_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class ResourceRequirements(Model): + """This type describes the resource requirements for a container or a service. + + All required parameters must be populated in order to send to Azure. + + :param requests: Required. Describes the requested resources for a given + container. + :type requests: ~azure.servicefabric.models.ResourceRequests + :param limits: Describes the maximum limits on the resources for a given + container. + :type limits: ~azure.servicefabric.models.ResourceLimits + """ + + _validation = { + 'requests': {'required': True}, + } + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'ResourceRequests'}, + 'limits': {'key': 'limits', 'type': 'ResourceLimits'}, + } + + def __init__(self, *, requests, limits=None, **kwargs) -> None: + super(ResourceRequirements, self).__init__(**kwargs) + self.requests = requests + self.limits = limits diff --git a/customSDK/servicefabric/models/restart_deployed_code_package_description.py b/customSDK/servicefabric/models/restart_deployed_code_package_description.py new file mode 100644 index 0000000..8f2cf70 --- /dev/null +++ b/customSDK/servicefabric/models/restart_deployed_code_package_description.py @@ -0,0 +1,65 @@ +# 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 msrest.serialization import Model + + +class RestartDeployedCodePackageDescription(Model): + """Defines description for restarting a deployed code package on Service + Fabric node. + + All required parameters must be populated in order to send to Azure. + + :param service_manifest_name: Required. The name of service manifest that + specified this code package. + :type service_manifest_name: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param code_package_name: Required. The name of the code package defined + in the service manifest. + :type code_package_name: str + :param code_package_instance_id: Required. The instance ID for currently + running entry point. For a code package setup entry point (if specified) + runs first and after it finishes main entry point is started. + Each time entry point executable is run, its instance ID will change. If 0 + is passed in as the code package instance ID, the API will restart the + code package with whatever instance ID it is currently running. + If an instance ID other than 0 is passed in, the API will restart the code + package only if the current Instance ID matches the passed in instance ID. + Note, passing in the exact instance ID (not 0) in the API is safer, + because if ensures at most one restart of the code package. + :type code_package_instance_id: str + """ + + _validation = { + 'service_manifest_name': {'required': True}, + 'code_package_name': {'required': True}, + 'code_package_instance_id': {'required': True}, + } + + _attribute_map = { + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'code_package_instance_id': {'key': 'CodePackageInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RestartDeployedCodePackageDescription, self).__init__(**kwargs) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.code_package_name = kwargs.get('code_package_name', None) + self.code_package_instance_id = kwargs.get('code_package_instance_id', None) diff --git a/customSDK/servicefabric/models/restart_deployed_code_package_description_py3.py b/customSDK/servicefabric/models/restart_deployed_code_package_description_py3.py new file mode 100644 index 0000000..6bd6769 --- /dev/null +++ b/customSDK/servicefabric/models/restart_deployed_code_package_description_py3.py @@ -0,0 +1,65 @@ +# 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 msrest.serialization import Model + + +class RestartDeployedCodePackageDescription(Model): + """Defines description for restarting a deployed code package on Service + Fabric node. + + All required parameters must be populated in order to send to Azure. + + :param service_manifest_name: Required. The name of service manifest that + specified this code package. + :type service_manifest_name: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param code_package_name: Required. The name of the code package defined + in the service manifest. + :type code_package_name: str + :param code_package_instance_id: Required. The instance ID for currently + running entry point. For a code package setup entry point (if specified) + runs first and after it finishes main entry point is started. + Each time entry point executable is run, its instance ID will change. If 0 + is passed in as the code package instance ID, the API will restart the + code package with whatever instance ID it is currently running. + If an instance ID other than 0 is passed in, the API will restart the code + package only if the current Instance ID matches the passed in instance ID. + Note, passing in the exact instance ID (not 0) in the API is safer, + because if ensures at most one restart of the code package. + :type code_package_instance_id: str + """ + + _validation = { + 'service_manifest_name': {'required': True}, + 'code_package_name': {'required': True}, + 'code_package_instance_id': {'required': True}, + } + + _attribute_map = { + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'code_package_instance_id': {'key': 'CodePackageInstanceId', 'type': 'str'}, + } + + def __init__(self, *, service_manifest_name: str, code_package_name: str, code_package_instance_id: str, service_package_activation_id: str=None, **kwargs) -> None: + super(RestartDeployedCodePackageDescription, self).__init__(**kwargs) + self.service_manifest_name = service_manifest_name + self.service_package_activation_id = service_package_activation_id + self.code_package_name = code_package_name + self.code_package_instance_id = code_package_instance_id diff --git a/customSDK/servicefabric/models/restart_node_description.py b/customSDK/servicefabric/models/restart_node_description.py new file mode 100644 index 0000000..f913764 --- /dev/null +++ b/customSDK/servicefabric/models/restart_node_description.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class RestartNodeDescription(Model): + """Describes the parameters to restart a Service Fabric node. + + All required parameters must be populated in order to send to Azure. + + :param node_instance_id: Required. The instance ID of the target node. If + instance ID is specified the node is restarted only if it matches with the + current instance of the node. A default value of "0" would match any + instance ID. The instance ID can be obtained using get node query. Default + value: "0" . + :type node_instance_id: str + :param create_fabric_dump: Specify True to create a dump of the fabric + node process. This is case-sensitive. Possible values include: 'False', + 'True'. Default value: "False" . + :type create_fabric_dump: str or + ~azure.servicefabric.models.CreateFabricDump + """ + + _validation = { + 'node_instance_id': {'required': True}, + } + + _attribute_map = { + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + 'create_fabric_dump': {'key': 'CreateFabricDump', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RestartNodeDescription, self).__init__(**kwargs) + self.node_instance_id = kwargs.get('node_instance_id', "0") + self.create_fabric_dump = kwargs.get('create_fabric_dump', "False") diff --git a/customSDK/servicefabric/models/restart_node_description_py3.py b/customSDK/servicefabric/models/restart_node_description_py3.py new file mode 100644 index 0000000..025da59 --- /dev/null +++ b/customSDK/servicefabric/models/restart_node_description_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class RestartNodeDescription(Model): + """Describes the parameters to restart a Service Fabric node. + + All required parameters must be populated in order to send to Azure. + + :param node_instance_id: Required. The instance ID of the target node. If + instance ID is specified the node is restarted only if it matches with the + current instance of the node. A default value of "0" would match any + instance ID. The instance ID can be obtained using get node query. Default + value: "0" . + :type node_instance_id: str + :param create_fabric_dump: Specify True to create a dump of the fabric + node process. This is case-sensitive. Possible values include: 'False', + 'True'. Default value: "False" . + :type create_fabric_dump: str or + ~azure.servicefabric.models.CreateFabricDump + """ + + _validation = { + 'node_instance_id': {'required': True}, + } + + _attribute_map = { + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + 'create_fabric_dump': {'key': 'CreateFabricDump', 'type': 'str'}, + } + + def __init__(self, *, node_instance_id: str="0", create_fabric_dump="False", **kwargs) -> None: + super(RestartNodeDescription, self).__init__(**kwargs) + self.node_instance_id = node_instance_id + self.create_fabric_dump = create_fabric_dump diff --git a/customSDK/servicefabric/models/restart_partition_result.py b/customSDK/servicefabric/models/restart_partition_result.py new file mode 100644 index 0000000..77acab4 --- /dev/null +++ b/customSDK/servicefabric/models/restart_partition_result.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class RestartPartitionResult(Model): + """Represents information about an operation in a terminal state (Completed or + Faulted). + + :param error_code: If OperationState is Completed, this is 0. If + OperationState is Faulted, this is an error code indicating the reason. + :type error_code: int + :param selected_partition: This class returns information about the + partition that the user-induced operation acted upon. + :type selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__(self, **kwargs): + super(RestartPartitionResult, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.selected_partition = kwargs.get('selected_partition', None) diff --git a/customSDK/servicefabric/models/restart_partition_result_py3.py b/customSDK/servicefabric/models/restart_partition_result_py3.py new file mode 100644 index 0000000..0770f44 --- /dev/null +++ b/customSDK/servicefabric/models/restart_partition_result_py3.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class RestartPartitionResult(Model): + """Represents information about an operation in a terminal state (Completed or + Faulted). + + :param error_code: If OperationState is Completed, this is 0. If + OperationState is Faulted, this is an error code indicating the reason. + :type error_code: int + :param selected_partition: This class returns information about the + partition that the user-induced operation acted upon. + :type selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__(self, *, error_code: int=None, selected_partition=None, **kwargs) -> None: + super(RestartPartitionResult, self).__init__(**kwargs) + self.error_code = error_code + self.selected_partition = selected_partition diff --git a/customSDK/servicefabric/models/restore_partition_description.py b/customSDK/servicefabric/models/restore_partition_description.py new file mode 100644 index 0000000..f21fb87 --- /dev/null +++ b/customSDK/servicefabric/models/restore_partition_description.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class RestorePartitionDescription(Model): + """Specifies the parameters needed to trigger a restore of a specific + partition. + + All required parameters must be populated in order to send to Azure. + + :param backup_id: Required. Unique backup ID. + :type backup_id: str + :param backup_location: Required. Location of the backup relative to the + backup storage specified/ configured. + :type backup_location: str + :param backup_storage: Location of the backup from where the partition + will be restored. + :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription + """ + + _validation = { + 'backup_id': {'required': True}, + 'backup_location': {'required': True}, + } + + _attribute_map = { + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, + } + + def __init__(self, **kwargs): + super(RestorePartitionDescription, self).__init__(**kwargs) + self.backup_id = kwargs.get('backup_id', None) + self.backup_location = kwargs.get('backup_location', None) + self.backup_storage = kwargs.get('backup_storage', None) diff --git a/customSDK/servicefabric/models/restore_partition_description_py3.py b/customSDK/servicefabric/models/restore_partition_description_py3.py new file mode 100644 index 0000000..885a6f4 --- /dev/null +++ b/customSDK/servicefabric/models/restore_partition_description_py3.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class RestorePartitionDescription(Model): + """Specifies the parameters needed to trigger a restore of a specific + partition. + + All required parameters must be populated in order to send to Azure. + + :param backup_id: Required. Unique backup ID. + :type backup_id: str + :param backup_location: Required. Location of the backup relative to the + backup storage specified/ configured. + :type backup_location: str + :param backup_storage: Location of the backup from where the partition + will be restored. + :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription + """ + + _validation = { + 'backup_id': {'required': True}, + 'backup_location': {'required': True}, + } + + _attribute_map = { + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, + } + + def __init__(self, *, backup_id: str, backup_location: str, backup_storage=None, **kwargs) -> None: + super(RestorePartitionDescription, self).__init__(**kwargs) + self.backup_id = backup_id + self.backup_location = backup_location + self.backup_storage = backup_storage diff --git a/customSDK/servicefabric/models/restore_progress_info.py b/customSDK/servicefabric/models/restore_progress_info.py new file mode 100644 index 0000000..9d63192 --- /dev/null +++ b/customSDK/servicefabric/models/restore_progress_info.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class RestoreProgressInfo(Model): + """Describes the progress of a restore operation on a partition. + + :param restore_state: Represents the current state of the partition + restore operation. Possible values include: 'Invalid', 'Accepted', + 'RestoreInProgress', 'Success', 'Failure', 'Timeout' + :type restore_state: str or ~azure.servicefabric.models.RestoreState + :param time_stamp_utc: Timestamp when operation succeeded or failed. + :type time_stamp_utc: datetime + :param restored_epoch: Describes the epoch at which the partition is + restored. + :type restored_epoch: ~azure.servicefabric.models.Epoch + :param restored_lsn: Restored LSN. + :type restored_lsn: str + :param failure_error: Denotes the failure encountered in performing + restore operation. + :type failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'restore_state': {'key': 'RestoreState', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'restored_epoch': {'key': 'RestoredEpoch', 'type': 'Epoch'}, + 'restored_lsn': {'key': 'RestoredLsn', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__(self, **kwargs): + super(RestoreProgressInfo, self).__init__(**kwargs) + self.restore_state = kwargs.get('restore_state', None) + self.time_stamp_utc = kwargs.get('time_stamp_utc', None) + self.restored_epoch = kwargs.get('restored_epoch', None) + self.restored_lsn = kwargs.get('restored_lsn', None) + self.failure_error = kwargs.get('failure_error', None) diff --git a/customSDK/servicefabric/models/restore_progress_info_py3.py b/customSDK/servicefabric/models/restore_progress_info_py3.py new file mode 100644 index 0000000..2274e6b --- /dev/null +++ b/customSDK/servicefabric/models/restore_progress_info_py3.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class RestoreProgressInfo(Model): + """Describes the progress of a restore operation on a partition. + + :param restore_state: Represents the current state of the partition + restore operation. Possible values include: 'Invalid', 'Accepted', + 'RestoreInProgress', 'Success', 'Failure', 'Timeout' + :type restore_state: str or ~azure.servicefabric.models.RestoreState + :param time_stamp_utc: Timestamp when operation succeeded or failed. + :type time_stamp_utc: datetime + :param restored_epoch: Describes the epoch at which the partition is + restored. + :type restored_epoch: ~azure.servicefabric.models.Epoch + :param restored_lsn: Restored LSN. + :type restored_lsn: str + :param failure_error: Denotes the failure encountered in performing + restore operation. + :type failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'restore_state': {'key': 'RestoreState', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'restored_epoch': {'key': 'RestoredEpoch', 'type': 'Epoch'}, + 'restored_lsn': {'key': 'RestoredLsn', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__(self, *, restore_state=None, time_stamp_utc=None, restored_epoch=None, restored_lsn: str=None, failure_error=None, **kwargs) -> None: + super(RestoreProgressInfo, self).__init__(**kwargs) + self.restore_state = restore_state + self.time_stamp_utc = time_stamp_utc + self.restored_epoch = restored_epoch + self.restored_lsn = restored_lsn + self.failure_error = failure_error diff --git a/customSDK/servicefabric/models/resume_application_upgrade_description.py b/customSDK/servicefabric/models/resume_application_upgrade_description.py new file mode 100644 index 0000000..ab0851c --- /dev/null +++ b/customSDK/servicefabric/models/resume_application_upgrade_description.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class ResumeApplicationUpgradeDescription(Model): + """Describes the parameters for resuming an unmonitored manual Service Fabric + application upgrade. + + All required parameters must be populated in order to send to Azure. + + :param upgrade_domain_name: Required. The name of the upgrade domain in + which to resume the upgrade. + :type upgrade_domain_name: str + """ + + _validation = { + 'upgrade_domain_name': {'required': True}, + } + + _attribute_map = { + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResumeApplicationUpgradeDescription, self).__init__(**kwargs) + self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) diff --git a/customSDK/servicefabric/models/resume_application_upgrade_description_py3.py b/customSDK/servicefabric/models/resume_application_upgrade_description_py3.py new file mode 100644 index 0000000..7b0aaf3 --- /dev/null +++ b/customSDK/servicefabric/models/resume_application_upgrade_description_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class ResumeApplicationUpgradeDescription(Model): + """Describes the parameters for resuming an unmonitored manual Service Fabric + application upgrade. + + All required parameters must be populated in order to send to Azure. + + :param upgrade_domain_name: Required. The name of the upgrade domain in + which to resume the upgrade. + :type upgrade_domain_name: str + """ + + _validation = { + 'upgrade_domain_name': {'required': True}, + } + + _attribute_map = { + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + } + + def __init__(self, *, upgrade_domain_name: str, **kwargs) -> None: + super(ResumeApplicationUpgradeDescription, self).__init__(**kwargs) + self.upgrade_domain_name = upgrade_domain_name diff --git a/customSDK/servicefabric/models/resume_cluster_upgrade_description.py b/customSDK/servicefabric/models/resume_cluster_upgrade_description.py new file mode 100644 index 0000000..2cd5ab0 --- /dev/null +++ b/customSDK/servicefabric/models/resume_cluster_upgrade_description.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class ResumeClusterUpgradeDescription(Model): + """Describes the parameters for resuming a cluster upgrade. + + All required parameters must be populated in order to send to Azure. + + :param upgrade_domain: Required. The next upgrade domain for this cluster + upgrade. + :type upgrade_domain: str + """ + + _validation = { + 'upgrade_domain': {'required': True}, + } + + _attribute_map = { + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResumeClusterUpgradeDescription, self).__init__(**kwargs) + self.upgrade_domain = kwargs.get('upgrade_domain', None) diff --git a/customSDK/servicefabric/models/resume_cluster_upgrade_description_py3.py b/customSDK/servicefabric/models/resume_cluster_upgrade_description_py3.py new file mode 100644 index 0000000..933f0bf --- /dev/null +++ b/customSDK/servicefabric/models/resume_cluster_upgrade_description_py3.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class ResumeClusterUpgradeDescription(Model): + """Describes the parameters for resuming a cluster upgrade. + + All required parameters must be populated in order to send to Azure. + + :param upgrade_domain: Required. The next upgrade domain for this cluster + upgrade. + :type upgrade_domain: str + """ + + _validation = { + 'upgrade_domain': {'required': True}, + } + + _attribute_map = { + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + } + + def __init__(self, *, upgrade_domain: str, **kwargs) -> None: + super(ResumeClusterUpgradeDescription, self).__init__(**kwargs) + self.upgrade_domain = upgrade_domain diff --git a/customSDK/servicefabric/models/retention_policy_description.py b/customSDK/servicefabric/models/retention_policy_description.py new file mode 100644 index 0000000..b1a6a7d --- /dev/null +++ b/customSDK/servicefabric/models/retention_policy_description.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class RetentionPolicyDescription(Model): + """Describes the retention policy configured. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BasicRetentionPolicyDescription + + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. + :type retention_policy_type: str + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, + } + + _subtype_map = { + 'retention_policy_type': {'Basic': 'BasicRetentionPolicyDescription'} + } + + def __init__(self, **kwargs): + super(RetentionPolicyDescription, self).__init__(**kwargs) + self.retention_policy_type = None diff --git a/customSDK/servicefabric/models/retention_policy_description_py3.py b/customSDK/servicefabric/models/retention_policy_description_py3.py new file mode 100644 index 0000000..6f775cf --- /dev/null +++ b/customSDK/servicefabric/models/retention_policy_description_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class RetentionPolicyDescription(Model): + """Describes the retention policy configured. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BasicRetentionPolicyDescription + + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. + :type retention_policy_type: str + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, + } + + _subtype_map = { + 'retention_policy_type': {'Basic': 'BasicRetentionPolicyDescription'} + } + + def __init__(self, **kwargs) -> None: + super(RetentionPolicyDescription, self).__init__(**kwargs) + self.retention_policy_type = None diff --git a/customSDK/servicefabric/models/rolling_upgrade_update_description.py b/customSDK/servicefabric/models/rolling_upgrade_update_description.py new file mode 100644 index 0000000..377d0a5 --- /dev/null +++ b/customSDK/servicefabric/models/rolling_upgrade_update_description.py @@ -0,0 +1,118 @@ +# 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 msrest.serialization import Model + + +class RollingUpgradeUpdateDescription(Model): + """Describes the parameters for updating a rolling upgrade of application or + cluster. + + All required parameters must be populated in order to send to Azure. + + :param rolling_upgrade_mode: Required. The mode used to monitor health + during a rolling upgrade. The values are UnmonitoredAuto, + UnmonitoredManual, and Monitored. Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: + "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param replica_set_check_timeout_in_milliseconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type replica_set_check_timeout_in_milliseconds: long + :param failure_action: The compensating action to perform when a Monitored + upgrade encounters monitoring policy or health policy violations. + Invalid indicates the failure action is invalid. Rollback specifies that + the upgrade will start rolling back automatically. + Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + :type failure_action: str or ~azure.servicefabric.models.FailureAction + :param health_check_wait_duration_in_milliseconds: The amount of time to + wait after completing an upgrade domain before applying health policies. + It is first interpreted as a string representing an ISO 8601 duration. If + that fails, then it is interpreted as a number representing the total + number of milliseconds. + :type health_check_wait_duration_in_milliseconds: str + :param health_check_stable_duration_in_milliseconds: The amount of time + that the application or cluster must remain healthy before the upgrade + proceeds to the next upgrade domain. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type health_check_stable_duration_in_milliseconds: str + :param health_check_retry_timeout_in_milliseconds: The amount of time to + retry health evaluation when the application or cluster is unhealthy + before FailureAction is executed. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type health_check_retry_timeout_in_milliseconds: str + :param upgrade_timeout_in_milliseconds: The amount of time the overall + upgrade has to complete before FailureAction is executed. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, + then it is interpreted as a number representing the total number of + milliseconds. + :type upgrade_timeout_in_milliseconds: str + :param upgrade_domain_timeout_in_milliseconds: The amount of time each + upgrade domain has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + :type upgrade_domain_timeout_in_milliseconds: str + :param instance_close_delay_duration_in_seconds: Duration in seconds, to + wait before a stateless instance is closed, to allow the active requests + to drain gracefully. This would be effective when the instance is closing + during the application/cluster + upgrade, only for those instances which have a non-zero delay duration + configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is + 4294967295, which indicates that the behavior will entirely depend on the + delay configured in the stateless service description. + :type instance_close_delay_duration_in_seconds: long + """ + + _validation = { + 'rolling_upgrade_mode': {'required': True}, + } + + _attribute_map = { + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'replica_set_check_timeout_in_milliseconds': {'key': 'ReplicaSetCheckTimeoutInMilliseconds', 'type': 'long'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, + 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, + 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeUpdateDescription, self).__init__(**kwargs) + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.force_restart = kwargs.get('force_restart', None) + self.replica_set_check_timeout_in_milliseconds = kwargs.get('replica_set_check_timeout_in_milliseconds', None) + self.failure_action = kwargs.get('failure_action', None) + self.health_check_wait_duration_in_milliseconds = kwargs.get('health_check_wait_duration_in_milliseconds', None) + self.health_check_stable_duration_in_milliseconds = kwargs.get('health_check_stable_duration_in_milliseconds', None) + self.health_check_retry_timeout_in_milliseconds = kwargs.get('health_check_retry_timeout_in_milliseconds', None) + self.upgrade_timeout_in_milliseconds = kwargs.get('upgrade_timeout_in_milliseconds', None) + self.upgrade_domain_timeout_in_milliseconds = kwargs.get('upgrade_domain_timeout_in_milliseconds', None) + self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', None) diff --git a/customSDK/servicefabric/models/rolling_upgrade_update_description_py3.py b/customSDK/servicefabric/models/rolling_upgrade_update_description_py3.py new file mode 100644 index 0000000..785a159 --- /dev/null +++ b/customSDK/servicefabric/models/rolling_upgrade_update_description_py3.py @@ -0,0 +1,118 @@ +# 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 msrest.serialization import Model + + +class RollingUpgradeUpdateDescription(Model): + """Describes the parameters for updating a rolling upgrade of application or + cluster. + + All required parameters must be populated in order to send to Azure. + + :param rolling_upgrade_mode: Required. The mode used to monitor health + during a rolling upgrade. The values are UnmonitoredAuto, + UnmonitoredManual, and Monitored. Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: + "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param replica_set_check_timeout_in_milliseconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type replica_set_check_timeout_in_milliseconds: long + :param failure_action: The compensating action to perform when a Monitored + upgrade encounters monitoring policy or health policy violations. + Invalid indicates the failure action is invalid. Rollback specifies that + the upgrade will start rolling back automatically. + Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + :type failure_action: str or ~azure.servicefabric.models.FailureAction + :param health_check_wait_duration_in_milliseconds: The amount of time to + wait after completing an upgrade domain before applying health policies. + It is first interpreted as a string representing an ISO 8601 duration. If + that fails, then it is interpreted as a number representing the total + number of milliseconds. + :type health_check_wait_duration_in_milliseconds: str + :param health_check_stable_duration_in_milliseconds: The amount of time + that the application or cluster must remain healthy before the upgrade + proceeds to the next upgrade domain. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type health_check_stable_duration_in_milliseconds: str + :param health_check_retry_timeout_in_milliseconds: The amount of time to + retry health evaluation when the application or cluster is unhealthy + before FailureAction is executed. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type health_check_retry_timeout_in_milliseconds: str + :param upgrade_timeout_in_milliseconds: The amount of time the overall + upgrade has to complete before FailureAction is executed. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, + then it is interpreted as a number representing the total number of + milliseconds. + :type upgrade_timeout_in_milliseconds: str + :param upgrade_domain_timeout_in_milliseconds: The amount of time each + upgrade domain has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + :type upgrade_domain_timeout_in_milliseconds: str + :param instance_close_delay_duration_in_seconds: Duration in seconds, to + wait before a stateless instance is closed, to allow the active requests + to drain gracefully. This would be effective when the instance is closing + during the application/cluster + upgrade, only for those instances which have a non-zero delay duration + configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is + 4294967295, which indicates that the behavior will entirely depend on the + delay configured in the stateless service description. + :type instance_close_delay_duration_in_seconds: long + """ + + _validation = { + 'rolling_upgrade_mode': {'required': True}, + } + + _attribute_map = { + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'replica_set_check_timeout_in_milliseconds': {'key': 'ReplicaSetCheckTimeoutInMilliseconds', 'type': 'long'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, + 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, + 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + } + + def __init__(self, *, rolling_upgrade_mode="UnmonitoredAuto", force_restart: bool=None, replica_set_check_timeout_in_milliseconds: int=None, failure_action=None, health_check_wait_duration_in_milliseconds: str=None, health_check_stable_duration_in_milliseconds: str=None, health_check_retry_timeout_in_milliseconds: str=None, upgrade_timeout_in_milliseconds: str=None, upgrade_domain_timeout_in_milliseconds: str=None, instance_close_delay_duration_in_seconds: int=None, **kwargs) -> None: + super(RollingUpgradeUpdateDescription, self).__init__(**kwargs) + self.rolling_upgrade_mode = rolling_upgrade_mode + self.force_restart = force_restart + self.replica_set_check_timeout_in_milliseconds = replica_set_check_timeout_in_milliseconds + self.failure_action = failure_action + self.health_check_wait_duration_in_milliseconds = health_check_wait_duration_in_milliseconds + self.health_check_stable_duration_in_milliseconds = health_check_stable_duration_in_milliseconds + self.health_check_retry_timeout_in_milliseconds = health_check_retry_timeout_in_milliseconds + self.upgrade_timeout_in_milliseconds = upgrade_timeout_in_milliseconds + self.upgrade_domain_timeout_in_milliseconds = upgrade_domain_timeout_in_milliseconds + self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds diff --git a/customSDK/servicefabric/models/run_to_completion_execution_policy.py b/customSDK/servicefabric/models/run_to_completion_execution_policy.py new file mode 100644 index 0000000..1ee4222 --- /dev/null +++ b/customSDK/servicefabric/models/run_to_completion_execution_policy.py @@ -0,0 +1,45 @@ +# 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 .execution_policy import ExecutionPolicy + + +class RunToCompletionExecutionPolicy(ExecutionPolicy): + """The run to completion execution policy, the service will perform its + desired operation and complete successfully. If the service encounters + failure, it will restarted based on restart policy specified. If the + service completes its operation successfully, it will not be restarted + again. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param restart: Required. Enumerates the restart policy for + RunToCompletionExecutionPolicy. Possible values include: 'OnFailure', + 'Never' + :type restart: str or ~azure.servicefabric.models.RestartPolicy + """ + + _validation = { + 'type': {'required': True}, + 'restart': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'restart': {'key': 'restart', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunToCompletionExecutionPolicy, self).__init__(**kwargs) + self.restart = kwargs.get('restart', None) + self.type = 'RunToCompletion' diff --git a/customSDK/servicefabric/models/run_to_completion_execution_policy_py3.py b/customSDK/servicefabric/models/run_to_completion_execution_policy_py3.py new file mode 100644 index 0000000..9304ae5 --- /dev/null +++ b/customSDK/servicefabric/models/run_to_completion_execution_policy_py3.py @@ -0,0 +1,45 @@ +# 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 .execution_policy_py3 import ExecutionPolicy + + +class RunToCompletionExecutionPolicy(ExecutionPolicy): + """The run to completion execution policy, the service will perform its + desired operation and complete successfully. If the service encounters + failure, it will restarted based on restart policy specified. If the + service completes its operation successfully, it will not be restarted + again. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param restart: Required. Enumerates the restart policy for + RunToCompletionExecutionPolicy. Possible values include: 'OnFailure', + 'Never' + :type restart: str or ~azure.servicefabric.models.RestartPolicy + """ + + _validation = { + 'type': {'required': True}, + 'restart': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'restart': {'key': 'restart', 'type': 'str'}, + } + + def __init__(self, *, restart, **kwargs) -> None: + super(RunToCompletionExecutionPolicy, self).__init__(**kwargs) + self.restart = restart + self.type = 'RunToCompletion' diff --git a/customSDK/servicefabric/models/safety_check.py b/customSDK/servicefabric/models/safety_check.py new file mode 100644 index 0000000..5d2898f --- /dev/null +++ b/customSDK/servicefabric/models/safety_check.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class SafetyCheck(Model): + """Represents a safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service + and the reliability of the state. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionSafetyCheck, SeedNodeSafetyCheck + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'PartitionSafetyCheck': 'PartitionSafetyCheck', 'EnsureSeedNodeQuorum': 'SeedNodeSafetyCheck'} + } + + def __init__(self, **kwargs): + super(SafetyCheck, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/safety_check_py3.py b/customSDK/servicefabric/models/safety_check_py3.py new file mode 100644 index 0000000..b4c48b8 --- /dev/null +++ b/customSDK/servicefabric/models/safety_check_py3.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class SafetyCheck(Model): + """Represents a safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service + and the reliability of the state. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionSafetyCheck, SeedNodeSafetyCheck + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'PartitionSafetyCheck': 'PartitionSafetyCheck', 'EnsureSeedNodeQuorum': 'SeedNodeSafetyCheck'} + } + + def __init__(self, **kwargs) -> None: + super(SafetyCheck, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/safety_check_wrapper.py b/customSDK/servicefabric/models/safety_check_wrapper.py new file mode 100644 index 0000000..7307dd6 --- /dev/null +++ b/customSDK/servicefabric/models/safety_check_wrapper.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class SafetyCheckWrapper(Model): + """A wrapper for the safety check object. Safety checks are performed by + service fabric before continuing with the operations. These checks ensure + the availability of the service and the reliability of the state. + + :param safety_check: Represents a safety check performed by service fabric + before continuing with the operations. These checks ensure the + availability of the service and the reliability of the state. + :type safety_check: ~azure.servicefabric.models.SafetyCheck + """ + + _attribute_map = { + 'safety_check': {'key': 'SafetyCheck', 'type': 'SafetyCheck'}, + } + + def __init__(self, **kwargs): + super(SafetyCheckWrapper, self).__init__(**kwargs) + self.safety_check = kwargs.get('safety_check', None) diff --git a/customSDK/servicefabric/models/safety_check_wrapper_py3.py b/customSDK/servicefabric/models/safety_check_wrapper_py3.py new file mode 100644 index 0000000..92f8569 --- /dev/null +++ b/customSDK/servicefabric/models/safety_check_wrapper_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class SafetyCheckWrapper(Model): + """A wrapper for the safety check object. Safety checks are performed by + service fabric before continuing with the operations. These checks ensure + the availability of the service and the reliability of the state. + + :param safety_check: Represents a safety check performed by service fabric + before continuing with the operations. These checks ensure the + availability of the service and the reliability of the state. + :type safety_check: ~azure.servicefabric.models.SafetyCheck + """ + + _attribute_map = { + 'safety_check': {'key': 'SafetyCheck', 'type': 'SafetyCheck'}, + } + + def __init__(self, *, safety_check=None, **kwargs) -> None: + super(SafetyCheckWrapper, self).__init__(**kwargs) + self.safety_check = safety_check diff --git a/customSDK/servicefabric/models/scaling_mechanism_description.py b/customSDK/servicefabric/models/scaling_mechanism_description.py new file mode 100644 index 0000000..f08e3a9 --- /dev/null +++ b/customSDK/servicefabric/models/scaling_mechanism_description.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class ScalingMechanismDescription(Model): + """Describes the mechanism for performing a scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionInstanceCountScaleMechanism, + AddRemoveIncrementalNamedPartitionScalingMechanism + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'PartitionInstanceCount': 'PartitionInstanceCountScaleMechanism', 'AddRemoveIncrementalNamedPartition': 'AddRemoveIncrementalNamedPartitionScalingMechanism'} + } + + def __init__(self, **kwargs): + super(ScalingMechanismDescription, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/scaling_mechanism_description_py3.py b/customSDK/servicefabric/models/scaling_mechanism_description_py3.py new file mode 100644 index 0000000..f71c38e --- /dev/null +++ b/customSDK/servicefabric/models/scaling_mechanism_description_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class ScalingMechanismDescription(Model): + """Describes the mechanism for performing a scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionInstanceCountScaleMechanism, + AddRemoveIncrementalNamedPartitionScalingMechanism + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'PartitionInstanceCount': 'PartitionInstanceCountScaleMechanism', 'AddRemoveIncrementalNamedPartition': 'AddRemoveIncrementalNamedPartitionScalingMechanism'} + } + + def __init__(self, **kwargs) -> None: + super(ScalingMechanismDescription, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/scaling_policy_description.py b/customSDK/servicefabric/models/scaling_policy_description.py new file mode 100644 index 0000000..28c61ba --- /dev/null +++ b/customSDK/servicefabric/models/scaling_policy_description.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class ScalingPolicyDescription(Model): + """Describes how the scaling should be performed. + + All required parameters must be populated in order to send to Azure. + + :param scaling_trigger: Required. Specifies the trigger associated with + this scaling policy + :type scaling_trigger: + ~azure.servicefabric.models.ScalingTriggerDescription + :param scaling_mechanism: Required. Specifies the mechanism associated + with this scaling policy + :type scaling_mechanism: + ~azure.servicefabric.models.ScalingMechanismDescription + """ + + _validation = { + 'scaling_trigger': {'required': True}, + 'scaling_mechanism': {'required': True}, + } + + _attribute_map = { + 'scaling_trigger': {'key': 'ScalingTrigger', 'type': 'ScalingTriggerDescription'}, + 'scaling_mechanism': {'key': 'ScalingMechanism', 'type': 'ScalingMechanismDescription'}, + } + + def __init__(self, **kwargs): + super(ScalingPolicyDescription, self).__init__(**kwargs) + self.scaling_trigger = kwargs.get('scaling_trigger', None) + self.scaling_mechanism = kwargs.get('scaling_mechanism', None) diff --git a/customSDK/servicefabric/models/scaling_policy_description_py3.py b/customSDK/servicefabric/models/scaling_policy_description_py3.py new file mode 100644 index 0000000..1e923ce --- /dev/null +++ b/customSDK/servicefabric/models/scaling_policy_description_py3.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class ScalingPolicyDescription(Model): + """Describes how the scaling should be performed. + + All required parameters must be populated in order to send to Azure. + + :param scaling_trigger: Required. Specifies the trigger associated with + this scaling policy + :type scaling_trigger: + ~azure.servicefabric.models.ScalingTriggerDescription + :param scaling_mechanism: Required. Specifies the mechanism associated + with this scaling policy + :type scaling_mechanism: + ~azure.servicefabric.models.ScalingMechanismDescription + """ + + _validation = { + 'scaling_trigger': {'required': True}, + 'scaling_mechanism': {'required': True}, + } + + _attribute_map = { + 'scaling_trigger': {'key': 'ScalingTrigger', 'type': 'ScalingTriggerDescription'}, + 'scaling_mechanism': {'key': 'ScalingMechanism', 'type': 'ScalingMechanismDescription'}, + } + + def __init__(self, *, scaling_trigger, scaling_mechanism, **kwargs) -> None: + super(ScalingPolicyDescription, self).__init__(**kwargs) + self.scaling_trigger = scaling_trigger + self.scaling_mechanism = scaling_mechanism diff --git a/customSDK/servicefabric/models/scaling_trigger_description.py b/customSDK/servicefabric/models/scaling_trigger_description.py new file mode 100644 index 0000000..e09f697 --- /dev/null +++ b/customSDK/servicefabric/models/scaling_trigger_description.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class ScalingTriggerDescription(Model): + """Describes the trigger for performing a scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AveragePartitionLoadScalingTrigger, + AverageServiceLoadScalingTrigger + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AveragePartitionLoad': 'AveragePartitionLoadScalingTrigger', 'AverageServiceLoad': 'AverageServiceLoadScalingTrigger'} + } + + def __init__(self, **kwargs): + super(ScalingTriggerDescription, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/scaling_trigger_description_py3.py b/customSDK/servicefabric/models/scaling_trigger_description_py3.py new file mode 100644 index 0000000..1ace26b --- /dev/null +++ b/customSDK/servicefabric/models/scaling_trigger_description_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class ScalingTriggerDescription(Model): + """Describes the trigger for performing a scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AveragePartitionLoadScalingTrigger, + AverageServiceLoadScalingTrigger + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AveragePartitionLoad': 'AveragePartitionLoadScalingTrigger', 'AverageServiceLoad': 'AverageServiceLoadScalingTrigger'} + } + + def __init__(self, **kwargs) -> None: + super(ScalingTriggerDescription, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/secondary_active_replicator_status.py b/customSDK/servicefabric/models/secondary_active_replicator_status.py new file mode 100644 index 0000000..cd688dd --- /dev/null +++ b/customSDK/servicefabric/models/secondary_active_replicator_status.py @@ -0,0 +1,66 @@ +# 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 .secondary_replicator_status import SecondaryReplicatorStatus + + +class SecondaryActiveReplicatorStatus(SecondaryReplicatorStatus): + """Status of the secondary replicator when it is in active mode and is part of + the replica set. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param replication_queue_status: Details about the replication queue on + the secondary replicator. + :type replication_queue_status: + ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_replication_operation_received_time_utc: The last time-stamp + (UTC) at which a replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation + message was never received. + :type last_replication_operation_received_time_utc: datetime + :param is_in_build: Value that indicates whether the replica is currently + being built. + :type is_in_build: bool + :param copy_queue_status: Details about the copy queue on the secondary + replicator. + :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at + which a copy operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation + message was never received. + :type last_copy_operation_received_time_utc: datetime + :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at + which an acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment + message was never sent. + :type last_acknowledgement_sent_time_utc: datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SecondaryActiveReplicatorStatus, self).__init__(**kwargs) + self.kind = 'ActiveSecondary' diff --git a/customSDK/servicefabric/models/secondary_active_replicator_status_py3.py b/customSDK/servicefabric/models/secondary_active_replicator_status_py3.py new file mode 100644 index 0000000..4449ac0 --- /dev/null +++ b/customSDK/servicefabric/models/secondary_active_replicator_status_py3.py @@ -0,0 +1,66 @@ +# 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 .secondary_replicator_status_py3 import SecondaryReplicatorStatus + + +class SecondaryActiveReplicatorStatus(SecondaryReplicatorStatus): + """Status of the secondary replicator when it is in active mode and is part of + the replica set. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param replication_queue_status: Details about the replication queue on + the secondary replicator. + :type replication_queue_status: + ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_replication_operation_received_time_utc: The last time-stamp + (UTC) at which a replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation + message was never received. + :type last_replication_operation_received_time_utc: datetime + :param is_in_build: Value that indicates whether the replica is currently + being built. + :type is_in_build: bool + :param copy_queue_status: Details about the copy queue on the secondary + replicator. + :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at + which a copy operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation + message was never received. + :type last_copy_operation_received_time_utc: datetime + :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at + which an acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment + message was never sent. + :type last_acknowledgement_sent_time_utc: datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, *, replication_queue_status=None, last_replication_operation_received_time_utc=None, is_in_build: bool=None, copy_queue_status=None, last_copy_operation_received_time_utc=None, last_acknowledgement_sent_time_utc=None, **kwargs) -> None: + super(SecondaryActiveReplicatorStatus, self).__init__(replication_queue_status=replication_queue_status, last_replication_operation_received_time_utc=last_replication_operation_received_time_utc, is_in_build=is_in_build, copy_queue_status=copy_queue_status, last_copy_operation_received_time_utc=last_copy_operation_received_time_utc, last_acknowledgement_sent_time_utc=last_acknowledgement_sent_time_utc, **kwargs) + self.kind = 'ActiveSecondary' diff --git a/customSDK/servicefabric/models/secondary_idle_replicator_status.py b/customSDK/servicefabric/models/secondary_idle_replicator_status.py new file mode 100644 index 0000000..c74ee00 --- /dev/null +++ b/customSDK/servicefabric/models/secondary_idle_replicator_status.py @@ -0,0 +1,66 @@ +# 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 .secondary_replicator_status import SecondaryReplicatorStatus + + +class SecondaryIdleReplicatorStatus(SecondaryReplicatorStatus): + """Status of the secondary replicator when it is in idle mode and is being + built by the primary. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param replication_queue_status: Details about the replication queue on + the secondary replicator. + :type replication_queue_status: + ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_replication_operation_received_time_utc: The last time-stamp + (UTC) at which a replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation + message was never received. + :type last_replication_operation_received_time_utc: datetime + :param is_in_build: Value that indicates whether the replica is currently + being built. + :type is_in_build: bool + :param copy_queue_status: Details about the copy queue on the secondary + replicator. + :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at + which a copy operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation + message was never received. + :type last_copy_operation_received_time_utc: datetime + :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at + which an acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment + message was never sent. + :type last_acknowledgement_sent_time_utc: datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SecondaryIdleReplicatorStatus, self).__init__(**kwargs) + self.kind = 'IdleSecondary' diff --git a/customSDK/servicefabric/models/secondary_idle_replicator_status_py3.py b/customSDK/servicefabric/models/secondary_idle_replicator_status_py3.py new file mode 100644 index 0000000..3458cc3 --- /dev/null +++ b/customSDK/servicefabric/models/secondary_idle_replicator_status_py3.py @@ -0,0 +1,66 @@ +# 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 .secondary_replicator_status_py3 import SecondaryReplicatorStatus + + +class SecondaryIdleReplicatorStatus(SecondaryReplicatorStatus): + """Status of the secondary replicator when it is in idle mode and is being + built by the primary. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param replication_queue_status: Details about the replication queue on + the secondary replicator. + :type replication_queue_status: + ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_replication_operation_received_time_utc: The last time-stamp + (UTC) at which a replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation + message was never received. + :type last_replication_operation_received_time_utc: datetime + :param is_in_build: Value that indicates whether the replica is currently + being built. + :type is_in_build: bool + :param copy_queue_status: Details about the copy queue on the secondary + replicator. + :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at + which a copy operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation + message was never received. + :type last_copy_operation_received_time_utc: datetime + :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at + which an acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment + message was never sent. + :type last_acknowledgement_sent_time_utc: datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, *, replication_queue_status=None, last_replication_operation_received_time_utc=None, is_in_build: bool=None, copy_queue_status=None, last_copy_operation_received_time_utc=None, last_acknowledgement_sent_time_utc=None, **kwargs) -> None: + super(SecondaryIdleReplicatorStatus, self).__init__(replication_queue_status=replication_queue_status, last_replication_operation_received_time_utc=last_replication_operation_received_time_utc, is_in_build=is_in_build, copy_queue_status=copy_queue_status, last_copy_operation_received_time_utc=last_copy_operation_received_time_utc, last_acknowledgement_sent_time_utc=last_acknowledgement_sent_time_utc, **kwargs) + self.kind = 'IdleSecondary' diff --git a/customSDK/servicefabric/models/secondary_replicator_status.py b/customSDK/servicefabric/models/secondary_replicator_status.py new file mode 100644 index 0000000..53744ac --- /dev/null +++ b/customSDK/servicefabric/models/secondary_replicator_status.py @@ -0,0 +1,80 @@ +# 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 .replicator_status import ReplicatorStatus + + +class SecondaryReplicatorStatus(ReplicatorStatus): + """Provides statistics about the Service Fabric Replicator, when it is + functioning in a ActiveSecondary role. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecondaryActiveReplicatorStatus, + SecondaryIdleReplicatorStatus + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param replication_queue_status: Details about the replication queue on + the secondary replicator. + :type replication_queue_status: + ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_replication_operation_received_time_utc: The last time-stamp + (UTC) at which a replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation + message was never received. + :type last_replication_operation_received_time_utc: datetime + :param is_in_build: Value that indicates whether the replica is currently + being built. + :type is_in_build: bool + :param copy_queue_status: Details about the copy queue on the secondary + replicator. + :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at + which a copy operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation + message was never received. + :type last_copy_operation_received_time_utc: datetime + :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at + which an acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment + message was never sent. + :type last_acknowledgement_sent_time_utc: datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + _subtype_map = { + 'kind': {'ActiveSecondary': 'SecondaryActiveReplicatorStatus', 'IdleSecondary': 'SecondaryIdleReplicatorStatus'} + } + + def __init__(self, **kwargs): + super(SecondaryReplicatorStatus, self).__init__(**kwargs) + self.replication_queue_status = kwargs.get('replication_queue_status', None) + self.last_replication_operation_received_time_utc = kwargs.get('last_replication_operation_received_time_utc', None) + self.is_in_build = kwargs.get('is_in_build', None) + self.copy_queue_status = kwargs.get('copy_queue_status', None) + self.last_copy_operation_received_time_utc = kwargs.get('last_copy_operation_received_time_utc', None) + self.last_acknowledgement_sent_time_utc = kwargs.get('last_acknowledgement_sent_time_utc', None) + self.kind = 'SecondaryReplicatorStatus' diff --git a/customSDK/servicefabric/models/secondary_replicator_status_py3.py b/customSDK/servicefabric/models/secondary_replicator_status_py3.py new file mode 100644 index 0000000..3111c98 --- /dev/null +++ b/customSDK/servicefabric/models/secondary_replicator_status_py3.py @@ -0,0 +1,80 @@ +# 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 .replicator_status_py3 import ReplicatorStatus + + +class SecondaryReplicatorStatus(ReplicatorStatus): + """Provides statistics about the Service Fabric Replicator, when it is + functioning in a ActiveSecondary role. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecondaryActiveReplicatorStatus, + SecondaryIdleReplicatorStatus + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param replication_queue_status: Details about the replication queue on + the secondary replicator. + :type replication_queue_status: + ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_replication_operation_received_time_utc: The last time-stamp + (UTC) at which a replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation + message was never received. + :type last_replication_operation_received_time_utc: datetime + :param is_in_build: Value that indicates whether the replica is currently + being built. + :type is_in_build: bool + :param copy_queue_status: Details about the copy queue on the secondary + replicator. + :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at + which a copy operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation + message was never received. + :type last_copy_operation_received_time_utc: datetime + :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at + which an acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment + message was never sent. + :type last_acknowledgement_sent_time_utc: datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + _subtype_map = { + 'kind': {'ActiveSecondary': 'SecondaryActiveReplicatorStatus', 'IdleSecondary': 'SecondaryIdleReplicatorStatus'} + } + + def __init__(self, *, replication_queue_status=None, last_replication_operation_received_time_utc=None, is_in_build: bool=None, copy_queue_status=None, last_copy_operation_received_time_utc=None, last_acknowledgement_sent_time_utc=None, **kwargs) -> None: + super(SecondaryReplicatorStatus, self).__init__(**kwargs) + self.replication_queue_status = replication_queue_status + self.last_replication_operation_received_time_utc = last_replication_operation_received_time_utc + self.is_in_build = is_in_build + self.copy_queue_status = copy_queue_status + self.last_copy_operation_received_time_utc = last_copy_operation_received_time_utc + self.last_acknowledgement_sent_time_utc = last_acknowledgement_sent_time_utc + self.kind = 'SecondaryReplicatorStatus' diff --git a/customSDK/servicefabric/models/secret_resource_description.py b/customSDK/servicefabric/models/secret_resource_description.py new file mode 100644 index 0000000..a4e4101 --- /dev/null +++ b/customSDK/servicefabric/models/secret_resource_description.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class SecretResourceDescription(Model): + """This type describes a secret resource. + + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Describes the properties of a secret + resource. + :type properties: ~azure.servicefabric.models.SecretResourceProperties + :param name: Required. Name of the Secret resource. + :type name: str + """ + + _validation = { + 'properties': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'SecretResourceProperties'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretResourceDescription, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/secret_resource_description_py3.py b/customSDK/servicefabric/models/secret_resource_description_py3.py new file mode 100644 index 0000000..c31454a --- /dev/null +++ b/customSDK/servicefabric/models/secret_resource_description_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class SecretResourceDescription(Model): + """This type describes a secret resource. + + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Describes the properties of a secret + resource. + :type properties: ~azure.servicefabric.models.SecretResourceProperties + :param name: Required. Name of the Secret resource. + :type name: str + """ + + _validation = { + 'properties': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'SecretResourceProperties'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, properties, name: str, **kwargs) -> None: + super(SecretResourceDescription, self).__init__(**kwargs) + self.properties = properties + self.name = name diff --git a/customSDK/servicefabric/models/secret_resource_properties.py b/customSDK/servicefabric/models/secret_resource_properties.py new file mode 100644 index 0000000..84868c3 --- /dev/null +++ b/customSDK/servicefabric/models/secret_resource_properties.py @@ -0,0 +1,66 @@ +# 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 .secret_resource_properties_base import SecretResourcePropertiesBase + + +class SecretResourceProperties(SecretResourcePropertiesBase): + """Describes the properties of a secret resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: InlinedValueSecretResourceProperties + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param description: User readable description of the secret. + :type description: str + :ivar status: Status of the resource. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the secret. + :vartype status_details: str + :param content_type: The type of the content stored in the secret value. + The value of this property is opaque to Service Fabric. Once set, the + value of this property cannot be changed. + :type content_type: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'inlinedValue': 'InlinedValueSecretResourceProperties'} + } + + def __init__(self, **kwargs): + super(SecretResourceProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.status = None + self.status_details = None + self.content_type = kwargs.get('content_type', None) + self.kind = 'SecretResourceProperties' diff --git a/customSDK/servicefabric/models/secret_resource_properties_base.py b/customSDK/servicefabric/models/secret_resource_properties_base.py new file mode 100644 index 0000000..ac72b82 --- /dev/null +++ b/customSDK/servicefabric/models/secret_resource_properties_base.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class SecretResourcePropertiesBase(Model): + """This type describes the properties of a secret resource, including its + kind. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecretResourceProperties + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'SecretResourceProperties': 'SecretResourceProperties'} + } + + def __init__(self, **kwargs): + super(SecretResourcePropertiesBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/secret_resource_properties_base_py3.py b/customSDK/servicefabric/models/secret_resource_properties_base_py3.py new file mode 100644 index 0000000..d0044f2 --- /dev/null +++ b/customSDK/servicefabric/models/secret_resource_properties_base_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class SecretResourcePropertiesBase(Model): + """This type describes the properties of a secret resource, including its + kind. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecretResourceProperties + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'SecretResourceProperties': 'SecretResourceProperties'} + } + + def __init__(self, **kwargs) -> None: + super(SecretResourcePropertiesBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/secret_resource_properties_py3.py b/customSDK/servicefabric/models/secret_resource_properties_py3.py new file mode 100644 index 0000000..f49f344 --- /dev/null +++ b/customSDK/servicefabric/models/secret_resource_properties_py3.py @@ -0,0 +1,66 @@ +# 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 .secret_resource_properties_base_py3 import SecretResourcePropertiesBase + + +class SecretResourceProperties(SecretResourcePropertiesBase): + """Describes the properties of a secret resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: InlinedValueSecretResourceProperties + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param description: User readable description of the secret. + :type description: str + :ivar status: Status of the resource. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the secret. + :vartype status_details: str + :param content_type: The type of the content stored in the secret value. + The value of this property is opaque to Service Fabric. Once set, the + value of this property cannot be changed. + :type content_type: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'inlinedValue': 'InlinedValueSecretResourceProperties'} + } + + def __init__(self, *, description: str=None, content_type: str=None, **kwargs) -> None: + super(SecretResourceProperties, self).__init__(**kwargs) + self.description = description + self.status = None + self.status_details = None + self.content_type = content_type + self.kind = 'SecretResourceProperties' diff --git a/customSDK/servicefabric/models/secret_value.py b/customSDK/servicefabric/models/secret_value.py new file mode 100644 index 0000000..d7f6325 --- /dev/null +++ b/customSDK/servicefabric/models/secret_value.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class SecretValue(Model): + """This type represents the unencrypted value of the secret. + + :param value: The actual value of the secret. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretValue, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/secret_value_properties.py b/customSDK/servicefabric/models/secret_value_properties.py new file mode 100644 index 0000000..2d26acf --- /dev/null +++ b/customSDK/servicefabric/models/secret_value_properties.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class SecretValueProperties(Model): + """This type describes properties of secret value resource. + + :param value: The actual value of the secret. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretValueProperties, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/secret_value_properties_py3.py b/customSDK/servicefabric/models/secret_value_properties_py3.py new file mode 100644 index 0000000..4b422eb --- /dev/null +++ b/customSDK/servicefabric/models/secret_value_properties_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class SecretValueProperties(Model): + """This type describes properties of secret value resource. + + :param value: The actual value of the secret. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, **kwargs) -> None: + super(SecretValueProperties, self).__init__(**kwargs) + self.value = value diff --git a/customSDK/servicefabric/models/secret_value_py3.py b/customSDK/servicefabric/models/secret_value_py3.py new file mode 100644 index 0000000..d196402 --- /dev/null +++ b/customSDK/servicefabric/models/secret_value_py3.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class SecretValue(Model): + """This type represents the unencrypted value of the secret. + + :param value: The actual value of the secret. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, **kwargs) -> None: + super(SecretValue, self).__init__(**kwargs) + self.value = value diff --git a/customSDK/servicefabric/models/secret_value_resource_description.py b/customSDK/servicefabric/models/secret_value_resource_description.py new file mode 100644 index 0000000..3580956 --- /dev/null +++ b/customSDK/servicefabric/models/secret_value_resource_description.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class SecretValueResourceDescription(Model): + """This type describes a value of a secret resource. The name of this resource + is the version identifier corresponding to this secret value. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Version identifier of the secret value. + :type name: str + :param value: The actual value of the secret. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretValueResourceDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/secret_value_resource_description_py3.py b/customSDK/servicefabric/models/secret_value_resource_description_py3.py new file mode 100644 index 0000000..70866a9 --- /dev/null +++ b/customSDK/servicefabric/models/secret_value_resource_description_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class SecretValueResourceDescription(Model): + """This type describes a value of a secret resource. The name of this resource + is the version identifier corresponding to this secret value. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Version identifier of the secret value. + :type name: str + :param value: The actual value of the secret. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str=None, **kwargs) -> None: + super(SecretValueResourceDescription, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/customSDK/servicefabric/models/seed_node_safety_check.py b/customSDK/servicefabric/models/seed_node_safety_check.py new file mode 100644 index 0000000..5294f77 --- /dev/null +++ b/customSDK/servicefabric/models/seed_node_safety_check.py @@ -0,0 +1,35 @@ +# 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 .safety_check import SafetyCheck + + +class SeedNodeSafetyCheck(SafetyCheck): + """Represents a safety check for the seed nodes being performed by service + fabric before continuing with node level operations. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SeedNodeSafetyCheck, self).__init__(**kwargs) + self.kind = 'EnsureSeedNodeQuorum' diff --git a/customSDK/servicefabric/models/seed_node_safety_check_py3.py b/customSDK/servicefabric/models/seed_node_safety_check_py3.py new file mode 100644 index 0000000..4e29012 --- /dev/null +++ b/customSDK/servicefabric/models/seed_node_safety_check_py3.py @@ -0,0 +1,35 @@ +# 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 .safety_check_py3 import SafetyCheck + + +class SeedNodeSafetyCheck(SafetyCheck): + """Represents a safety check for the seed nodes being performed by service + fabric before continuing with node level operations. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SeedNodeSafetyCheck, self).__init__(**kwargs) + self.kind = 'EnsureSeedNodeQuorum' diff --git a/customSDK/servicefabric/models/selected_partition.py b/customSDK/servicefabric/models/selected_partition.py new file mode 100644 index 0000000..c94ea8f --- /dev/null +++ b/customSDK/servicefabric/models/selected_partition.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class SelectedPartition(Model): + """This class returns information about the partition that the user-induced + operation acted upon. + + :param service_name: The name of the service the partition belongs to. + :type service_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SelectedPartition, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) diff --git a/customSDK/servicefabric/models/selected_partition_py3.py b/customSDK/servicefabric/models/selected_partition_py3.py new file mode 100644 index 0000000..20c9433 --- /dev/null +++ b/customSDK/servicefabric/models/selected_partition_py3.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class SelectedPartition(Model): + """This class returns information about the partition that the user-induced + operation acted upon. + + :param service_name: The name of the service the partition belongs to. + :type service_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, service_name: str=None, partition_id: str=None, **kwargs) -> None: + super(SelectedPartition, self).__init__(**kwargs) + self.service_name = service_name + self.partition_id = partition_id diff --git a/customSDK/servicefabric/models/service_backup_configuration_info.py b/customSDK/servicefabric/models/service_backup_configuration_info.py new file mode 100644 index 0000000..7ee1cd7 --- /dev/null +++ b/customSDK/servicefabric/models/service_backup_configuration_info.py @@ -0,0 +1,54 @@ +# 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 .backup_configuration_info import BackupConfigurationInfo + + +class ServiceBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information for a specific Service Fabric service + specifying what backup policy is being applied and suspend description, if + any. + + All required parameters must be populated in order to send to Azure. + + :param policy_name: The name of the backup policy which is applicable to + this Service Fabric application or service or partition. + :type policy_name: str + :param policy_inherited_from: Specifies the scope at which the backup + policy is applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type policy_inherited_from: str or + ~azure.servicefabric.models.BackupPolicyScope + :param suspension_info: Describes the backup suspension details. + :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :param kind: Required. Constant filled by server. + :type kind: str + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceBackupConfigurationInfo, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.kind = 'Service' diff --git a/customSDK/servicefabric/models/service_backup_configuration_info_py3.py b/customSDK/servicefabric/models/service_backup_configuration_info_py3.py new file mode 100644 index 0000000..5d708f4 --- /dev/null +++ b/customSDK/servicefabric/models/service_backup_configuration_info_py3.py @@ -0,0 +1,54 @@ +# 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 .backup_configuration_info_py3 import BackupConfigurationInfo + + +class ServiceBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information for a specific Service Fabric service + specifying what backup policy is being applied and suspend description, if + any. + + All required parameters must be populated in order to send to Azure. + + :param policy_name: The name of the backup policy which is applicable to + this Service Fabric application or service or partition. + :type policy_name: str + :param policy_inherited_from: Specifies the scope at which the backup + policy is applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type policy_inherited_from: str or + ~azure.servicefabric.models.BackupPolicyScope + :param suspension_info: Describes the backup suspension details. + :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :param kind: Required. Constant filled by server. + :type kind: str + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, service_name: str=None, **kwargs) -> None: + super(ServiceBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) + self.service_name = service_name + self.kind = 'Service' diff --git a/customSDK/servicefabric/models/service_backup_entity.py b/customSDK/servicefabric/models/service_backup_entity.py new file mode 100644 index 0000000..3dbc91f --- /dev/null +++ b/customSDK/servicefabric/models/service_backup_entity.py @@ -0,0 +1,39 @@ +# 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 .backup_entity import BackupEntity + + +class ServiceBackupEntity(BackupEntity): + """Identifies the Service Fabric stateful service which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :param entity_kind: Required. Constant filled by server. + :type entity_kind: str + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceBackupEntity, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.entity_kind = 'Service' diff --git a/customSDK/servicefabric/models/service_backup_entity_py3.py b/customSDK/servicefabric/models/service_backup_entity_py3.py new file mode 100644 index 0000000..66f6036 --- /dev/null +++ b/customSDK/servicefabric/models/service_backup_entity_py3.py @@ -0,0 +1,39 @@ +# 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 .backup_entity_py3 import BackupEntity + + +class ServiceBackupEntity(BackupEntity): + """Identifies the Service Fabric stateful service which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :param entity_kind: Required. Constant filled by server. + :type entity_kind: str + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__(self, *, service_name: str=None, **kwargs) -> None: + super(ServiceBackupEntity, self).__init__(**kwargs) + self.service_name = service_name + self.entity_kind = 'Service' diff --git a/customSDK/servicefabric/models/service_correlation_description.py b/customSDK/servicefabric/models/service_correlation_description.py new file mode 100644 index 0000000..46e9aba --- /dev/null +++ b/customSDK/servicefabric/models/service_correlation_description.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class ServiceCorrelationDescription(Model): + """Creates a particular correlation between services. + + All required parameters must be populated in order to send to Azure. + + :param scheme: Required. The ServiceCorrelationScheme which describes the + relationship between this service and the service specified via + ServiceName. Possible values include: 'Invalid', 'Affinity', + 'AlignedAffinity', 'NonAlignedAffinity' + :type scheme: str or ~azure.servicefabric.models.ServiceCorrelationScheme + :param service_name: Required. The name of the service that the + correlation relationship is established with. + :type service_name: str + """ + + _validation = { + 'scheme': {'required': True}, + 'service_name': {'required': True}, + } + + _attribute_map = { + 'scheme': {'key': 'Scheme', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceCorrelationDescription, self).__init__(**kwargs) + self.scheme = kwargs.get('scheme', None) + self.service_name = kwargs.get('service_name', None) diff --git a/customSDK/servicefabric/models/service_correlation_description_py3.py b/customSDK/servicefabric/models/service_correlation_description_py3.py new file mode 100644 index 0000000..d72db91 --- /dev/null +++ b/customSDK/servicefabric/models/service_correlation_description_py3.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class ServiceCorrelationDescription(Model): + """Creates a particular correlation between services. + + All required parameters must be populated in order to send to Azure. + + :param scheme: Required. The ServiceCorrelationScheme which describes the + relationship between this service and the service specified via + ServiceName. Possible values include: 'Invalid', 'Affinity', + 'AlignedAffinity', 'NonAlignedAffinity' + :type scheme: str or ~azure.servicefabric.models.ServiceCorrelationScheme + :param service_name: Required. The name of the service that the + correlation relationship is established with. + :type service_name: str + """ + + _validation = { + 'scheme': {'required': True}, + 'service_name': {'required': True}, + } + + _attribute_map = { + 'scheme': {'key': 'Scheme', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__(self, *, scheme, service_name: str, **kwargs) -> None: + super(ServiceCorrelationDescription, self).__init__(**kwargs) + self.scheme = scheme + self.service_name = service_name diff --git a/customSDK/servicefabric/models/service_created_event.py b/customSDK/servicefabric/models/service_created_event.py new file mode 100644 index 0000000..33d46d2 --- /dev/null +++ b/customSDK/servicefabric/models/service_created_event.py @@ -0,0 +1,114 @@ +# 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 .service_event import ServiceEvent + + +class ServiceCreatedEvent(ServiceEvent): + """Service Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param service_type_name: Required. Service type name. + :type service_type_name: str + :param application_name: Required. Application name. + :type application_name: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param service_instance: Required. Id of Service instance. + :type service_instance: long + :param is_stateful: Required. Indicates if Service is stateful. + :type is_stateful: bool + :param partition_count: Required. Number of partitions. + :type partition_count: int + :param target_replica_set_size: Required. Size of target replicas set. + :type target_replica_set_size: int + :param min_replica_set_size: Required. Minimum size of replicas set. + :type min_replica_set_size: int + :param service_package_version: Required. Version of Service package. + :type service_package_version: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + 'service_type_name': {'required': True}, + 'application_name': {'required': True}, + 'application_type_name': {'required': True}, + 'service_instance': {'required': True}, + 'is_stateful': {'required': True}, + 'partition_count': {'required': True}, + 'target_replica_set_size': {'required': True}, + 'min_replica_set_size': {'required': True}, + 'service_package_version': {'required': True}, + 'partition_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceCreatedEvent, self).__init__(**kwargs) + self.service_type_name = kwargs.get('service_type_name', None) + self.application_name = kwargs.get('application_name', None) + self.application_type_name = kwargs.get('application_type_name', None) + self.service_instance = kwargs.get('service_instance', None) + self.is_stateful = kwargs.get('is_stateful', None) + self.partition_count = kwargs.get('partition_count', None) + self.target_replica_set_size = kwargs.get('target_replica_set_size', None) + self.min_replica_set_size = kwargs.get('min_replica_set_size', None) + self.service_package_version = kwargs.get('service_package_version', None) + self.partition_id = kwargs.get('partition_id', None) + self.kind = 'ServiceCreated' diff --git a/customSDK/servicefabric/models/service_created_event_py3.py b/customSDK/servicefabric/models/service_created_event_py3.py new file mode 100644 index 0000000..1843c85 --- /dev/null +++ b/customSDK/servicefabric/models/service_created_event_py3.py @@ -0,0 +1,114 @@ +# 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 .service_event_py3 import ServiceEvent + + +class ServiceCreatedEvent(ServiceEvent): + """Service Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param service_type_name: Required. Service type name. + :type service_type_name: str + :param application_name: Required. Application name. + :type application_name: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param service_instance: Required. Id of Service instance. + :type service_instance: long + :param is_stateful: Required. Indicates if Service is stateful. + :type is_stateful: bool + :param partition_count: Required. Number of partitions. + :type partition_count: int + :param target_replica_set_size: Required. Size of target replicas set. + :type target_replica_set_size: int + :param min_replica_set_size: Required. Minimum size of replicas set. + :type min_replica_set_size: int + :param service_package_version: Required. Version of Service package. + :type service_package_version: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + 'service_type_name': {'required': True}, + 'application_name': {'required': True}, + 'application_type_name': {'required': True}, + 'service_instance': {'required': True}, + 'is_stateful': {'required': True}, + 'partition_count': {'required': True}, + 'target_replica_set_size': {'required': True}, + 'min_replica_set_size': {'required': True}, + 'service_package_version': {'required': True}, + 'partition_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, service_type_name: str, application_name: str, application_type_name: str, service_instance: int, is_stateful: bool, partition_count: int, target_replica_set_size: int, min_replica_set_size: int, service_package_version: str, partition_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ServiceCreatedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) + self.service_type_name = service_type_name + self.application_name = application_name + self.application_type_name = application_type_name + self.service_instance = service_instance + self.is_stateful = is_stateful + self.partition_count = partition_count + self.target_replica_set_size = target_replica_set_size + self.min_replica_set_size = min_replica_set_size + self.service_package_version = service_package_version + self.partition_id = partition_id + self.kind = 'ServiceCreated' diff --git a/customSDK/servicefabric/models/service_deleted_event.py b/customSDK/servicefabric/models/service_deleted_event.py new file mode 100644 index 0000000..7b7642f --- /dev/null +++ b/customSDK/servicefabric/models/service_deleted_event.py @@ -0,0 +1,105 @@ +# 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 .service_event import ServiceEvent + + +class ServiceDeletedEvent(ServiceEvent): + """Service Deleted event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param service_type_name: Required. Service type name. + :type service_type_name: str + :param application_name: Required. Application name. + :type application_name: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param service_instance: Required. Id of Service instance. + :type service_instance: long + :param is_stateful: Required. Indicates if Service is stateful. + :type is_stateful: bool + :param partition_count: Required. Number of partitions. + :type partition_count: int + :param target_replica_set_size: Required. Size of target replicas set. + :type target_replica_set_size: int + :param min_replica_set_size: Required. Minimum size of replicas set. + :type min_replica_set_size: int + :param service_package_version: Required. Version of Service package. + :type service_package_version: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + 'service_type_name': {'required': True}, + 'application_name': {'required': True}, + 'application_type_name': {'required': True}, + 'service_instance': {'required': True}, + 'is_stateful': {'required': True}, + 'partition_count': {'required': True}, + 'target_replica_set_size': {'required': True}, + 'min_replica_set_size': {'required': True}, + 'service_package_version': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceDeletedEvent, self).__init__(**kwargs) + self.service_type_name = kwargs.get('service_type_name', None) + self.application_name = kwargs.get('application_name', None) + self.application_type_name = kwargs.get('application_type_name', None) + self.service_instance = kwargs.get('service_instance', None) + self.is_stateful = kwargs.get('is_stateful', None) + self.partition_count = kwargs.get('partition_count', None) + self.target_replica_set_size = kwargs.get('target_replica_set_size', None) + self.min_replica_set_size = kwargs.get('min_replica_set_size', None) + self.service_package_version = kwargs.get('service_package_version', None) + self.kind = 'ServiceDeleted' diff --git a/customSDK/servicefabric/models/service_deleted_event_py3.py b/customSDK/servicefabric/models/service_deleted_event_py3.py new file mode 100644 index 0000000..58357e3 --- /dev/null +++ b/customSDK/servicefabric/models/service_deleted_event_py3.py @@ -0,0 +1,105 @@ +# 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 .service_event_py3 import ServiceEvent + + +class ServiceDeletedEvent(ServiceEvent): + """Service Deleted event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param service_type_name: Required. Service type name. + :type service_type_name: str + :param application_name: Required. Application name. + :type application_name: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param service_instance: Required. Id of Service instance. + :type service_instance: long + :param is_stateful: Required. Indicates if Service is stateful. + :type is_stateful: bool + :param partition_count: Required. Number of partitions. + :type partition_count: int + :param target_replica_set_size: Required. Size of target replicas set. + :type target_replica_set_size: int + :param min_replica_set_size: Required. Minimum size of replicas set. + :type min_replica_set_size: int + :param service_package_version: Required. Version of Service package. + :type service_package_version: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + 'service_type_name': {'required': True}, + 'application_name': {'required': True}, + 'application_type_name': {'required': True}, + 'service_instance': {'required': True}, + 'is_stateful': {'required': True}, + 'partition_count': {'required': True}, + 'target_replica_set_size': {'required': True}, + 'min_replica_set_size': {'required': True}, + 'service_package_version': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, service_type_name: str, application_name: str, application_type_name: str, service_instance: int, is_stateful: bool, partition_count: int, target_replica_set_size: int, min_replica_set_size: int, service_package_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ServiceDeletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) + self.service_type_name = service_type_name + self.application_name = application_name + self.application_type_name = application_type_name + self.service_instance = service_instance + self.is_stateful = is_stateful + self.partition_count = partition_count + self.target_replica_set_size = target_replica_set_size + self.min_replica_set_size = min_replica_set_size + self.service_package_version = service_package_version + self.kind = 'ServiceDeleted' diff --git a/customSDK/servicefabric/models/service_description.py b/customSDK/servicefabric/models/service_description.py new file mode 100644 index 0000000..77cdb09 --- /dev/null +++ b/customSDK/servicefabric/models/service_description.py @@ -0,0 +1,132 @@ +# 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 msrest.serialization import Model + + +class ServiceDescription(Model): + """A ServiceDescription contains all of the information necessary to create a + service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceDescription, StatelessServiceDescription + + All required parameters must be populated in order to send to Azure. + + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_name: Required. The full name of the service with 'fabric:' + URI scheme. + :type service_name: str + :param service_type_name: Required. Name of the service type as specified + in the service manifest. + :type service_type_name: str + :param initialization_data: The initialization data as an array of bytes. + Initialization data is passed to service instances or replicas when they + are created. + :type initialization_data: list[int] + :param partition_description: Required. The partition description as an + object. + :type partition_description: + ~azure.servicefabric.models.PartitionSchemeDescription + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param service_load_metrics: The service load metrics. + :type service_load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param is_default_move_cost_specified: Indicates if the DefaultMoveCost + property is specified. + :type is_default_move_cost_specified: bool + :param service_package_activation_mode: The activation mode of service + package to be used for a service. Possible values include: + 'SharedProcess', 'ExclusiveProcess' + :type service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :param service_dns_name: The DNS name of the service. It requires the DNS + system service to be enabled in Service Fabric cluster. + :type service_dns_name: str + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceDescription', 'Stateless': 'StatelessServiceDescription'} + } + + def __init__(self, **kwargs): + super(ServiceDescription, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.service_name = kwargs.get('service_name', None) + self.service_type_name = kwargs.get('service_type_name', None) + self.initialization_data = kwargs.get('initialization_data', None) + self.partition_description = kwargs.get('partition_description', None) + self.placement_constraints = kwargs.get('placement_constraints', None) + self.correlation_scheme = kwargs.get('correlation_scheme', None) + self.service_load_metrics = kwargs.get('service_load_metrics', None) + self.service_placement_policies = kwargs.get('service_placement_policies', None) + self.default_move_cost = kwargs.get('default_move_cost', None) + self.is_default_move_cost_specified = kwargs.get('is_default_move_cost_specified', None) + self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) + self.service_dns_name = kwargs.get('service_dns_name', None) + self.scaling_policies = kwargs.get('scaling_policies', None) + self.tags_required_to_place = kwargs.get('tags_required_to_place', None) + self.tags_required_to_run = kwargs.get('tags_required_to_run', None) + self.service_kind = None diff --git a/customSDK/servicefabric/models/service_description_py3.py b/customSDK/servicefabric/models/service_description_py3.py new file mode 100644 index 0000000..b11ea50 --- /dev/null +++ b/customSDK/servicefabric/models/service_description_py3.py @@ -0,0 +1,132 @@ +# 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 msrest.serialization import Model + + +class ServiceDescription(Model): + """A ServiceDescription contains all of the information necessary to create a + service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceDescription, StatelessServiceDescription + + All required parameters must be populated in order to send to Azure. + + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_name: Required. The full name of the service with 'fabric:' + URI scheme. + :type service_name: str + :param service_type_name: Required. Name of the service type as specified + in the service manifest. + :type service_type_name: str + :param initialization_data: The initialization data as an array of bytes. + Initialization data is passed to service instances or replicas when they + are created. + :type initialization_data: list[int] + :param partition_description: Required. The partition description as an + object. + :type partition_description: + ~azure.servicefabric.models.PartitionSchemeDescription + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param service_load_metrics: The service load metrics. + :type service_load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param is_default_move_cost_specified: Indicates if the DefaultMoveCost + property is specified. + :type is_default_move_cost_specified: bool + :param service_package_activation_mode: The activation mode of service + package to be used for a service. Possible values include: + 'SharedProcess', 'ExclusiveProcess' + :type service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :param service_dns_name: The DNS name of the service. It requires the DNS + system service to be enabled in Service Fabric cluster. + :type service_dns_name: str + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceDescription', 'Stateless': 'StatelessServiceDescription'} + } + + def __init__(self, *, service_name: str, service_type_name: str, partition_description, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, **kwargs) -> None: + super(ServiceDescription, self).__init__(**kwargs) + self.application_name = application_name + self.service_name = service_name + self.service_type_name = service_type_name + self.initialization_data = initialization_data + self.partition_description = partition_description + self.placement_constraints = placement_constraints + self.correlation_scheme = correlation_scheme + self.service_load_metrics = service_load_metrics + self.service_placement_policies = service_placement_policies + self.default_move_cost = default_move_cost + self.is_default_move_cost_specified = is_default_move_cost_specified + self.service_package_activation_mode = service_package_activation_mode + self.service_dns_name = service_dns_name + self.scaling_policies = scaling_policies + self.tags_required_to_place = tags_required_to_place + self.tags_required_to_run = tags_required_to_run + self.service_kind = None diff --git a/customSDK/servicefabric/models/service_event.py b/customSDK/servicefabric/models/service_event.py new file mode 100644 index 0000000..8babe82 --- /dev/null +++ b/customSDK/servicefabric/models/service_event.py @@ -0,0 +1,69 @@ +# 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 .fabric_event import FabricEvent + + +class ServiceEvent(FabricEvent): + """Represents the base for all Service Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ServiceCreatedEvent, ServiceDeletedEvent, + ServiceNewHealthReportEvent, ServiceHealthReportExpiredEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ServiceCreated': 'ServiceCreatedEvent', 'ServiceDeleted': 'ServiceDeletedEvent', 'ServiceNewHealthReport': 'ServiceNewHealthReportEvent', 'ServiceHealthReportExpired': 'ServiceHealthReportExpiredEvent'} + } + + def __init__(self, **kwargs): + super(ServiceEvent, self).__init__(**kwargs) + self.service_id = kwargs.get('service_id', None) + self.kind = 'ServiceEvent' diff --git a/customSDK/servicefabric/models/service_event_py3.py b/customSDK/servicefabric/models/service_event_py3.py new file mode 100644 index 0000000..da126ab --- /dev/null +++ b/customSDK/servicefabric/models/service_event_py3.py @@ -0,0 +1,69 @@ +# 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 .fabric_event_py3 import FabricEvent + + +class ServiceEvent(FabricEvent): + """Represents the base for all Service Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ServiceCreatedEvent, ServiceDeletedEvent, + ServiceNewHealthReportEvent, ServiceHealthReportExpiredEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ServiceCreated': 'ServiceCreatedEvent', 'ServiceDeleted': 'ServiceDeletedEvent', 'ServiceNewHealthReport': 'ServiceNewHealthReportEvent', 'ServiceHealthReportExpired': 'ServiceHealthReportExpiredEvent'} + } + + def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ServiceEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.service_id = service_id + self.kind = 'ServiceEvent' diff --git a/customSDK/servicefabric/models/_service_fabric_client_ap_is_enums.py b/customSDK/servicefabric/models/service_fabric_client_ap_is_enums.py similarity index 99% rename from customSDK/servicefabric/models/_service_fabric_client_ap_is_enums.py rename to customSDK/servicefabric/models/service_fabric_client_ap_is_enums.py index 974b344..7072ed2 100644 --- a/customSDK/servicefabric/models/_service_fabric_client_ap_is_enums.py +++ b/customSDK/servicefabric/models/service_fabric_client_ap_is_enums.py @@ -376,6 +376,7 @@ class HealthEvaluationKind(str, Enum): delta_nodes_check = "DeltaNodesCheck" #: Indicates that the health evaluation is for the delta of unhealthy cluster nodes. The value is 19. upgrade_domain_delta_nodes_check = "UpgradeDomainDeltaNodesCheck" #: Indicates that the health evaluation is for the delta of unhealthy upgrade domain cluster nodes. The value is 20. application_type_applications = "ApplicationTypeApplications" #: – Indicates that the health evaluation is for applications of an application type. The value is 21. + node_type_nodes = "NodeTypeNodes" #: – Indicates that the health evaluation is for nodes of a node type. The value is 22. class Ordering(str, Enum): @@ -983,7 +984,7 @@ class SettingType(str, Enum): class Scheme(str, Enum): http = "http" #: Indicates that the probe is http. - https = "https" #: Indicates that the probe is https. No cert validaton. + https = "https" #: Indicates that the probe is https. No cert validation. class ApplicationResourceUpgradeState(str, Enum): diff --git a/customSDK/servicefabric/models/service_from_template_description.py b/customSDK/servicefabric/models/service_from_template_description.py new file mode 100644 index 0000000..6a3a290 --- /dev/null +++ b/customSDK/servicefabric/models/service_from_template_description.py @@ -0,0 +1,65 @@ +# 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 msrest.serialization import Model + + +class ServiceFromTemplateDescription(Model): + """Defines description for creating a Service Fabric service from a template + defined in the application manifest. + + All required parameters must be populated in order to send to Azure. + + :param application_name: Required. The name of the application, including + the 'fabric:' URI scheme. + :type application_name: str + :param service_name: Required. The full name of the service with 'fabric:' + URI scheme. + :type service_name: str + :param service_type_name: Required. Name of the service type as specified + in the service manifest. + :type service_type_name: str + :param initialization_data: The initialization data for the newly created + service instance. + :type initialization_data: list[int] + :param service_package_activation_mode: The activation mode of service + package to be used for a service. Possible values include: + 'SharedProcess', 'ExclusiveProcess' + :type service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :param service_dns_name: The DNS name of the service. It requires the DNS + system service to be enabled in Service Fabric cluster. + :type service_dns_name: str + """ + + _validation = { + 'application_name': {'required': True}, + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceFromTemplateDescription, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.service_name = kwargs.get('service_name', None) + self.service_type_name = kwargs.get('service_type_name', None) + self.initialization_data = kwargs.get('initialization_data', None) + self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) + self.service_dns_name = kwargs.get('service_dns_name', None) diff --git a/customSDK/servicefabric/models/service_from_template_description_py3.py b/customSDK/servicefabric/models/service_from_template_description_py3.py new file mode 100644 index 0000000..be8bf5e --- /dev/null +++ b/customSDK/servicefabric/models/service_from_template_description_py3.py @@ -0,0 +1,65 @@ +# 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 msrest.serialization import Model + + +class ServiceFromTemplateDescription(Model): + """Defines description for creating a Service Fabric service from a template + defined in the application manifest. + + All required parameters must be populated in order to send to Azure. + + :param application_name: Required. The name of the application, including + the 'fabric:' URI scheme. + :type application_name: str + :param service_name: Required. The full name of the service with 'fabric:' + URI scheme. + :type service_name: str + :param service_type_name: Required. Name of the service type as specified + in the service manifest. + :type service_type_name: str + :param initialization_data: The initialization data for the newly created + service instance. + :type initialization_data: list[int] + :param service_package_activation_mode: The activation mode of service + package to be used for a service. Possible values include: + 'SharedProcess', 'ExclusiveProcess' + :type service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :param service_dns_name: The DNS name of the service. It requires the DNS + system service to be enabled in Service Fabric cluster. + :type service_dns_name: str + """ + + _validation = { + 'application_name': {'required': True}, + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + } + + def __init__(self, *, application_name: str, service_name: str, service_type_name: str, initialization_data=None, service_package_activation_mode=None, service_dns_name: str=None, **kwargs) -> None: + super(ServiceFromTemplateDescription, self).__init__(**kwargs) + self.application_name = application_name + self.service_name = service_name + self.service_type_name = service_type_name + self.initialization_data = initialization_data + self.service_package_activation_mode = service_package_activation_mode + self.service_dns_name = service_dns_name diff --git a/customSDK/servicefabric/models/service_health.py b/customSDK/servicefabric/models/service_health.py new file mode 100644 index 0000000..885831d --- /dev/null +++ b/customSDK/servicefabric/models/service_health.py @@ -0,0 +1,56 @@ +# 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 .entity_health import EntityHealth + + +class ServiceHealth(EntityHealth): + """Information about the health of a Service Fabric service. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param name: The name of the service whose health information is described + by this object. + :type name: str + :param partition_health_states: The list of partition health states + associated with the service. + :type partition_health_states: + list[~azure.servicefabric.models.PartitionHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'partition_health_states': {'key': 'PartitionHealthStates', 'type': '[PartitionHealthState]'}, + } + + def __init__(self, **kwargs): + super(ServiceHealth, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.partition_health_states = kwargs.get('partition_health_states', None) diff --git a/customSDK/servicefabric/models/service_health_evaluation.py b/customSDK/servicefabric/models/service_health_evaluation.py new file mode 100644 index 0000000..11fdbba --- /dev/null +++ b/customSDK/servicefabric/models/service_health_evaluation.py @@ -0,0 +1,61 @@ +# 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 .health_evaluation import HealthEvaluation + + +class ServiceHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a service, containing information about + the data and the algorithm used by health store to evaluate health. The + evaluation is returned only when the aggregated health state is either + Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param service_name: Name of the service whose health evaluation is + described by this object. + :type service_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the service. The types of the + unhealthy evaluations can be PartitionsHealthEvaluation or + EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(ServiceHealthEvaluation, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Service' diff --git a/customSDK/servicefabric/models/service_health_evaluation_py3.py b/customSDK/servicefabric/models/service_health_evaluation_py3.py new file mode 100644 index 0000000..887fbc4 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_evaluation_py3.py @@ -0,0 +1,61 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class ServiceHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a service, containing information about + the data and the algorithm used by health store to evaluate health. The + evaluation is returned only when the aggregated health state is either + Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param service_name: Name of the service whose health evaluation is + described by this object. + :type service_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the service. The types of the + unhealthy evaluations can be PartitionsHealthEvaluation or + EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, service_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: + super(ServiceHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.service_name = service_name + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Service' diff --git a/customSDK/servicefabric/models/service_health_py3.py b/customSDK/servicefabric/models/service_health_py3.py new file mode 100644 index 0000000..7365030 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_py3.py @@ -0,0 +1,56 @@ +# 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 .entity_health_py3 import EntityHealth + + +class ServiceHealth(EntityHealth): + """Information about the health of a Service Fabric service. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param name: The name of the service whose health information is described + by this object. + :type name: str + :param partition_health_states: The list of partition health states + associated with the service. + :type partition_health_states: + list[~azure.servicefabric.models.PartitionHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'partition_health_states': {'key': 'PartitionHealthStates', 'type': '[PartitionHealthState]'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, partition_health_states=None, **kwargs) -> None: + super(ServiceHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.name = name + self.partition_health_states = partition_health_states diff --git a/customSDK/servicefabric/models/service_health_report_expired_event.py b/customSDK/servicefabric/models/service_health_report_expired_event.py new file mode 100644 index 0000000..708f521 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_report_expired_event.py @@ -0,0 +1,106 @@ +# 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 .service_event import ServiceEvent + + +class ServiceHealthReportExpiredEvent(ServiceEvent): + """Service Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param instance_id: Required. Id of Service instance. + :type instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + 'instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServiceHealthReportExpiredEvent, self).__init__(**kwargs) + self.instance_id = kwargs.get('instance_id', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'ServiceHealthReportExpired' diff --git a/customSDK/servicefabric/models/service_health_report_expired_event_py3.py b/customSDK/servicefabric/models/service_health_report_expired_event_py3.py new file mode 100644 index 0000000..bdde10d --- /dev/null +++ b/customSDK/servicefabric/models/service_health_report_expired_event_py3.py @@ -0,0 +1,106 @@ +# 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 .service_event_py3 import ServiceEvent + + +class ServiceHealthReportExpiredEvent(ServiceEvent): + """Service Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param instance_id: Required. Id of Service instance. + :type instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + 'instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ServiceHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) + self.instance_id = instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'ServiceHealthReportExpired' diff --git a/customSDK/servicefabric/models/service_health_state.py b/customSDK/servicefabric/models/service_health_state.py new file mode 100644 index 0000000..3a3db02 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_state.py @@ -0,0 +1,37 @@ +# 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 .entity_health_state import EntityHealthState + + +class ServiceHealthState(EntityHealthState): + """Represents the health state of a service, which contains the service + identifier and its aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param service_name: Name of the service whose health state is represented + by this object. + :type service_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceHealthState, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) diff --git a/customSDK/servicefabric/models/service_health_state_chunk.py b/customSDK/servicefabric/models/service_health_state_chunk.py new file mode 100644 index 0000000..b1bb24c --- /dev/null +++ b/customSDK/servicefabric/models/service_health_state_chunk.py @@ -0,0 +1,43 @@ +# 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 .entity_health_state_chunk import EntityHealthStateChunk + + +class ServiceHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a service, which contains the service + name, its aggregated health state and any partitions that respect the + filters in the cluster health chunk query description. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_name: The name of the service whose health state chunk is + provided in this object. + :type service_name: str + :param partition_health_state_chunks: The list of partition health state + chunks belonging to the service that respect the filters in the cluster + health chunk query description. + :type partition_health_state_chunks: + ~azure.servicefabric.models.PartitionHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_health_state_chunks': {'key': 'PartitionHealthStateChunks', 'type': 'PartitionHealthStateChunkList'}, + } + + def __init__(self, **kwargs): + super(ServiceHealthStateChunk, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_health_state_chunks = kwargs.get('partition_health_state_chunks', None) diff --git a/customSDK/servicefabric/models/service_health_state_chunk_list.py b/customSDK/servicefabric/models/service_health_state_chunk_list.py new file mode 100644 index 0000000..6351111 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_state_chunk_list.py @@ -0,0 +1,30 @@ +# 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 msrest.serialization import Model + + +class ServiceHealthStateChunkList(Model): + """The list of service health state chunks that respect the input filters in + the chunk query. Returned by get cluster health state chunks query. + + :param items: The list of service health state chunks that respect the + input filters in the chunk query. + :type items: list[~azure.servicefabric.models.ServiceHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[ServiceHealthStateChunk]'}, + } + + def __init__(self, **kwargs): + super(ServiceHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/service_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/service_health_state_chunk_list_py3.py new file mode 100644 index 0000000..9f74730 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_state_chunk_list_py3.py @@ -0,0 +1,30 @@ +# 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 msrest.serialization import Model + + +class ServiceHealthStateChunkList(Model): + """The list of service health state chunks that respect the input filters in + the chunk query. Returned by get cluster health state chunks query. + + :param items: The list of service health state chunks that respect the + input filters in the chunk query. + :type items: list[~azure.servicefabric.models.ServiceHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[ServiceHealthStateChunk]'}, + } + + def __init__(self, *, items=None, **kwargs) -> None: + super(ServiceHealthStateChunkList, self).__init__(**kwargs) + self.items = items diff --git a/customSDK/servicefabric/models/service_health_state_chunk_py3.py b/customSDK/servicefabric/models/service_health_state_chunk_py3.py new file mode 100644 index 0000000..18f343c --- /dev/null +++ b/customSDK/servicefabric/models/service_health_state_chunk_py3.py @@ -0,0 +1,43 @@ +# 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 .entity_health_state_chunk_py3 import EntityHealthStateChunk + + +class ServiceHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a service, which contains the service + name, its aggregated health state and any partitions that respect the + filters in the cluster health chunk query description. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_name: The name of the service whose health state chunk is + provided in this object. + :type service_name: str + :param partition_health_state_chunks: The list of partition health state + chunks belonging to the service that respect the filters in the cluster + health chunk query description. + :type partition_health_state_chunks: + ~azure.servicefabric.models.PartitionHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_health_state_chunks': {'key': 'PartitionHealthStateChunks', 'type': 'PartitionHealthStateChunkList'}, + } + + def __init__(self, *, health_state=None, service_name: str=None, partition_health_state_chunks=None, **kwargs) -> None: + super(ServiceHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.service_name = service_name + self.partition_health_state_chunks = partition_health_state_chunks diff --git a/customSDK/servicefabric/models/service_health_state_filter.py b/customSDK/servicefabric/models/service_health_state_filter.py new file mode 100644 index 0000000..27b5ce5 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_state_filter.py @@ -0,0 +1,83 @@ +# 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 msrest.serialization import Model + + +class ServiceHealthStateFilter(Model): + """Defines matching criteria to determine whether a service should be included + as a child of an application in the cluster health chunk. + The services are only returned if the parent application matches a filter + specified in the cluster health chunk query description. + One filter can match zero, one or multiple services, depending on its + properties. + + :param service_name_filter: The name of the service that matches the + filter. The filter is applied only to the specified service, if it exists. + If the service doesn't exist, no service is returned in the cluster health + chunk based on this filter. + If the service exists, it is included as the application's child if the + health state matches the other filter properties. + If not specified, all services that match the parent filters (if any) are + taken into consideration and matched against the other filter members, + like health state filter. + :type service_name_filter: str + :param health_state_filter: The filter for the health state of the + services. It allows selecting services if they match the desired health + states. + The possible values are integer value of one of the following health + states. Only services that match the filter are returned. All services are + used to evaluate the cluster aggregated health state. + If not specified, default value is None, unless the service name is + specified. If the filter has default value and service name is specified, + the matching service is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches services with + HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + :param partition_filters: Defines a list of filters that specify which + partitions to be included in the returned cluster health chunk as children + of the service. The partitions are returned only if the parent service + matches a filter. + If the list is empty, no partitions are returned. All the partitions are + used to evaluate the parent service aggregated health state, regardless of + the input filters. + The service filter may specify multiple partition filters. + For example, it can specify a filter to return all partitions with health + state Error and another filter to always include a partition identified by + its partition ID. + :type partition_filters: + list[~azure.servicefabric.models.PartitionHealthStateFilter] + """ + + _attribute_map = { + 'service_name_filter': {'key': 'ServiceNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'partition_filters': {'key': 'PartitionFilters', 'type': '[PartitionHealthStateFilter]'}, + } + + def __init__(self, **kwargs): + super(ServiceHealthStateFilter, self).__init__(**kwargs) + self.service_name_filter = kwargs.get('service_name_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) + self.partition_filters = kwargs.get('partition_filters', None) diff --git a/customSDK/servicefabric/models/service_health_state_filter_py3.py b/customSDK/servicefabric/models/service_health_state_filter_py3.py new file mode 100644 index 0000000..ba9ff59 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_state_filter_py3.py @@ -0,0 +1,83 @@ +# 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 msrest.serialization import Model + + +class ServiceHealthStateFilter(Model): + """Defines matching criteria to determine whether a service should be included + as a child of an application in the cluster health chunk. + The services are only returned if the parent application matches a filter + specified in the cluster health chunk query description. + One filter can match zero, one or multiple services, depending on its + properties. + + :param service_name_filter: The name of the service that matches the + filter. The filter is applied only to the specified service, if it exists. + If the service doesn't exist, no service is returned in the cluster health + chunk based on this filter. + If the service exists, it is included as the application's child if the + health state matches the other filter properties. + If not specified, all services that match the parent filters (if any) are + taken into consideration and matched against the other filter members, + like health state filter. + :type service_name_filter: str + :param health_state_filter: The filter for the health state of the + services. It allows selecting services if they match the desired health + states. + The possible values are integer value of one of the following health + states. Only services that match the filter are returned. All services are + used to evaluate the cluster aggregated health state. + If not specified, default value is None, unless the service name is + specified. If the filter has default value and service name is specified, + the matching service is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches services with + HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + :param partition_filters: Defines a list of filters that specify which + partitions to be included in the returned cluster health chunk as children + of the service. The partitions are returned only if the parent service + matches a filter. + If the list is empty, no partitions are returned. All the partitions are + used to evaluate the parent service aggregated health state, regardless of + the input filters. + The service filter may specify multiple partition filters. + For example, it can specify a filter to return all partitions with health + state Error and another filter to always include a partition identified by + its partition ID. + :type partition_filters: + list[~azure.servicefabric.models.PartitionHealthStateFilter] + """ + + _attribute_map = { + 'service_name_filter': {'key': 'ServiceNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'partition_filters': {'key': 'PartitionFilters', 'type': '[PartitionHealthStateFilter]'}, + } + + def __init__(self, *, service_name_filter: str=None, health_state_filter: int=0, partition_filters=None, **kwargs) -> None: + super(ServiceHealthStateFilter, self).__init__(**kwargs) + self.service_name_filter = service_name_filter + self.health_state_filter = health_state_filter + self.partition_filters = partition_filters diff --git a/customSDK/servicefabric/models/service_health_state_py3.py b/customSDK/servicefabric/models/service_health_state_py3.py new file mode 100644 index 0000000..1d23d02 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_state_py3.py @@ -0,0 +1,37 @@ +# 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 .entity_health_state_py3 import EntityHealthState + + +class ServiceHealthState(EntityHealthState): + """Represents the health state of a service, which contains the service + identifier and its aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param service_name: Name of the service whose health state is represented + by this object. + :type service_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, service_name: str=None, **kwargs) -> None: + super(ServiceHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.service_name = service_name diff --git a/customSDK/servicefabric/models/service_identity.py b/customSDK/servicefabric/models/service_identity.py new file mode 100644 index 0000000..c597c3b --- /dev/null +++ b/customSDK/servicefabric/models/service_identity.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class ServiceIdentity(Model): + """Map service identity friendly name to an application identity. + + :param name: The identity friendly name. + :type name: str + :param identity_ref: The application identity name. + :type identity_ref: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'identity_ref': {'key': 'identityRef', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceIdentity, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.identity_ref = kwargs.get('identity_ref', None) diff --git a/customSDK/servicefabric/models/service_identity_py3.py b/customSDK/servicefabric/models/service_identity_py3.py new file mode 100644 index 0000000..2d95be7 --- /dev/null +++ b/customSDK/servicefabric/models/service_identity_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class ServiceIdentity(Model): + """Map service identity friendly name to an application identity. + + :param name: The identity friendly name. + :type name: str + :param identity_ref: The application identity name. + :type identity_ref: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'identity_ref': {'key': 'identityRef', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, identity_ref: str=None, **kwargs) -> None: + super(ServiceIdentity, self).__init__(**kwargs) + self.name = name + self.identity_ref = identity_ref diff --git a/customSDK/servicefabric/models/service_info.py b/customSDK/servicefabric/models/service_info.py new file mode 100644 index 0000000..d6e72ba --- /dev/null +++ b/customSDK/servicefabric/models/service_info.py @@ -0,0 +1,80 @@ +# 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 msrest.serialization import Model + + +class ServiceInfo(Model): + """Information about a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceInfo, StatelessServiceInfo + + All required parameters must be populated in order to send to Azure. + + :param id: The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to + identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type id: str + :param name: The full name of the service with 'fabric:' URI scheme. + :type name: str + :param type_name: Name of the service type as specified in the service + manifest. + :type type_name: str + :param manifest_version: The version of the service manifest. + :type manifest_version: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_status: The status of the application. Possible values + include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + 'Failed' + :type service_status: str or ~azure.servicefabric.models.ServiceStatus + :param is_service_group: Whether the service is in a service group. + :type is_service_group: bool + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceInfo', 'Stateless': 'StatelessServiceInfo'} + } + + def __init__(self, **kwargs): + super(ServiceInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_name = kwargs.get('type_name', None) + self.manifest_version = kwargs.get('manifest_version', None) + self.health_state = kwargs.get('health_state', None) + self.service_status = kwargs.get('service_status', None) + self.is_service_group = kwargs.get('is_service_group', None) + self.service_kind = None diff --git a/customSDK/servicefabric/models/service_info_py3.py b/customSDK/servicefabric/models/service_info_py3.py new file mode 100644 index 0000000..2cba52c --- /dev/null +++ b/customSDK/servicefabric/models/service_info_py3.py @@ -0,0 +1,80 @@ +# 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 msrest.serialization import Model + + +class ServiceInfo(Model): + """Information about a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceInfo, StatelessServiceInfo + + All required parameters must be populated in order to send to Azure. + + :param id: The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to + identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type id: str + :param name: The full name of the service with 'fabric:' URI scheme. + :type name: str + :param type_name: Name of the service type as specified in the service + manifest. + :type type_name: str + :param manifest_version: The version of the service manifest. + :type manifest_version: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_status: The status of the application. Possible values + include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + 'Failed' + :type service_status: str or ~azure.servicefabric.models.ServiceStatus + :param is_service_group: Whether the service is in a service group. + :type is_service_group: bool + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceInfo', 'Stateless': 'StatelessServiceInfo'} + } + + def __init__(self, *, id: str=None, name: str=None, type_name: str=None, manifest_version: str=None, health_state=None, service_status=None, is_service_group: bool=None, **kwargs) -> None: + super(ServiceInfo, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_name = type_name + self.manifest_version = manifest_version + self.health_state = health_state + self.service_status = service_status + self.is_service_group = is_service_group + self.service_kind = None diff --git a/customSDK/servicefabric/models/service_load_metric_description.py b/customSDK/servicefabric/models/service_load_metric_description.py new file mode 100644 index 0000000..00bc3f3 --- /dev/null +++ b/customSDK/servicefabric/models/service_load_metric_description.py @@ -0,0 +1,60 @@ +# 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 msrest.serialization import Model + + +class ServiceLoadMetricDescription(Model): + """Specifies a metric to load balance a service during runtime. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the metric. If the service chooses to + report load during runtime, the load metric name should match the name + that is specified in Name exactly. Note that metric names are + case-sensitive. + :type name: str + :param weight: The service load metric relative weight, compared to other + metrics configured for this service, as a number. Possible values include: + 'Zero', 'Low', 'Medium', 'High' + :type weight: str or ~azure.servicefabric.models.ServiceLoadMetricWeight + :param primary_default_load: Used only for Stateful services. The default + amount of load, as a number, that this service creates for this metric + when it is a Primary replica. + :type primary_default_load: int + :param secondary_default_load: Used only for Stateful services. The + default amount of load, as a number, that this service creates for this + metric when it is a Secondary replica. + :type secondary_default_load: int + :param default_load: Used only for Stateless services. The default amount + of load, as a number, that this service creates for this metric. + :type default_load: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'weight': {'key': 'Weight', 'type': 'str'}, + 'primary_default_load': {'key': 'PrimaryDefaultLoad', 'type': 'int'}, + 'secondary_default_load': {'key': 'SecondaryDefaultLoad', 'type': 'int'}, + 'default_load': {'key': 'DefaultLoad', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ServiceLoadMetricDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.weight = kwargs.get('weight', None) + self.primary_default_load = kwargs.get('primary_default_load', None) + self.secondary_default_load = kwargs.get('secondary_default_load', None) + self.default_load = kwargs.get('default_load', None) diff --git a/customSDK/servicefabric/models/service_load_metric_description_py3.py b/customSDK/servicefabric/models/service_load_metric_description_py3.py new file mode 100644 index 0000000..7b764fb --- /dev/null +++ b/customSDK/servicefabric/models/service_load_metric_description_py3.py @@ -0,0 +1,60 @@ +# 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 msrest.serialization import Model + + +class ServiceLoadMetricDescription(Model): + """Specifies a metric to load balance a service during runtime. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the metric. If the service chooses to + report load during runtime, the load metric name should match the name + that is specified in Name exactly. Note that metric names are + case-sensitive. + :type name: str + :param weight: The service load metric relative weight, compared to other + metrics configured for this service, as a number. Possible values include: + 'Zero', 'Low', 'Medium', 'High' + :type weight: str or ~azure.servicefabric.models.ServiceLoadMetricWeight + :param primary_default_load: Used only for Stateful services. The default + amount of load, as a number, that this service creates for this metric + when it is a Primary replica. + :type primary_default_load: int + :param secondary_default_load: Used only for Stateful services. The + default amount of load, as a number, that this service creates for this + metric when it is a Secondary replica. + :type secondary_default_load: int + :param default_load: Used only for Stateless services. The default amount + of load, as a number, that this service creates for this metric. + :type default_load: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'weight': {'key': 'Weight', 'type': 'str'}, + 'primary_default_load': {'key': 'PrimaryDefaultLoad', 'type': 'int'}, + 'secondary_default_load': {'key': 'SecondaryDefaultLoad', 'type': 'int'}, + 'default_load': {'key': 'DefaultLoad', 'type': 'int'}, + } + + def __init__(self, *, name: str, weight=None, primary_default_load: int=None, secondary_default_load: int=None, default_load: int=None, **kwargs) -> None: + super(ServiceLoadMetricDescription, self).__init__(**kwargs) + self.name = name + self.weight = weight + self.primary_default_load = primary_default_load + self.secondary_default_load = secondary_default_load + self.default_load = default_load diff --git a/customSDK/servicefabric/models/service_name_info.py b/customSDK/servicefabric/models/service_name_info.py new file mode 100644 index 0000000..75fd440 --- /dev/null +++ b/customSDK/servicefabric/models/service_name_info.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class ServiceNameInfo(Model): + """Information about the service name. + + :param id: The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to + identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type id: str + :param name: The full name of the service with 'fabric:' URI scheme. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceNameInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/service_name_info_py3.py b/customSDK/servicefabric/models/service_name_info_py3.py new file mode 100644 index 0000000..474752f --- /dev/null +++ b/customSDK/servicefabric/models/service_name_info_py3.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class ServiceNameInfo(Model): + """Information about the service name. + + :param id: The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to + identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type id: str + :param name: The full name of the service with 'fabric:' URI scheme. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(ServiceNameInfo, self).__init__(**kwargs) + self.id = id + self.name = name diff --git a/customSDK/servicefabric/models/service_new_health_report_event.py b/customSDK/servicefabric/models/service_new_health_report_event.py new file mode 100644 index 0000000..138f18a --- /dev/null +++ b/customSDK/servicefabric/models/service_new_health_report_event.py @@ -0,0 +1,106 @@ +# 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 .service_event import ServiceEvent + + +class ServiceNewHealthReportEvent(ServiceEvent): + """Service Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param instance_id: Required. Id of Service instance. + :type instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + 'instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServiceNewHealthReportEvent, self).__init__(**kwargs) + self.instance_id = kwargs.get('instance_id', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'ServiceNewHealthReport' diff --git a/customSDK/servicefabric/models/service_new_health_report_event_py3.py b/customSDK/servicefabric/models/service_new_health_report_event_py3.py new file mode 100644 index 0000000..b1e2d6b --- /dev/null +++ b/customSDK/servicefabric/models/service_new_health_report_event_py3.py @@ -0,0 +1,106 @@ +# 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 .service_event_py3 import ServiceEvent + + +class ServiceNewHealthReportEvent(ServiceEvent): + """Service Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param instance_id: Required. Id of Service instance. + :type instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + 'instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ServiceNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) + self.instance_id = instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'ServiceNewHealthReport' diff --git a/customSDK/servicefabric/models/service_partition_info.py b/customSDK/servicefabric/models/service_partition_info.py new file mode 100644 index 0000000..2aaa403 --- /dev/null +++ b/customSDK/servicefabric/models/service_partition_info.py @@ -0,0 +1,61 @@ +# 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 msrest.serialization import Model + + +class ServicePartitionInfo(Model): + """Information about a partition of a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServicePartitionInfo, + StatelessServicePartitionInfo + + All required parameters must be populated in order to send to Azure. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param partition_status: The status of the service fabric service + partition. Possible values include: 'Invalid', 'Ready', 'NotReady', + 'InQuorumLoss', 'Reconfiguring', 'Deleting' + :type partition_status: str or + ~azure.servicefabric.models.ServicePartitionStatus + :param partition_information: Information about the partition identity, + partitioning scheme and keys supported by it. + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServicePartitionInfo', 'Stateless': 'StatelessServicePartitionInfo'} + } + + def __init__(self, **kwargs): + super(ServicePartitionInfo, self).__init__(**kwargs) + self.health_state = kwargs.get('health_state', None) + self.partition_status = kwargs.get('partition_status', None) + self.partition_information = kwargs.get('partition_information', None) + self.service_kind = None diff --git a/customSDK/servicefabric/models/service_partition_info_py3.py b/customSDK/servicefabric/models/service_partition_info_py3.py new file mode 100644 index 0000000..e82a8a1 --- /dev/null +++ b/customSDK/servicefabric/models/service_partition_info_py3.py @@ -0,0 +1,61 @@ +# 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 msrest.serialization import Model + + +class ServicePartitionInfo(Model): + """Information about a partition of a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServicePartitionInfo, + StatelessServicePartitionInfo + + All required parameters must be populated in order to send to Azure. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param partition_status: The status of the service fabric service + partition. Possible values include: 'Invalid', 'Ready', 'NotReady', + 'InQuorumLoss', 'Reconfiguring', 'Deleting' + :type partition_status: str or + ~azure.servicefabric.models.ServicePartitionStatus + :param partition_information: Information about the partition identity, + partitioning scheme and keys supported by it. + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServicePartitionInfo', 'Stateless': 'StatelessServicePartitionInfo'} + } + + def __init__(self, *, health_state=None, partition_status=None, partition_information=None, **kwargs) -> None: + super(ServicePartitionInfo, self).__init__(**kwargs) + self.health_state = health_state + self.partition_status = partition_status + self.partition_information = partition_information + self.service_kind = None diff --git a/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description.py b/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description.py new file mode 100644 index 0000000..6b8b25d --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description.py @@ -0,0 +1,42 @@ +# 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 .service_placement_policy_description import ServicePlacementPolicyDescription + + +class ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + allowing multiple stateless instances of a partition of the service to be + placed on a node. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: Holdover from other policy descriptions, not used for + this policy, values are ignored by runtime. Keeping it for any + backwards-compatibility with clients. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.type = 'AllowMultipleStatelessInstancesOnNode' diff --git a/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description_py3.py new file mode 100644 index 0000000..ee18a5e --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description_py3.py @@ -0,0 +1,42 @@ +# 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 .service_placement_policy_description_py3 import ServicePlacementPolicyDescription + + +class ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + allowing multiple stateless instances of a partition of the service to be + placed on a node. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: Holdover from other policy descriptions, not used for + this policy, values are ignored by runtime. Keeping it for any + backwards-compatibility with clients. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, *, domain_name: str=None, **kwargs) -> None: + super(ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, self).__init__(**kwargs) + self.domain_name = domain_name + self.type = 'AllowMultipleStatelessInstancesOnNode' diff --git a/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description.py b/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description.py new file mode 100644 index 0000000..9095871 --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description.py @@ -0,0 +1,41 @@ +# 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 .service_placement_policy_description import ServicePlacementPolicyDescription + + +class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where a particular fault or upgrade domain should not be used for placement + of the instances or replicas of that service. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: The name of the domain that should not be used for + placement. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicePlacementInvalidDomainPolicyDescription, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.type = 'InvalidDomain' diff --git a/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description_py3.py new file mode 100644 index 0000000..df26187 --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description_py3.py @@ -0,0 +1,41 @@ +# 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 .service_placement_policy_description_py3 import ServicePlacementPolicyDescription + + +class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where a particular fault or upgrade domain should not be used for placement + of the instances or replicas of that service. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: The name of the domain that should not be used for + placement. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, *, domain_name: str=None, **kwargs) -> None: + super(ServicePlacementInvalidDomainPolicyDescription, self).__init__(**kwargs) + self.domain_name = domain_name + self.type = 'InvalidDomain' diff --git a/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description.py b/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description.py new file mode 100644 index 0000000..f0eb52e --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description.py @@ -0,0 +1,36 @@ +# 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 .service_placement_policy_description import ServicePlacementPolicyDescription + + +class ServicePlacementNonPartiallyPlaceServicePolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where all replicas must be able to be placed in order for any replicas to + be created. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicePlacementNonPartiallyPlaceServicePolicyDescription, self).__init__(**kwargs) + self.type = 'NonPartiallyPlaceService' diff --git a/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description_py3.py new file mode 100644 index 0000000..1ecf5dc --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description_py3.py @@ -0,0 +1,36 @@ +# 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 .service_placement_policy_description_py3 import ServicePlacementPolicyDescription + + +class ServicePlacementNonPartiallyPlaceServicePolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where all replicas must be able to be placed in order for any replicas to + be created. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ServicePlacementNonPartiallyPlaceServicePolicyDescription, self).__init__(**kwargs) + self.type = 'NonPartiallyPlaceService' diff --git a/customSDK/servicefabric/models/service_placement_policy_description.py b/customSDK/servicefabric/models/service_placement_policy_description.py new file mode 100644 index 0000000..ef550c9 --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_policy_description.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class ServicePlacementPolicyDescription(Model): + """Describes the policy to be used for placement of a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ServicePlacementInvalidDomainPolicyDescription, + ServicePlacementNonPartiallyPlaceServicePolicyDescription, + ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, + ServicePlacementPreferPrimaryDomainPolicyDescription, + ServicePlacementRequiredDomainPolicyDescription, + ServicePlacementRequireDomainDistributionPolicyDescription + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'AllowMultipleStatelessInstancesOnNode': 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} + } + + def __init__(self, **kwargs): + super(ServicePlacementPolicyDescription, self).__init__(**kwargs) + self.type = None diff --git a/customSDK/servicefabric/models/service_placement_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_policy_description_py3.py new file mode 100644 index 0000000..19b9e7b --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_policy_description_py3.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class ServicePlacementPolicyDescription(Model): + """Describes the policy to be used for placement of a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ServicePlacementInvalidDomainPolicyDescription, + ServicePlacementNonPartiallyPlaceServicePolicyDescription, + ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, + ServicePlacementPreferPrimaryDomainPolicyDescription, + ServicePlacementRequiredDomainPolicyDescription, + ServicePlacementRequireDomainDistributionPolicyDescription + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'AllowMultipleStatelessInstancesOnNode': 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} + } + + def __init__(self, **kwargs) -> None: + super(ServicePlacementPolicyDescription, self).__init__(**kwargs) + self.type = None diff --git a/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description.py b/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description.py new file mode 100644 index 0000000..9dbda50 --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description.py @@ -0,0 +1,48 @@ +# 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 .service_placement_policy_description import ServicePlacementPolicyDescription + + +class ServicePlacementPreferPrimaryDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where the service's Primary replicas should optimally be placed in a + particular domain. + This placement policy is usually used with fault domains in scenarios where + the Service Fabric cluster is geographically distributed in order to + indicate that a service's primary replica should be located in a particular + fault domain, which in geo-distributed scenarios usually aligns with + regional or datacenter boundaries. Note that since this is an optimization + it is possible that the Primary replica may not end up located in this + domain due to failures, capacity limits, or other constraints. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: The name of the domain that should used for placement + as per this policy. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicePlacementPreferPrimaryDomainPolicyDescription, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.type = 'PreferPrimaryDomain' diff --git a/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description_py3.py new file mode 100644 index 0000000..4f7eb9c --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description_py3.py @@ -0,0 +1,48 @@ +# 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 .service_placement_policy_description_py3 import ServicePlacementPolicyDescription + + +class ServicePlacementPreferPrimaryDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where the service's Primary replicas should optimally be placed in a + particular domain. + This placement policy is usually used with fault domains in scenarios where + the Service Fabric cluster is geographically distributed in order to + indicate that a service's primary replica should be located in a particular + fault domain, which in geo-distributed scenarios usually aligns with + regional or datacenter boundaries. Note that since this is an optimization + it is possible that the Primary replica may not end up located in this + domain due to failures, capacity limits, or other constraints. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: The name of the domain that should used for placement + as per this policy. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, *, domain_name: str=None, **kwargs) -> None: + super(ServicePlacementPreferPrimaryDomainPolicyDescription, self).__init__(**kwargs) + self.domain_name = domain_name + self.type = 'PreferPrimaryDomain' diff --git a/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description.py b/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description.py new file mode 100644 index 0000000..c161663 --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description.py @@ -0,0 +1,49 @@ +# 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 .service_placement_policy_description import ServicePlacementPolicyDescription + + +class ServicePlacementRequireDomainDistributionPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where two replicas from the same partition should never be placed in the + same fault or upgrade domain. + While this is not common it can expose the service to an increased risk of + concurrent failures due to unplanned outages or other cases of + subsequent/concurrent failures. As an example, consider a case where + replicas are deployed across different data center, with one replica per + location. In the event that one of the datacenters goes offline, normally + the replica that was placed in that datacenter will be packed into one of + the remaining datacenters. If this is not desirable then this policy should + be set. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: The name of the domain that should used for placement + as per this policy. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicePlacementRequireDomainDistributionPolicyDescription, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.type = 'RequireDomainDistribution' diff --git a/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description_py3.py new file mode 100644 index 0000000..7b9f301 --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description_py3.py @@ -0,0 +1,49 @@ +# 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 .service_placement_policy_description_py3 import ServicePlacementPolicyDescription + + +class ServicePlacementRequireDomainDistributionPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where two replicas from the same partition should never be placed in the + same fault or upgrade domain. + While this is not common it can expose the service to an increased risk of + concurrent failures due to unplanned outages or other cases of + subsequent/concurrent failures. As an example, consider a case where + replicas are deployed across different data center, with one replica per + location. In the event that one of the datacenters goes offline, normally + the replica that was placed in that datacenter will be packed into one of + the remaining datacenters. If this is not desirable then this policy should + be set. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: The name of the domain that should used for placement + as per this policy. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, *, domain_name: str=None, **kwargs) -> None: + super(ServicePlacementRequireDomainDistributionPolicyDescription, self).__init__(**kwargs) + self.domain_name = domain_name + self.type = 'RequireDomainDistribution' diff --git a/customSDK/servicefabric/models/service_placement_required_domain_policy_description.py b/customSDK/servicefabric/models/service_placement_required_domain_policy_description.py new file mode 100644 index 0000000..0fe9e1a --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_required_domain_policy_description.py @@ -0,0 +1,41 @@ +# 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 .service_placement_policy_description import ServicePlacementPolicyDescription + + +class ServicePlacementRequiredDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where the instances or replicas of that service must be placed in a + particular domain. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: The name of the domain that should used for placement + as per this policy. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicePlacementRequiredDomainPolicyDescription, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.type = 'RequireDomain' diff --git a/customSDK/servicefabric/models/service_placement_required_domain_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_required_domain_policy_description_py3.py new file mode 100644 index 0000000..7ce9a9d --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_required_domain_policy_description_py3.py @@ -0,0 +1,41 @@ +# 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 .service_placement_policy_description_py3 import ServicePlacementPolicyDescription + + +class ServicePlacementRequiredDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where the instances or replicas of that service must be placed in a + particular domain. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: The name of the domain that should used for placement + as per this policy. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, *, domain_name: str=None, **kwargs) -> None: + super(ServicePlacementRequiredDomainPolicyDescription, self).__init__(**kwargs) + self.domain_name = domain_name + self.type = 'RequireDomain' diff --git a/customSDK/servicefabric/models/service_properties.py b/customSDK/servicefabric/models/service_properties.py new file mode 100644 index 0000000..74a8a63 --- /dev/null +++ b/customSDK/servicefabric/models/service_properties.py @@ -0,0 +1,81 @@ +# 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 msrest.serialization import Model + + +class ServiceProperties(Model): + """Describes properties of a service resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param description: User readable description of the service. + :type description: str + :param replica_count: The number of replicas of the service to create. + Defaults to 1 if not specified. + :type replica_count: int + :param execution_policy: The execution policy of the service + :type execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :param auto_scaling_policies: Auto scaling policies + :type auto_scaling_policies: + list[~azure.servicefabric.models.AutoScalingPolicy] + :ivar status: Status of the service. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the service. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the service's health state is not 'Ok', + this additional details from service fabric Health Manager for the user to + know why the service is marked unhealthy. + :vartype unhealthy_evaluation: str + :param identity_refs: The service identity list. + :type identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :param dns_name: Dns name of the service. + :type dns_name: str + """ + + _validation = { + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'replica_count': {'key': 'replicaCount', 'type': 'int'}, + 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, + 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'health_state': {'key': 'healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, + 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.replica_count = kwargs.get('replica_count', None) + self.execution_policy = kwargs.get('execution_policy', None) + self.auto_scaling_policies = kwargs.get('auto_scaling_policies', None) + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity_refs = kwargs.get('identity_refs', None) + self.dns_name = kwargs.get('dns_name', None) diff --git a/customSDK/servicefabric/models/service_properties_py3.py b/customSDK/servicefabric/models/service_properties_py3.py new file mode 100644 index 0000000..12818cd --- /dev/null +++ b/customSDK/servicefabric/models/service_properties_py3.py @@ -0,0 +1,81 @@ +# 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 msrest.serialization import Model + + +class ServiceProperties(Model): + """Describes properties of a service resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param description: User readable description of the service. + :type description: str + :param replica_count: The number of replicas of the service to create. + Defaults to 1 if not specified. + :type replica_count: int + :param execution_policy: The execution policy of the service + :type execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :param auto_scaling_policies: Auto scaling policies + :type auto_scaling_policies: + list[~azure.servicefabric.models.AutoScalingPolicy] + :ivar status: Status of the service. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the service. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the service's health state is not 'Ok', + this additional details from service fabric Health Manager for the user to + know why the service is marked unhealthy. + :vartype unhealthy_evaluation: str + :param identity_refs: The service identity list. + :type identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :param dns_name: Dns name of the service. + :type dns_name: str + """ + + _validation = { + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'replica_count': {'key': 'replicaCount', 'type': 'int'}, + 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, + 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'health_state': {'key': 'healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, + 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, replica_count: int=None, execution_policy=None, auto_scaling_policies=None, identity_refs=None, dns_name: str=None, **kwargs) -> None: + super(ServiceProperties, self).__init__(**kwargs) + self.description = description + self.replica_count = replica_count + self.execution_policy = execution_policy + self.auto_scaling_policies = auto_scaling_policies + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity_refs = identity_refs + self.dns_name = dns_name diff --git a/customSDK/servicefabric/models/service_replica_description.py b/customSDK/servicefabric/models/service_replica_description.py new file mode 100644 index 0000000..5477382 --- /dev/null +++ b/customSDK/servicefabric/models/service_replica_description.py @@ -0,0 +1,54 @@ +# 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 .service_replica_properties import ServiceReplicaProperties + + +class ServiceReplicaDescription(ServiceReplicaProperties): + """Describes a replica of a service resource. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. The operation system required by the code in + service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemType + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.servicefabric.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.servicefabric.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :param replica_name: Required. Name of the replica. + :type replica_name: str + """ + + _validation = { + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + 'replica_name': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + 'replica_name': {'key': 'replicaName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceReplicaDescription, self).__init__(**kwargs) + self.replica_name = kwargs.get('replica_name', None) diff --git a/customSDK/servicefabric/models/service_replica_description_py3.py b/customSDK/servicefabric/models/service_replica_description_py3.py new file mode 100644 index 0000000..5787857 --- /dev/null +++ b/customSDK/servicefabric/models/service_replica_description_py3.py @@ -0,0 +1,54 @@ +# 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 .service_replica_properties_py3 import ServiceReplicaProperties + + +class ServiceReplicaDescription(ServiceReplicaProperties): + """Describes a replica of a service resource. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. The operation system required by the code in + service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemType + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.servicefabric.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.servicefabric.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :param replica_name: Required. Name of the replica. + :type replica_name: str + """ + + _validation = { + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + 'replica_name': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + 'replica_name': {'key': 'replicaName', 'type': 'str'}, + } + + def __init__(self, *, os_type, code_packages, replica_name: str, network_refs=None, diagnostics=None, **kwargs) -> None: + super(ServiceReplicaDescription, self).__init__(os_type=os_type, code_packages=code_packages, network_refs=network_refs, diagnostics=diagnostics, **kwargs) + self.replica_name = replica_name diff --git a/customSDK/servicefabric/models/service_replica_properties.py b/customSDK/servicefabric/models/service_replica_properties.py new file mode 100644 index 0000000..690a235 --- /dev/null +++ b/customSDK/servicefabric/models/service_replica_properties.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class ServiceReplicaProperties(Model): + """Describes the properties of a service replica. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. The operation system required by the code in + service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemType + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.servicefabric.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.servicefabric.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + """ + + _validation = { + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + } + + def __init__(self, **kwargs): + super(ServiceReplicaProperties, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.code_packages = kwargs.get('code_packages', None) + self.network_refs = kwargs.get('network_refs', None) + self.diagnostics = kwargs.get('diagnostics', None) diff --git a/customSDK/servicefabric/models/service_replica_properties_py3.py b/customSDK/servicefabric/models/service_replica_properties_py3.py new file mode 100644 index 0000000..0bbecea --- /dev/null +++ b/customSDK/servicefabric/models/service_replica_properties_py3.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class ServiceReplicaProperties(Model): + """Describes the properties of a service replica. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. The operation system required by the code in + service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemType + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.servicefabric.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.servicefabric.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + """ + + _validation = { + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + } + + def __init__(self, *, os_type, code_packages, network_refs=None, diagnostics=None, **kwargs) -> None: + super(ServiceReplicaProperties, self).__init__(**kwargs) + self.os_type = os_type + self.code_packages = code_packages + self.network_refs = network_refs + self.diagnostics = diagnostics diff --git a/customSDK/servicefabric/models/service_resource_description.py b/customSDK/servicefabric/models/service_resource_description.py new file mode 100644 index 0000000..a70e4db --- /dev/null +++ b/customSDK/servicefabric/models/service_resource_description.py @@ -0,0 +1,112 @@ +# 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 msrest.serialization import Model + + +class ServiceResourceDescription(Model): + """This type describes a service resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Service resource. + :type name: str + :param os_type: Required. The operation system required by the code in + service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemType + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.servicefabric.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.servicefabric.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :param description: User readable description of the service. + :type description: str + :param replica_count: The number of replicas of the service to create. + Defaults to 1 if not specified. + :type replica_count: int + :param execution_policy: The execution policy of the service + :type execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :param auto_scaling_policies: Auto scaling policies + :type auto_scaling_policies: + list[~azure.servicefabric.models.AutoScalingPolicy] + :ivar status: Status of the service. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the service. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the service's health state is not 'Ok', + this additional details from service fabric Health Manager for the user to + know why the service is marked unhealthy. + :vartype unhealthy_evaluation: str + :param identity_refs: The service identity list. + :type identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :param dns_name: Dns name of the service. + :type dns_name: str + """ + + _validation = { + 'name': {'required': True}, + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'code_packages': {'key': 'properties.codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'properties.networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsRef'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'execution_policy': {'key': 'properties.executionPolicy', 'type': 'ExecutionPolicy'}, + 'auto_scaling_policies': {'key': 'properties.autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, + 'identity_refs': {'key': 'properties.identityRefs', 'type': '[ServiceIdentity]'}, + 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceResourceDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.os_type = kwargs.get('os_type', None) + self.code_packages = kwargs.get('code_packages', None) + self.network_refs = kwargs.get('network_refs', None) + self.diagnostics = kwargs.get('diagnostics', None) + self.description = kwargs.get('description', None) + self.replica_count = kwargs.get('replica_count', None) + self.execution_policy = kwargs.get('execution_policy', None) + self.auto_scaling_policies = kwargs.get('auto_scaling_policies', None) + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity_refs = kwargs.get('identity_refs', None) + self.dns_name = kwargs.get('dns_name', None) diff --git a/customSDK/servicefabric/models/service_resource_description_py3.py b/customSDK/servicefabric/models/service_resource_description_py3.py new file mode 100644 index 0000000..ea752b5 --- /dev/null +++ b/customSDK/servicefabric/models/service_resource_description_py3.py @@ -0,0 +1,112 @@ +# 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 msrest.serialization import Model + + +class ServiceResourceDescription(Model): + """This type describes a service resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Service resource. + :type name: str + :param os_type: Required. The operation system required by the code in + service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemType + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.servicefabric.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.servicefabric.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :param description: User readable description of the service. + :type description: str + :param replica_count: The number of replicas of the service to create. + Defaults to 1 if not specified. + :type replica_count: int + :param execution_policy: The execution policy of the service + :type execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :param auto_scaling_policies: Auto scaling policies + :type auto_scaling_policies: + list[~azure.servicefabric.models.AutoScalingPolicy] + :ivar status: Status of the service. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the service. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the service's health state is not 'Ok', + this additional details from service fabric Health Manager for the user to + know why the service is marked unhealthy. + :vartype unhealthy_evaluation: str + :param identity_refs: The service identity list. + :type identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :param dns_name: Dns name of the service. + :type dns_name: str + """ + + _validation = { + 'name': {'required': True}, + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'code_packages': {'key': 'properties.codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'properties.networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsRef'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'execution_policy': {'key': 'properties.executionPolicy', 'type': 'ExecutionPolicy'}, + 'auto_scaling_policies': {'key': 'properties.autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, + 'identity_refs': {'key': 'properties.identityRefs', 'type': '[ServiceIdentity]'}, + 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, + } + + def __init__(self, *, name: str, os_type, code_packages, network_refs=None, diagnostics=None, description: str=None, replica_count: int=None, execution_policy=None, auto_scaling_policies=None, identity_refs=None, dns_name: str=None, **kwargs) -> None: + super(ServiceResourceDescription, self).__init__(**kwargs) + self.name = name + self.os_type = os_type + self.code_packages = code_packages + self.network_refs = network_refs + self.diagnostics = diagnostics + self.description = description + self.replica_count = replica_count + self.execution_policy = execution_policy + self.auto_scaling_policies = auto_scaling_policies + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity_refs = identity_refs + self.dns_name = dns_name diff --git a/customSDK/servicefabric/models/service_type_description.py b/customSDK/servicefabric/models/service_type_description.py new file mode 100644 index 0000000..fee4b9f --- /dev/null +++ b/customSDK/servicefabric/models/service_type_description.py @@ -0,0 +1,76 @@ +# 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 msrest.serialization import Model + + +class ServiceTypeDescription(Model): + """Describes a service type defined in the service manifest of a provisioned + application type. The properties the ones defined in the service manifest. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceTypeDescription, + StatelessServiceTypeDescription + + All required parameters must be populated in order to send to Azure. + + :param is_stateful: Indicates whether the service type is a stateful + service type or a stateless service type. This property is true if the + service type is a stateful service type, false otherwise. + :type is_stateful: bool + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param placement_constraints: The placement constraint to be used when + instantiating this service in a Service Fabric cluster. + :type placement_constraints: str + :param load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: List of service placement policy + descriptions. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param extensions: List of service type extensions. + :type extensions: + list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Stateful': 'StatefulServiceTypeDescription', 'Stateless': 'StatelessServiceTypeDescription'} + } + + def __init__(self, **kwargs): + super(ServiceTypeDescription, self).__init__(**kwargs) + self.is_stateful = kwargs.get('is_stateful', None) + self.service_type_name = kwargs.get('service_type_name', None) + self.placement_constraints = kwargs.get('placement_constraints', None) + self.load_metrics = kwargs.get('load_metrics', None) + self.service_placement_policies = kwargs.get('service_placement_policies', None) + self.extensions = kwargs.get('extensions', None) + self.kind = None diff --git a/customSDK/servicefabric/models/service_type_description_py3.py b/customSDK/servicefabric/models/service_type_description_py3.py new file mode 100644 index 0000000..e33f273 --- /dev/null +++ b/customSDK/servicefabric/models/service_type_description_py3.py @@ -0,0 +1,76 @@ +# 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 msrest.serialization import Model + + +class ServiceTypeDescription(Model): + """Describes a service type defined in the service manifest of a provisioned + application type. The properties the ones defined in the service manifest. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceTypeDescription, + StatelessServiceTypeDescription + + All required parameters must be populated in order to send to Azure. + + :param is_stateful: Indicates whether the service type is a stateful + service type or a stateless service type. This property is true if the + service type is a stateful service type, false otherwise. + :type is_stateful: bool + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param placement_constraints: The placement constraint to be used when + instantiating this service in a Service Fabric cluster. + :type placement_constraints: str + :param load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: List of service placement policy + descriptions. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param extensions: List of service type extensions. + :type extensions: + list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Stateful': 'StatefulServiceTypeDescription', 'Stateless': 'StatelessServiceTypeDescription'} + } + + def __init__(self, *, is_stateful: bool=None, service_type_name: str=None, placement_constraints: str=None, load_metrics=None, service_placement_policies=None, extensions=None, **kwargs) -> None: + super(ServiceTypeDescription, self).__init__(**kwargs) + self.is_stateful = is_stateful + self.service_type_name = service_type_name + self.placement_constraints = placement_constraints + self.load_metrics = load_metrics + self.service_placement_policies = service_placement_policies + self.extensions = extensions + self.kind = None diff --git a/customSDK/servicefabric/models/service_type_extension_description.py b/customSDK/servicefabric/models/service_type_extension_description.py new file mode 100644 index 0000000..5eb6e55 --- /dev/null +++ b/customSDK/servicefabric/models/service_type_extension_description.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class ServiceTypeExtensionDescription(Model): + """Describes extension of a service type defined in the service manifest. + + :param key: The name of the extension. + :type key: str + :param value: The extension value. + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceTypeExtensionDescription, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/service_type_extension_description_py3.py b/customSDK/servicefabric/models/service_type_extension_description_py3.py new file mode 100644 index 0000000..102934c --- /dev/null +++ b/customSDK/servicefabric/models/service_type_extension_description_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class ServiceTypeExtensionDescription(Model): + """Describes extension of a service type defined in the service manifest. + + :param key: The name of the extension. + :type key: str + :param value: The extension value. + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + } + + def __init__(self, *, key: str=None, value: str=None, **kwargs) -> None: + super(ServiceTypeExtensionDescription, self).__init__(**kwargs) + self.key = key + self.value = value diff --git a/customSDK/servicefabric/models/service_type_health_policy.py b/customSDK/servicefabric/models/service_type_health_policy.py new file mode 100644 index 0000000..ba07016 --- /dev/null +++ b/customSDK/servicefabric/models/service_type_health_policy.py @@ -0,0 +1,67 @@ +# 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 msrest.serialization import Model + + +class ServiceTypeHealthPolicy(Model): + """Represents the health policy used to evaluate the health of services + belonging to a service type. + + :param max_percent_unhealthy_partitions_per_service: The maximum allowed + percentage of unhealthy partitions per service. Allowed values are Byte + values from zero to 100 + The percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error. + If the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy + partitions over the total number of partitions in the service. + The computation rounds up to tolerate one failure on small numbers of + partitions. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_partitions_per_service: int + :param max_percent_unhealthy_replicas_per_partition: The maximum allowed + percentage of unhealthy replicas per partition. Allowed values are Byte + values from zero to 100. + The percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in error. + If the percentage is respected but there is at least one unhealthy + replica, the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition. + The computation rounds up to tolerate one failure on small numbers of + replicas. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_replicas_per_partition: int + :param max_percent_unhealthy_services: The maximum allowed percentage of + unhealthy services. Allowed values are Byte values from zero to 100. + The percentage represents the maximum tolerated percentage of services + that can be unhealthy before the application is considered in error. + If the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning. + This is calculated by dividing the number of unhealthy services of the + specific service type over the total number of services of the specific + service type. + The computation rounds up to tolerate one failure on small numbers of + services. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_services: int + """ + + _attribute_map = { + 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, + 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, + 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ServiceTypeHealthPolicy, self).__init__(**kwargs) + self.max_percent_unhealthy_partitions_per_service = kwargs.get('max_percent_unhealthy_partitions_per_service', 0) + self.max_percent_unhealthy_replicas_per_partition = kwargs.get('max_percent_unhealthy_replicas_per_partition', 0) + self.max_percent_unhealthy_services = kwargs.get('max_percent_unhealthy_services', 0) diff --git a/customSDK/servicefabric/models/service_type_health_policy_map_item.py b/customSDK/servicefabric/models/service_type_health_policy_map_item.py new file mode 100644 index 0000000..6f056b9 --- /dev/null +++ b/customSDK/servicefabric/models/service_type_health_policy_map_item.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class ServiceTypeHealthPolicyMapItem(Model): + """Defines an item in ServiceTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the service type health policy map item. + This is the name of the service type. + :type key: str + :param value: Required. The value of the service type health policy map + item. This is the ServiceTypeHealthPolicy for this service type. + :type value: ~azure.servicefabric.models.ServiceTypeHealthPolicy + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ServiceTypeHealthPolicy'}, + } + + def __init__(self, **kwargs): + super(ServiceTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/service_type_health_policy_map_item_py3.py b/customSDK/servicefabric/models/service_type_health_policy_map_item_py3.py new file mode 100644 index 0000000..87e5bae --- /dev/null +++ b/customSDK/servicefabric/models/service_type_health_policy_map_item_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class ServiceTypeHealthPolicyMapItem(Model): + """Defines an item in ServiceTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the service type health policy map item. + This is the name of the service type. + :type key: str + :param value: Required. The value of the service type health policy map + item. This is the ServiceTypeHealthPolicy for this service type. + :type value: ~azure.servicefabric.models.ServiceTypeHealthPolicy + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ServiceTypeHealthPolicy'}, + } + + def __init__(self, *, key: str, value, **kwargs) -> None: + super(ServiceTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = key + self.value = value diff --git a/customSDK/servicefabric/models/service_type_health_policy_py3.py b/customSDK/servicefabric/models/service_type_health_policy_py3.py new file mode 100644 index 0000000..3cd924d --- /dev/null +++ b/customSDK/servicefabric/models/service_type_health_policy_py3.py @@ -0,0 +1,67 @@ +# 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 msrest.serialization import Model + + +class ServiceTypeHealthPolicy(Model): + """Represents the health policy used to evaluate the health of services + belonging to a service type. + + :param max_percent_unhealthy_partitions_per_service: The maximum allowed + percentage of unhealthy partitions per service. Allowed values are Byte + values from zero to 100 + The percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error. + If the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy + partitions over the total number of partitions in the service. + The computation rounds up to tolerate one failure on small numbers of + partitions. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_partitions_per_service: int + :param max_percent_unhealthy_replicas_per_partition: The maximum allowed + percentage of unhealthy replicas per partition. Allowed values are Byte + values from zero to 100. + The percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in error. + If the percentage is respected but there is at least one unhealthy + replica, the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition. + The computation rounds up to tolerate one failure on small numbers of + replicas. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_replicas_per_partition: int + :param max_percent_unhealthy_services: The maximum allowed percentage of + unhealthy services. Allowed values are Byte values from zero to 100. + The percentage represents the maximum tolerated percentage of services + that can be unhealthy before the application is considered in error. + If the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning. + This is calculated by dividing the number of unhealthy services of the + specific service type over the total number of services of the specific + service type. + The computation rounds up to tolerate one failure on small numbers of + services. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_services: int + """ + + _attribute_map = { + 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, + 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, + 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, + } + + def __init__(self, *, max_percent_unhealthy_partitions_per_service: int=0, max_percent_unhealthy_replicas_per_partition: int=0, max_percent_unhealthy_services: int=0, **kwargs) -> None: + super(ServiceTypeHealthPolicy, self).__init__(**kwargs) + self.max_percent_unhealthy_partitions_per_service = max_percent_unhealthy_partitions_per_service + self.max_percent_unhealthy_replicas_per_partition = max_percent_unhealthy_replicas_per_partition + self.max_percent_unhealthy_services = max_percent_unhealthy_services diff --git a/customSDK/servicefabric/models/service_type_info.py b/customSDK/servicefabric/models/service_type_info.py new file mode 100644 index 0000000..64866aa --- /dev/null +++ b/customSDK/servicefabric/models/service_type_info.py @@ -0,0 +1,47 @@ +# 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 msrest.serialization import Model + + +class ServiceTypeInfo(Model): + """Information about a service type that is defined in a service manifest of a + provisioned application type. + + :param service_type_description: Describes a service type defined in the + service manifest of a provisioned application type. The properties the + ones defined in the service manifest. + :type service_type_description: + ~azure.servicefabric.models.ServiceTypeDescription + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param service_manifest_version: The version of the service manifest in + which this service type is defined. + :type service_manifest_version: str + :param is_service_group: Indicates whether the service is a service group. + If it is, the property value is true otherwise false. + :type is_service_group: bool + """ + + _attribute_map = { + 'service_type_description': {'key': 'ServiceTypeDescription', 'type': 'ServiceTypeDescription'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServiceTypeInfo, self).__init__(**kwargs) + self.service_type_description = kwargs.get('service_type_description', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.service_manifest_version = kwargs.get('service_manifest_version', None) + self.is_service_group = kwargs.get('is_service_group', None) diff --git a/customSDK/servicefabric/models/service_type_info_py3.py b/customSDK/servicefabric/models/service_type_info_py3.py new file mode 100644 index 0000000..9c8bd62 --- /dev/null +++ b/customSDK/servicefabric/models/service_type_info_py3.py @@ -0,0 +1,47 @@ +# 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 msrest.serialization import Model + + +class ServiceTypeInfo(Model): + """Information about a service type that is defined in a service manifest of a + provisioned application type. + + :param service_type_description: Describes a service type defined in the + service manifest of a provisioned application type. The properties the + ones defined in the service manifest. + :type service_type_description: + ~azure.servicefabric.models.ServiceTypeDescription + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param service_manifest_version: The version of the service manifest in + which this service type is defined. + :type service_manifest_version: str + :param is_service_group: Indicates whether the service is a service group. + If it is, the property value is true otherwise false. + :type is_service_group: bool + """ + + _attribute_map = { + 'service_type_description': {'key': 'ServiceTypeDescription', 'type': 'ServiceTypeDescription'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + } + + def __init__(self, *, service_type_description=None, service_manifest_name: str=None, service_manifest_version: str=None, is_service_group: bool=None, **kwargs) -> None: + super(ServiceTypeInfo, self).__init__(**kwargs) + self.service_type_description = service_type_description + self.service_manifest_name = service_manifest_name + self.service_manifest_version = service_manifest_version + self.is_service_group = is_service_group diff --git a/customSDK/servicefabric/models/service_type_manifest.py b/customSDK/servicefabric/models/service_type_manifest.py new file mode 100644 index 0000000..295a4b2 --- /dev/null +++ b/customSDK/servicefabric/models/service_type_manifest.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class ServiceTypeManifest(Model): + """Contains the manifest describing a service type registered as part of an + application in a Service Fabric cluster. + + :param manifest: The XML manifest as a string. + :type manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceTypeManifest, self).__init__(**kwargs) + self.manifest = kwargs.get('manifest', None) diff --git a/customSDK/servicefabric/models/service_type_manifest_py3.py b/customSDK/servicefabric/models/service_type_manifest_py3.py new file mode 100644 index 0000000..5ffbd26 --- /dev/null +++ b/customSDK/servicefabric/models/service_type_manifest_py3.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class ServiceTypeManifest(Model): + """Contains the manifest describing a service type registered as part of an + application in a Service Fabric cluster. + + :param manifest: The XML manifest as a string. + :type manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__(self, *, manifest: str=None, **kwargs) -> None: + super(ServiceTypeManifest, self).__init__(**kwargs) + self.manifest = manifest diff --git a/customSDK/servicefabric/models/service_update_description.py b/customSDK/servicefabric/models/service_update_description.py new file mode 100644 index 0000000..bd7a167 --- /dev/null +++ b/customSDK/servicefabric/models/service_update_description.py @@ -0,0 +1,141 @@ +# 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 msrest.serialization import Model + + +class ServiceUpdateDescription(Model): + """A ServiceUpdateDescription contains all of the information necessary to + update a service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceUpdateDescription, + StatelessServiceUpdateDescription + + All required parameters must be populated in order to send to Azure. + + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 6 then the flags for + ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + - None - Does not indicate any other properties are set. The value is + zero. + - TargetReplicaSetSize/InstanceCount - Indicates whether the + TargetReplicaSetSize property (for Stateful services) or the InstanceCount + property (for Stateless services) is set. The value is 1. + - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + property is set. The value is 2. + - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property + is set. The value is 4. + - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + property is set. The value is 8. + - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The + value is 16. + - PlacementConstraints - Indicates the PlacementConstraints property is + set. The value is 32. + - PlacementPolicyList - Indicates the ServicePlacementPolicies property is + set. The value is 64. + - Correlation - Indicates the CorrelationScheme property is set. The value + is 128. + - Metrics - Indicates the ServiceLoadMetrics property is set. The value is + 256. + - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The + value is 512. + - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + is 1024. + - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit + property is set. The value is 2048. + - MinInstanceCount - Indicates the MinInstanceCount property is set. The + value is 4096. + - MinInstancePercentage - Indicates the MinInstancePercentage property is + set. The value is 8192. + - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. + :type flags: str + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param load_metrics: The service load metrics. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceUpdateDescription', 'Stateless': 'StatelessServiceUpdateDescription'} + } + + def __init__(self, **kwargs): + super(ServiceUpdateDescription, self).__init__(**kwargs) + self.flags = kwargs.get('flags', None) + self.placement_constraints = kwargs.get('placement_constraints', None) + self.correlation_scheme = kwargs.get('correlation_scheme', None) + self.load_metrics = kwargs.get('load_metrics', None) + self.service_placement_policies = kwargs.get('service_placement_policies', None) + self.default_move_cost = kwargs.get('default_move_cost', None) + self.scaling_policies = kwargs.get('scaling_policies', None) + self.service_dns_name = kwargs.get('service_dns_name', None) + self.tags_for_placement = kwargs.get('tags_for_placement', None) + self.tags_for_running = kwargs.get('tags_for_running', None) + self.service_kind = None diff --git a/customSDK/servicefabric/models/service_update_description_py3.py b/customSDK/servicefabric/models/service_update_description_py3.py new file mode 100644 index 0000000..957edce --- /dev/null +++ b/customSDK/servicefabric/models/service_update_description_py3.py @@ -0,0 +1,141 @@ +# 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 msrest.serialization import Model + + +class ServiceUpdateDescription(Model): + """A ServiceUpdateDescription contains all of the information necessary to + update a service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceUpdateDescription, + StatelessServiceUpdateDescription + + All required parameters must be populated in order to send to Azure. + + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 6 then the flags for + ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + - None - Does not indicate any other properties are set. The value is + zero. + - TargetReplicaSetSize/InstanceCount - Indicates whether the + TargetReplicaSetSize property (for Stateful services) or the InstanceCount + property (for Stateless services) is set. The value is 1. + - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + property is set. The value is 2. + - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property + is set. The value is 4. + - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + property is set. The value is 8. + - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The + value is 16. + - PlacementConstraints - Indicates the PlacementConstraints property is + set. The value is 32. + - PlacementPolicyList - Indicates the ServicePlacementPolicies property is + set. The value is 64. + - Correlation - Indicates the CorrelationScheme property is set. The value + is 128. + - Metrics - Indicates the ServiceLoadMetrics property is set. The value is + 256. + - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The + value is 512. + - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + is 1024. + - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit + property is set. The value is 2048. + - MinInstanceCount - Indicates the MinInstanceCount property is set. The + value is 4096. + - MinInstancePercentage - Indicates the MinInstancePercentage property is + set. The value is 8192. + - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. + :type flags: str + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param load_metrics: The service load metrics. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceUpdateDescription', 'Stateless': 'StatelessServiceUpdateDescription'} + } + + def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, **kwargs) -> None: + super(ServiceUpdateDescription, self).__init__(**kwargs) + self.flags = flags + self.placement_constraints = placement_constraints + self.correlation_scheme = correlation_scheme + self.load_metrics = load_metrics + self.service_placement_policies = service_placement_policies + self.default_move_cost = default_move_cost + self.scaling_policies = scaling_policies + self.service_dns_name = service_dns_name + self.tags_for_placement = tags_for_placement + self.tags_for_running = tags_for_running + self.service_kind = None diff --git a/customSDK/servicefabric/models/service_upgrade_progress.py b/customSDK/servicefabric/models/service_upgrade_progress.py new file mode 100644 index 0000000..22c0adc --- /dev/null +++ b/customSDK/servicefabric/models/service_upgrade_progress.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class ServiceUpgradeProgress(Model): + """Information about how many replicas are completed or pending for a specific + service during upgrade. + + :param service_name: Name of the Service resource. + :type service_name: str + :param completed_replica_count: The number of replicas that completes the + upgrade in the service. + :type completed_replica_count: str + :param pending_replica_count: The number of replicas that are waiting to + be upgraded in the service. + :type pending_replica_count: str + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'completed_replica_count': {'key': 'CompletedReplicaCount', 'type': 'str'}, + 'pending_replica_count': {'key': 'PendingReplicaCount', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceUpgradeProgress, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.completed_replica_count = kwargs.get('completed_replica_count', None) + self.pending_replica_count = kwargs.get('pending_replica_count', None) diff --git a/customSDK/servicefabric/models/service_upgrade_progress_py3.py b/customSDK/servicefabric/models/service_upgrade_progress_py3.py new file mode 100644 index 0000000..f060cbb --- /dev/null +++ b/customSDK/servicefabric/models/service_upgrade_progress_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class ServiceUpgradeProgress(Model): + """Information about how many replicas are completed or pending for a specific + service during upgrade. + + :param service_name: Name of the Service resource. + :type service_name: str + :param completed_replica_count: The number of replicas that completes the + upgrade in the service. + :type completed_replica_count: str + :param pending_replica_count: The number of replicas that are waiting to + be upgraded in the service. + :type pending_replica_count: str + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'completed_replica_count': {'key': 'CompletedReplicaCount', 'type': 'str'}, + 'pending_replica_count': {'key': 'PendingReplicaCount', 'type': 'str'}, + } + + def __init__(self, *, service_name: str=None, completed_replica_count: str=None, pending_replica_count: str=None, **kwargs) -> None: + super(ServiceUpgradeProgress, self).__init__(**kwargs) + self.service_name = service_name + self.completed_replica_count = completed_replica_count + self.pending_replica_count = pending_replica_count diff --git a/customSDK/servicefabric/models/services_health_evaluation.py b/customSDK/servicefabric/models/services_health_evaluation.py new file mode 100644 index 0000000..55a3437 --- /dev/null +++ b/customSDK/servicefabric/models/services_health_evaluation.py @@ -0,0 +1,70 @@ +# 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 .health_evaluation import HealthEvaluation + + +class ServicesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for services of a certain service type + belonging to an application, containing health evaluations for each + unhealthy service that impacted current aggregated health state. Can be + returned when evaluating application health and the aggregated health state + is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param service_type_name: Name of the service type of the services. + :type service_type_name: str + :param max_percent_unhealthy_services: Maximum allowed percentage of + unhealthy services from the ServiceTypeHealthPolicy. + :type max_percent_unhealthy_services: int + :param total_count: Total number of services of the current service type + in the application from the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + ServiceHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(ServicesHealthEvaluation, self).__init__(**kwargs) + self.service_type_name = kwargs.get('service_type_name', None) + self.max_percent_unhealthy_services = kwargs.get('max_percent_unhealthy_services', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Services' diff --git a/customSDK/servicefabric/models/services_health_evaluation_py3.py b/customSDK/servicefabric/models/services_health_evaluation_py3.py new file mode 100644 index 0000000..46e5139 --- /dev/null +++ b/customSDK/servicefabric/models/services_health_evaluation_py3.py @@ -0,0 +1,70 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class ServicesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for services of a certain service type + belonging to an application, containing health evaluations for each + unhealthy service that impacted current aggregated health state. Can be + returned when evaluating application health and the aggregated health state + is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param service_type_name: Name of the service type of the services. + :type service_type_name: str + :param max_percent_unhealthy_services: Maximum allowed percentage of + unhealthy services from the ServiceTypeHealthPolicy. + :type max_percent_unhealthy_services: int + :param total_count: Total number of services of the current service type + in the application from the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + ServiceHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, service_type_name: str=None, max_percent_unhealthy_services: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(ServicesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.service_type_name = service_type_name + self.max_percent_unhealthy_services = max_percent_unhealthy_services + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Services' diff --git a/customSDK/servicefabric/models/setting.py b/customSDK/servicefabric/models/setting.py new file mode 100644 index 0000000..850ffb0 --- /dev/null +++ b/customSDK/servicefabric/models/setting.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class Setting(Model): + """Describes a setting for the container. The setting file path can be fetched + from environment variable "Fabric_SettingPath". The path for Windows + container is "C:\\secrets". The path for Linux container is "/var/secrets". + + :param type: The type of the setting being given in value. Possible values + include: 'ClearText', 'KeyVaultReference', 'SecretValueReference'. Default + value: "ClearText" . + :type type: str or ~azure.servicefabric.models.SettingType + :param name: The name of the setting. + :type name: str + :param value: The value of the setting, will be processed based on the + type provided. + :type value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Setting, self).__init__(**kwargs) + self.type = kwargs.get('type', "ClearText") + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/setting_py3.py b/customSDK/servicefabric/models/setting_py3.py new file mode 100644 index 0000000..8e51284 --- /dev/null +++ b/customSDK/servicefabric/models/setting_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class Setting(Model): + """Describes a setting for the container. The setting file path can be fetched + from environment variable "Fabric_SettingPath". The path for Windows + container is "C:\\secrets". The path for Linux container is "/var/secrets". + + :param type: The type of the setting being given in value. Possible values + include: 'ClearText', 'KeyVaultReference', 'SecretValueReference'. Default + value: "ClearText" . + :type type: str or ~azure.servicefabric.models.SettingType + :param name: The name of the setting. + :type name: str + :param value: The value of the setting, will be processed based on the + type provided. + :type value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, type="ClearText", name: str=None, value: str=None, **kwargs) -> None: + super(Setting, self).__init__(**kwargs) + self.type = type + self.name = name + self.value = value diff --git a/customSDK/servicefabric/models/singleton_partition_information.py b/customSDK/servicefabric/models/singleton_partition_information.py new file mode 100644 index 0000000..cb7eceb --- /dev/null +++ b/customSDK/servicefabric/models/singleton_partition_information.py @@ -0,0 +1,43 @@ +# 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 .partition_information import PartitionInformation + + +class SingletonPartitionInformation(PartitionInformation): + """Information about a partition that is singleton. The services with + singleton partitioning scheme are effectively non-partitioned. They only + have one partition. + + All required parameters must be populated in order to send to Azure. + + :param id: An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. + The partition ID is unique and does not change for the lifetime of the + service. If the same service was deleted and recreated the IDs of its + partitions would be different. + :type id: str + :param service_partition_kind: Required. Constant filled by server. + :type service_partition_kind: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SingletonPartitionInformation, self).__init__(**kwargs) + self.service_partition_kind = 'Singleton' diff --git a/customSDK/servicefabric/models/singleton_partition_information_py3.py b/customSDK/servicefabric/models/singleton_partition_information_py3.py new file mode 100644 index 0000000..d1cc3f7 --- /dev/null +++ b/customSDK/servicefabric/models/singleton_partition_information_py3.py @@ -0,0 +1,43 @@ +# 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 .partition_information_py3 import PartitionInformation + + +class SingletonPartitionInformation(PartitionInformation): + """Information about a partition that is singleton. The services with + singleton partitioning scheme are effectively non-partitioned. They only + have one partition. + + All required parameters must be populated in order to send to Azure. + + :param id: An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. + The partition ID is unique and does not change for the lifetime of the + service. If the same service was deleted and recreated the IDs of its + partitions would be different. + :type id: str + :param service_partition_kind: Required. Constant filled by server. + :type service_partition_kind: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SingletonPartitionInformation, self).__init__(id=id, **kwargs) + self.service_partition_kind = 'Singleton' diff --git a/customSDK/servicefabric/models/singleton_partition_scheme_description.py b/customSDK/servicefabric/models/singleton_partition_scheme_description.py new file mode 100644 index 0000000..992031d --- /dev/null +++ b/customSDK/servicefabric/models/singleton_partition_scheme_description.py @@ -0,0 +1,35 @@ +# 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 .partition_scheme_description import PartitionSchemeDescription + + +class SingletonPartitionSchemeDescription(PartitionSchemeDescription): + """Describes the partition scheme of a singleton-partitioned, or + non-partitioned service. + + All required parameters must be populated in order to send to Azure. + + :param partition_scheme: Required. Constant filled by server. + :type partition_scheme: str + """ + + _validation = { + 'partition_scheme': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SingletonPartitionSchemeDescription, self).__init__(**kwargs) + self.partition_scheme = 'Singleton' diff --git a/customSDK/servicefabric/models/singleton_partition_scheme_description_py3.py b/customSDK/servicefabric/models/singleton_partition_scheme_description_py3.py new file mode 100644 index 0000000..df9cdb2 --- /dev/null +++ b/customSDK/servicefabric/models/singleton_partition_scheme_description_py3.py @@ -0,0 +1,35 @@ +# 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 .partition_scheme_description_py3 import PartitionSchemeDescription + + +class SingletonPartitionSchemeDescription(PartitionSchemeDescription): + """Describes the partition scheme of a singleton-partitioned, or + non-partitioned service. + + All required parameters must be populated in order to send to Azure. + + :param partition_scheme: Required. Constant filled by server. + :type partition_scheme: str + """ + + _validation = { + 'partition_scheme': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SingletonPartitionSchemeDescription, self).__init__(**kwargs) + self.partition_scheme = 'Singleton' diff --git a/customSDK/servicefabric/models/start_cluster_upgrade_description.py b/customSDK/servicefabric/models/start_cluster_upgrade_description.py new file mode 100644 index 0000000..b18bada --- /dev/null +++ b/customSDK/servicefabric/models/start_cluster_upgrade_description.py @@ -0,0 +1,113 @@ +# 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 msrest.serialization import Model + + +class StartClusterUpgradeDescription(Model): + """Describes the parameters for starting a cluster upgrade. + + :param code_version: The cluster code version. + :type code_version: str + :param config_version: The cluster configuration version. + :type config_version: str + :param upgrade_kind: The kind of upgrade out of the following possible + values. Possible values include: 'Invalid', 'Rolling'. Default value: + "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param sort_order: Defines the order in which an upgrade proceeds through + the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', + 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default + value: "Default" . + :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param enable_delta_health_evaluation: When true, enables delta health + evaluation rather than absolute health evaluation after completion of each + upgrade domain. + :type enable_delta_health_evaluation: bool + :param cluster_upgrade_health_policy: Defines a health policy used to + evaluate the health of the cluster during a cluster upgrade. + :type cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :param application_health_policy_map: Defines the application health + policy map used to evaluate the health of an application or one of its + children entities. + :type application_health_policy_map: + ~azure.servicefabric.models.ApplicationHealthPolicies + :param instance_close_delay_duration_in_seconds: Duration in seconds, to + wait before a stateless instance is closed, to allow the active requests + to drain gracefully. This would be effective when the instance is closing + during the application/cluster + upgrade, only for those instances which have a non-zero delay duration + configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is + 4294967295, which indicates that the behavior will entirely depend on the + delay configured in the stateless service description. + :type instance_close_delay_duration_in_seconds: long + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(StartClusterUpgradeDescription, self).__init__(**kwargs) + self.code_version = kwargs.get('code_version', None) + self.config_version = kwargs.get('config_version', None) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) + self.force_restart = kwargs.get('force_restart', None) + self.sort_order = kwargs.get('sort_order', "Default") + self.monitoring_policy = kwargs.get('monitoring_policy', None) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) + self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) + self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', None) diff --git a/customSDK/servicefabric/models/start_cluster_upgrade_description_py3.py b/customSDK/servicefabric/models/start_cluster_upgrade_description_py3.py new file mode 100644 index 0000000..740cf69 --- /dev/null +++ b/customSDK/servicefabric/models/start_cluster_upgrade_description_py3.py @@ -0,0 +1,113 @@ +# 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 msrest.serialization import Model + + +class StartClusterUpgradeDescription(Model): + """Describes the parameters for starting a cluster upgrade. + + :param code_version: The cluster code version. + :type code_version: str + :param config_version: The cluster configuration version. + :type config_version: str + :param upgrade_kind: The kind of upgrade out of the following possible + values. Possible values include: 'Invalid', 'Rolling'. Default value: + "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param sort_order: Defines the order in which an upgrade proceeds through + the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', + 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default + value: "Default" . + :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param enable_delta_health_evaluation: When true, enables delta health + evaluation rather than absolute health evaluation after completion of each + upgrade domain. + :type enable_delta_health_evaluation: bool + :param cluster_upgrade_health_policy: Defines a health policy used to + evaluate the health of the cluster during a cluster upgrade. + :type cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :param application_health_policy_map: Defines the application health + policy map used to evaluate the health of an application or one of its + children entities. + :type application_health_policy_map: + ~azure.servicefabric.models.ApplicationHealthPolicies + :param instance_close_delay_duration_in_seconds: Duration in seconds, to + wait before a stateless instance is closed, to allow the active requests + to drain gracefully. This would be effective when the instance is closing + during the application/cluster + upgrade, only for those instances which have a non-zero delay duration + configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is + 4294967295, which indicates that the behavior will entirely depend on the + delay configured in the stateless service description. + :type instance_close_delay_duration_in_seconds: long + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + } + + def __init__(self, *, code_version: str=None, config_version: str=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", monitoring_policy=None, cluster_health_policy=None, enable_delta_health_evaluation: bool=None, cluster_upgrade_health_policy=None, application_health_policy_map=None, instance_close_delay_duration_in_seconds: int=None, **kwargs) -> None: + super(StartClusterUpgradeDescription, self).__init__(**kwargs) + self.code_version = code_version + self.config_version = config_version + self.upgrade_kind = upgrade_kind + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.force_restart = force_restart + self.sort_order = sort_order + self.monitoring_policy = monitoring_policy + self.cluster_health_policy = cluster_health_policy + self.enable_delta_health_evaluation = enable_delta_health_evaluation + self.cluster_upgrade_health_policy = cluster_upgrade_health_policy + self.application_health_policy_map = application_health_policy_map + self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds diff --git a/customSDK/servicefabric/models/started_chaos_event.py b/customSDK/servicefabric/models/started_chaos_event.py new file mode 100644 index 0000000..49dfaba --- /dev/null +++ b/customSDK/servicefabric/models/started_chaos_event.py @@ -0,0 +1,44 @@ +# 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 .chaos_event import ChaosEvent + + +class StartedChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos is started. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param chaos_parameters: Defines all the parameters to configure a Chaos + run. + :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, + } + + def __init__(self, **kwargs): + super(StartedChaosEvent, self).__init__(**kwargs) + self.chaos_parameters = kwargs.get('chaos_parameters', None) + self.kind = 'Started' diff --git a/customSDK/servicefabric/models/started_chaos_event_py3.py b/customSDK/servicefabric/models/started_chaos_event_py3.py new file mode 100644 index 0000000..0aaf9f0 --- /dev/null +++ b/customSDK/servicefabric/models/started_chaos_event_py3.py @@ -0,0 +1,44 @@ +# 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 .chaos_event_py3 import ChaosEvent + + +class StartedChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos is started. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param chaos_parameters: Defines all the parameters to configure a Chaos + run. + :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, + } + + def __init__(self, *, time_stamp_utc, chaos_parameters=None, **kwargs) -> None: + super(StartedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.chaos_parameters = chaos_parameters + self.kind = 'Started' diff --git a/customSDK/servicefabric/models/stateful_replica_health_report_expired_event.py b/customSDK/servicefabric/models/stateful_replica_health_report_expired_event.py new file mode 100644 index 0000000..0417172 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_replica_health_report_expired_event.py @@ -0,0 +1,114 @@ +# 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 .replica_event import ReplicaEvent + + +class StatefulReplicaHealthReportExpiredEvent(ReplicaEvent): + """Stateful Replica Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param replica_instance_id: Required. Id of Replica instance. + :type replica_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'replica_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(StatefulReplicaHealthReportExpiredEvent, self).__init__(**kwargs) + self.replica_instance_id = kwargs.get('replica_instance_id', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'StatefulReplicaHealthReportExpired' diff --git a/customSDK/servicefabric/models/stateful_replica_health_report_expired_event_py3.py b/customSDK/servicefabric/models/stateful_replica_health_report_expired_event_py3.py new file mode 100644 index 0000000..e588068 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_replica_health_report_expired_event_py3.py @@ -0,0 +1,114 @@ +# 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 .replica_event_py3 import ReplicaEvent + + +class StatefulReplicaHealthReportExpiredEvent(ReplicaEvent): + """Stateful Replica Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param replica_instance_id: Required. Id of Replica instance. + :type replica_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'replica_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, replica_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(StatefulReplicaHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.replica_instance_id = replica_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'StatefulReplicaHealthReportExpired' diff --git a/customSDK/servicefabric/models/stateful_replica_new_health_report_event.py b/customSDK/servicefabric/models/stateful_replica_new_health_report_event.py new file mode 100644 index 0000000..ac36335 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_replica_new_health_report_event.py @@ -0,0 +1,114 @@ +# 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 .replica_event import ReplicaEvent + + +class StatefulReplicaNewHealthReportEvent(ReplicaEvent): + """Stateful Replica Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param replica_instance_id: Required. Id of Replica instance. + :type replica_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'replica_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(StatefulReplicaNewHealthReportEvent, self).__init__(**kwargs) + self.replica_instance_id = kwargs.get('replica_instance_id', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'StatefulReplicaNewHealthReport' diff --git a/customSDK/servicefabric/models/stateful_replica_new_health_report_event_py3.py b/customSDK/servicefabric/models/stateful_replica_new_health_report_event_py3.py new file mode 100644 index 0000000..0ce0b6d --- /dev/null +++ b/customSDK/servicefabric/models/stateful_replica_new_health_report_event_py3.py @@ -0,0 +1,114 @@ +# 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 .replica_event_py3 import ReplicaEvent + + +class StatefulReplicaNewHealthReportEvent(ReplicaEvent): + """Stateful Replica Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param replica_instance_id: Required. Id of Replica instance. + :type replica_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'replica_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, replica_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(StatefulReplicaNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.replica_instance_id = replica_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'StatefulReplicaNewHealthReport' diff --git a/customSDK/servicefabric/models/stateful_service_description.py b/customSDK/servicefabric/models/stateful_service_description.py new file mode 100644 index 0000000..0c7bb21 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_description.py @@ -0,0 +1,186 @@ +# 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 .service_description import ServiceDescription + + +class StatefulServiceDescription(ServiceDescription): + """Describes a stateful service. + + All required parameters must be populated in order to send to Azure. + + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_name: Required. The full name of the service with 'fabric:' + URI scheme. + :type service_name: str + :param service_type_name: Required. Name of the service type as specified + in the service manifest. + :type service_type_name: str + :param initialization_data: The initialization data as an array of bytes. + Initialization data is passed to service instances or replicas when they + are created. + :type initialization_data: list[int] + :param partition_description: Required. The partition description as an + object. + :type partition_description: + ~azure.servicefabric.models.PartitionSchemeDescription + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param service_load_metrics: The service load metrics. + :type service_load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param is_default_move_cost_specified: Indicates if the DefaultMoveCost + property is specified. + :type is_default_move_cost_specified: bool + :param service_package_activation_mode: The activation mode of service + package to be used for a service. Possible values include: + 'SharedProcess', 'ExclusiveProcess' + :type service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :param service_dns_name: The DNS name of the service. It requires the DNS + system service to be enabled in Service Fabric cluster. + :type service_dns_name: str + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param target_replica_set_size: Required. The target replica set size as a + number. + :type target_replica_set_size: int + :param min_replica_set_size: Required. The minimum replica set size as a + number. + :type min_replica_set_size: int + :param has_persisted_state: Required. A flag indicating whether this is a + persistent service which stores states on the local disk. If it is then + the value of this property is true, if not it is false. + :type has_persisted_state: bool + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 6 then the flags for + QuorumLossWaitDuration (2) and StandByReplicaKeepDuration(4) are set. + - None - Does not indicate any other properties are set. The value is + zero. + - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + property is set. The value is 1. + - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property + is set. The value is 2. + - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + property is set. The value is 4. + - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit + property is set. The value is 8. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 16. + :type flags: int + :param replica_restart_wait_duration_seconds: The duration, in seconds, + between when a replica goes down and when a new replica is created. + :type replica_restart_wait_duration_seconds: long + :param quorum_loss_wait_duration_seconds: The maximum duration, in + seconds, for which a partition is allowed to be in a state of quorum loss. + :type quorum_loss_wait_duration_seconds: long + :param stand_by_replica_keep_duration_seconds: The definition on how long + StandBy replicas should be maintained before being removed. + :type stand_by_replica_keep_duration_seconds: long + :param service_placement_time_limit_seconds: The duration for which + replicas can stay InBuild before reporting that build is stuck. + :type service_placement_time_limit_seconds: long + :param drop_source_replica_on_move: Indicates whether to drop source + Secondary replica even if the target replica has not finished build. If + desired behavior is to drop it as soon as possible the value of this + property is true, if not it is false. + :type drop_source_replica_on_move: bool + :param replica_lifecycle_description: Defines how replicas of this service + will behave during their lifecycle. + :type replica_lifecycle_description: + ~azure.servicefabric.models.ReplicaLifecycleDescription + """ + + _validation = { + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + 'service_kind': {'required': True}, + 'target_replica_set_size': {'required': True, 'minimum': 1}, + 'min_replica_set_size': {'required': True, 'minimum': 1}, + 'has_persisted_state': {'required': True}, + 'replica_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'quorum_loss_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'stand_by_replica_keep_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'service_placement_time_limit_seconds': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'long'}, + 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'long'}, + 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'long'}, + 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'long'}, + 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, + 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, + } + + def __init__(self, **kwargs): + super(StatefulServiceDescription, self).__init__(**kwargs) + self.target_replica_set_size = kwargs.get('target_replica_set_size', None) + self.min_replica_set_size = kwargs.get('min_replica_set_size', None) + self.has_persisted_state = kwargs.get('has_persisted_state', None) + self.flags = kwargs.get('flags', None) + self.replica_restart_wait_duration_seconds = kwargs.get('replica_restart_wait_duration_seconds', None) + self.quorum_loss_wait_duration_seconds = kwargs.get('quorum_loss_wait_duration_seconds', None) + self.stand_by_replica_keep_duration_seconds = kwargs.get('stand_by_replica_keep_duration_seconds', None) + self.service_placement_time_limit_seconds = kwargs.get('service_placement_time_limit_seconds', None) + self.drop_source_replica_on_move = kwargs.get('drop_source_replica_on_move', None) + self.replica_lifecycle_description = kwargs.get('replica_lifecycle_description', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_description_py3.py b/customSDK/servicefabric/models/stateful_service_description_py3.py new file mode 100644 index 0000000..2175534 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_description_py3.py @@ -0,0 +1,186 @@ +# 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 .service_description_py3 import ServiceDescription + + +class StatefulServiceDescription(ServiceDescription): + """Describes a stateful service. + + All required parameters must be populated in order to send to Azure. + + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_name: Required. The full name of the service with 'fabric:' + URI scheme. + :type service_name: str + :param service_type_name: Required. Name of the service type as specified + in the service manifest. + :type service_type_name: str + :param initialization_data: The initialization data as an array of bytes. + Initialization data is passed to service instances or replicas when they + are created. + :type initialization_data: list[int] + :param partition_description: Required. The partition description as an + object. + :type partition_description: + ~azure.servicefabric.models.PartitionSchemeDescription + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param service_load_metrics: The service load metrics. + :type service_load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param is_default_move_cost_specified: Indicates if the DefaultMoveCost + property is specified. + :type is_default_move_cost_specified: bool + :param service_package_activation_mode: The activation mode of service + package to be used for a service. Possible values include: + 'SharedProcess', 'ExclusiveProcess' + :type service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :param service_dns_name: The DNS name of the service. It requires the DNS + system service to be enabled in Service Fabric cluster. + :type service_dns_name: str + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param target_replica_set_size: Required. The target replica set size as a + number. + :type target_replica_set_size: int + :param min_replica_set_size: Required. The minimum replica set size as a + number. + :type min_replica_set_size: int + :param has_persisted_state: Required. A flag indicating whether this is a + persistent service which stores states on the local disk. If it is then + the value of this property is true, if not it is false. + :type has_persisted_state: bool + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 6 then the flags for + QuorumLossWaitDuration (2) and StandByReplicaKeepDuration(4) are set. + - None - Does not indicate any other properties are set. The value is + zero. + - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + property is set. The value is 1. + - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property + is set. The value is 2. + - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + property is set. The value is 4. + - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit + property is set. The value is 8. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 16. + :type flags: int + :param replica_restart_wait_duration_seconds: The duration, in seconds, + between when a replica goes down and when a new replica is created. + :type replica_restart_wait_duration_seconds: long + :param quorum_loss_wait_duration_seconds: The maximum duration, in + seconds, for which a partition is allowed to be in a state of quorum loss. + :type quorum_loss_wait_duration_seconds: long + :param stand_by_replica_keep_duration_seconds: The definition on how long + StandBy replicas should be maintained before being removed. + :type stand_by_replica_keep_duration_seconds: long + :param service_placement_time_limit_seconds: The duration for which + replicas can stay InBuild before reporting that build is stuck. + :type service_placement_time_limit_seconds: long + :param drop_source_replica_on_move: Indicates whether to drop source + Secondary replica even if the target replica has not finished build. If + desired behavior is to drop it as soon as possible the value of this + property is true, if not it is false. + :type drop_source_replica_on_move: bool + :param replica_lifecycle_description: Defines how replicas of this service + will behave during their lifecycle. + :type replica_lifecycle_description: + ~azure.servicefabric.models.ReplicaLifecycleDescription + """ + + _validation = { + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + 'service_kind': {'required': True}, + 'target_replica_set_size': {'required': True, 'minimum': 1}, + 'min_replica_set_size': {'required': True, 'minimum': 1}, + 'has_persisted_state': {'required': True}, + 'replica_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'quorum_loss_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'stand_by_replica_keep_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'service_placement_time_limit_seconds': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'long'}, + 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'long'}, + 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'long'}, + 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'long'}, + 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, + 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, + } + + def __init__(self, *, service_name: str, service_type_name: str, partition_description, target_replica_set_size: int, min_replica_set_size: int, has_persisted_state: bool, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, flags: int=None, replica_restart_wait_duration_seconds: int=None, quorum_loss_wait_duration_seconds: int=None, stand_by_replica_keep_duration_seconds: int=None, service_placement_time_limit_seconds: int=None, drop_source_replica_on_move: bool=None, replica_lifecycle_description=None, **kwargs) -> None: + super(StatefulServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, tags_required_to_place=tags_required_to_place, tags_required_to_run=tags_required_to_run, **kwargs) + self.target_replica_set_size = target_replica_set_size + self.min_replica_set_size = min_replica_set_size + self.has_persisted_state = has_persisted_state + self.flags = flags + self.replica_restart_wait_duration_seconds = replica_restart_wait_duration_seconds + self.quorum_loss_wait_duration_seconds = quorum_loss_wait_duration_seconds + self.stand_by_replica_keep_duration_seconds = stand_by_replica_keep_duration_seconds + self.service_placement_time_limit_seconds = service_placement_time_limit_seconds + self.drop_source_replica_on_move = drop_source_replica_on_move + self.replica_lifecycle_description = replica_lifecycle_description + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_info.py b/customSDK/servicefabric/models/stateful_service_info.py new file mode 100644 index 0000000..38bf04d --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_info.py @@ -0,0 +1,70 @@ +# 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 .service_info import ServiceInfo + + +class StatefulServiceInfo(ServiceInfo): + """Information about a stateful Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :param id: The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to + identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type id: str + :param name: The full name of the service with 'fabric:' URI scheme. + :type name: str + :param type_name: Name of the service type as specified in the service + manifest. + :type type_name: str + :param manifest_version: The version of the service manifest. + :type manifest_version: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_status: The status of the application. Possible values + include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + 'Failed' + :type service_status: str or ~azure.servicefabric.models.ServiceStatus + :param is_service_group: Whether the service is in a service group. + :type is_service_group: bool + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param has_persisted_state: Whether the service has persisted state. + :type has_persisted_state: bool + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(StatefulServiceInfo, self).__init__(**kwargs) + self.has_persisted_state = kwargs.get('has_persisted_state', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_info_py3.py b/customSDK/servicefabric/models/stateful_service_info_py3.py new file mode 100644 index 0000000..4a0f30f --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_info_py3.py @@ -0,0 +1,70 @@ +# 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 .service_info_py3 import ServiceInfo + + +class StatefulServiceInfo(ServiceInfo): + """Information about a stateful Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :param id: The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to + identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type id: str + :param name: The full name of the service with 'fabric:' URI scheme. + :type name: str + :param type_name: Name of the service type as specified in the service + manifest. + :type type_name: str + :param manifest_version: The version of the service manifest. + :type manifest_version: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_status: The status of the application. Possible values + include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + 'Failed' + :type service_status: str or ~azure.servicefabric.models.ServiceStatus + :param is_service_group: Whether the service is in a service group. + :type is_service_group: bool + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param has_persisted_state: Whether the service has persisted state. + :type has_persisted_state: bool + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, name: str=None, type_name: str=None, manifest_version: str=None, health_state=None, service_status=None, is_service_group: bool=None, has_persisted_state: bool=None, **kwargs) -> None: + super(StatefulServiceInfo, self).__init__(id=id, name=name, type_name=type_name, manifest_version=manifest_version, health_state=health_state, service_status=service_status, is_service_group=is_service_group, **kwargs) + self.has_persisted_state = has_persisted_state + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_partition_info.py b/customSDK/servicefabric/models/stateful_service_partition_info.py new file mode 100644 index 0000000..8ee366d --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_partition_info.py @@ -0,0 +1,73 @@ +# 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 .service_partition_info import ServicePartitionInfo + + +class StatefulServicePartitionInfo(ServicePartitionInfo): + """Information about a partition of a stateful Service Fabric service.. + + All required parameters must be populated in order to send to Azure. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param partition_status: The status of the service fabric service + partition. Possible values include: 'Invalid', 'Ready', 'NotReady', + 'InQuorumLoss', 'Reconfiguring', 'Deleting' + :type partition_status: str or + ~azure.servicefabric.models.ServicePartitionStatus + :param partition_information: Information about the partition identity, + partitioning scheme and keys supported by it. + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param target_replica_set_size: The target replica set size as a number. + :type target_replica_set_size: long + :param min_replica_set_size: The minimum replica set size as a number. + :type min_replica_set_size: long + :param last_quorum_loss_duration: The duration for which this partition + was in quorum loss. If the partition is currently in quorum loss, it + returns the duration since it has been in that state. This field is using + ISO8601 format for specifying the duration. + :type last_quorum_loss_duration: timedelta + :param primary_epoch: An Epoch is a configuration number for the partition + as a whole. When the configuration of the replica set changes, for example + when the Primary replica changes, the operations that are replicated from + the new Primary replica are said to be a new Epoch from the ones which + were sent by the old Primary replica. + :type primary_epoch: ~azure.servicefabric.models.Epoch + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'long'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'long'}, + 'last_quorum_loss_duration': {'key': 'LastQuorumLossDuration', 'type': 'duration'}, + 'primary_epoch': {'key': 'PrimaryEpoch', 'type': 'Epoch'}, + } + + def __init__(self, **kwargs): + super(StatefulServicePartitionInfo, self).__init__(**kwargs) + self.target_replica_set_size = kwargs.get('target_replica_set_size', None) + self.min_replica_set_size = kwargs.get('min_replica_set_size', None) + self.last_quorum_loss_duration = kwargs.get('last_quorum_loss_duration', None) + self.primary_epoch = kwargs.get('primary_epoch', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_partition_info_py3.py b/customSDK/servicefabric/models/stateful_service_partition_info_py3.py new file mode 100644 index 0000000..326d0db --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_partition_info_py3.py @@ -0,0 +1,73 @@ +# 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 .service_partition_info_py3 import ServicePartitionInfo + + +class StatefulServicePartitionInfo(ServicePartitionInfo): + """Information about a partition of a stateful Service Fabric service.. + + All required parameters must be populated in order to send to Azure. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param partition_status: The status of the service fabric service + partition. Possible values include: 'Invalid', 'Ready', 'NotReady', + 'InQuorumLoss', 'Reconfiguring', 'Deleting' + :type partition_status: str or + ~azure.servicefabric.models.ServicePartitionStatus + :param partition_information: Information about the partition identity, + partitioning scheme and keys supported by it. + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param target_replica_set_size: The target replica set size as a number. + :type target_replica_set_size: long + :param min_replica_set_size: The minimum replica set size as a number. + :type min_replica_set_size: long + :param last_quorum_loss_duration: The duration for which this partition + was in quorum loss. If the partition is currently in quorum loss, it + returns the duration since it has been in that state. This field is using + ISO8601 format for specifying the duration. + :type last_quorum_loss_duration: timedelta + :param primary_epoch: An Epoch is a configuration number for the partition + as a whole. When the configuration of the replica set changes, for example + when the Primary replica changes, the operations that are replicated from + the new Primary replica are said to be a new Epoch from the ones which + were sent by the old Primary replica. + :type primary_epoch: ~azure.servicefabric.models.Epoch + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'long'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'long'}, + 'last_quorum_loss_duration': {'key': 'LastQuorumLossDuration', 'type': 'duration'}, + 'primary_epoch': {'key': 'PrimaryEpoch', 'type': 'Epoch'}, + } + + def __init__(self, *, health_state=None, partition_status=None, partition_information=None, target_replica_set_size: int=None, min_replica_set_size: int=None, last_quorum_loss_duration=None, primary_epoch=None, **kwargs) -> None: + super(StatefulServicePartitionInfo, self).__init__(health_state=health_state, partition_status=partition_status, partition_information=partition_information, **kwargs) + self.target_replica_set_size = target_replica_set_size + self.min_replica_set_size = min_replica_set_size + self.last_quorum_loss_duration = last_quorum_loss_duration + self.primary_epoch = primary_epoch + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_health.py b/customSDK/servicefabric/models/stateful_service_replica_health.py new file mode 100644 index 0000000..45dc4c3 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_replica_health.py @@ -0,0 +1,70 @@ +# 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 .replica_health import ReplicaHealth + + +class StatefulServiceReplicaHealth(ReplicaHealth): + """Represents the health of the stateful service replica. + Contains the replica aggregated health state, the health events and the + unhealthy evaluations. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param partition_id: Id of the partition to which this replica belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StatefulServiceReplicaHealth, self).__init__(**kwargs) + self.replica_id = kwargs.get('replica_id', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_health_py3.py b/customSDK/servicefabric/models/stateful_service_replica_health_py3.py new file mode 100644 index 0000000..bc07ec8 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_replica_health_py3.py @@ -0,0 +1,70 @@ +# 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 .replica_health_py3 import ReplicaHealth + + +class StatefulServiceReplicaHealth(ReplicaHealth): + """Represents the health of the stateful service replica. + Contains the replica aggregated health state, the health events and the + unhealthy evaluations. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param partition_id: Id of the partition to which this replica belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, replica_id: str=None, **kwargs) -> None: + super(StatefulServiceReplicaHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, partition_id=partition_id, **kwargs) + self.replica_id = replica_id + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_health_state.py b/customSDK/servicefabric/models/stateful_service_replica_health_state.py new file mode 100644 index 0000000..67dfe6d --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_replica_health_state.py @@ -0,0 +1,56 @@ +# 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 .replica_health_state import ReplicaHealthState + + +class StatefulServiceReplicaHealthState(ReplicaHealthState): + """Represents the health state of the stateful service replica, which contains + the replica ID and the aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param partition_id: The ID of the partition to which this replica + belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StatefulServiceReplicaHealthState, self).__init__(**kwargs) + self.replica_id = kwargs.get('replica_id', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_health_state_py3.py b/customSDK/servicefabric/models/stateful_service_replica_health_state_py3.py new file mode 100644 index 0000000..62ada1f --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_replica_health_state_py3.py @@ -0,0 +1,56 @@ +# 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 .replica_health_state_py3 import ReplicaHealthState + + +class StatefulServiceReplicaHealthState(ReplicaHealthState): + """Represents the health state of the stateful service replica, which contains + the replica ID and the aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param partition_id: The ID of the partition to which this replica + belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, partition_id: str=None, replica_id: str=None, **kwargs) -> None: + super(StatefulServiceReplicaHealthState, self).__init__(aggregated_health_state=aggregated_health_state, partition_id=partition_id, **kwargs) + self.replica_id = replica_id + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_info.py b/customSDK/servicefabric/models/stateful_service_replica_info.py new file mode 100644 index 0000000..3e3d908 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_replica_info.py @@ -0,0 +1,72 @@ +# 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 .replica_info import ReplicaInfo + + +class StatefulServiceReplicaInfo(ReplicaInfo): + """Represents a stateful service replica. This includes information about the + identity, role, status, health, node name, uptime, and other details about + the replica. + + All required parameters must be populated in order to send to Azure. + + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param address: The address the replica is listening on. + :type address: str + :param last_in_build_duration_in_seconds: The last in build duration of + the replica in seconds. + :type last_in_build_duration_in_seconds: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_role: The role of a replica of a stateful service. Possible + values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', + 'ActiveSecondary' + :type replica_role: str or ~azure.servicefabric.models.ReplicaRole + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StatefulServiceReplicaInfo, self).__init__(**kwargs) + self.replica_role = kwargs.get('replica_role', None) + self.replica_id = kwargs.get('replica_id', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_info_py3.py b/customSDK/servicefabric/models/stateful_service_replica_info_py3.py new file mode 100644 index 0000000..81cf199 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_replica_info_py3.py @@ -0,0 +1,72 @@ +# 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 .replica_info_py3 import ReplicaInfo + + +class StatefulServiceReplicaInfo(ReplicaInfo): + """Represents a stateful service replica. This includes information about the + identity, role, status, health, node name, uptime, and other details about + the replica. + + All required parameters must be populated in order to send to Azure. + + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param address: The address the replica is listening on. + :type address: str + :param last_in_build_duration_in_seconds: The last in build duration of + the replica in seconds. + :type last_in_build_duration_in_seconds: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_role: The role of a replica of a stateful service. Possible + values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', + 'ActiveSecondary' + :type replica_role: str or ~azure.servicefabric.models.ReplicaRole + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__(self, *, replica_status=None, health_state=None, node_name: str=None, address: str=None, last_in_build_duration_in_seconds: str=None, replica_role=None, replica_id: str=None, **kwargs) -> None: + super(StatefulServiceReplicaInfo, self).__init__(replica_status=replica_status, health_state=health_state, node_name=node_name, address=address, last_in_build_duration_in_seconds=last_in_build_duration_in_seconds, **kwargs) + self.replica_role = replica_role + self.replica_id = replica_id + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_type_description.py b/customSDK/servicefabric/models/stateful_service_type_description.py new file mode 100644 index 0000000..383a234 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_type_description.py @@ -0,0 +1,68 @@ +# 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 .service_type_description import ServiceTypeDescription + + +class StatefulServiceTypeDescription(ServiceTypeDescription): + """Describes a stateful service type defined in the service manifest of a + provisioned application type. + + All required parameters must be populated in order to send to Azure. + + :param is_stateful: Indicates whether the service type is a stateful + service type or a stateless service type. This property is true if the + service type is a stateful service type, false otherwise. + :type is_stateful: bool + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param placement_constraints: The placement constraint to be used when + instantiating this service in a Service Fabric cluster. + :type placement_constraints: str + :param load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: List of service placement policy + descriptions. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param extensions: List of service type extensions. + :type extensions: + list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :param kind: Required. Constant filled by server. + :type kind: str + :param has_persisted_state: A flag indicating whether this is a persistent + service which stores states on the local disk. If it is then the value of + this property is true, if not it is false. + :type has_persisted_state: bool + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(StatefulServiceTypeDescription, self).__init__(**kwargs) + self.has_persisted_state = kwargs.get('has_persisted_state', None) + self.kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_type_description_py3.py b/customSDK/servicefabric/models/stateful_service_type_description_py3.py new file mode 100644 index 0000000..14d8e3c --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_type_description_py3.py @@ -0,0 +1,68 @@ +# 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 .service_type_description_py3 import ServiceTypeDescription + + +class StatefulServiceTypeDescription(ServiceTypeDescription): + """Describes a stateful service type defined in the service manifest of a + provisioned application type. + + All required parameters must be populated in order to send to Azure. + + :param is_stateful: Indicates whether the service type is a stateful + service type or a stateless service type. This property is true if the + service type is a stateful service type, false otherwise. + :type is_stateful: bool + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param placement_constraints: The placement constraint to be used when + instantiating this service in a Service Fabric cluster. + :type placement_constraints: str + :param load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: List of service placement policy + descriptions. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param extensions: List of service type extensions. + :type extensions: + list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :param kind: Required. Constant filled by server. + :type kind: str + :param has_persisted_state: A flag indicating whether this is a persistent + service which stores states on the local disk. If it is then the value of + this property is true, if not it is false. + :type has_persisted_state: bool + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + } + + def __init__(self, *, is_stateful: bool=None, service_type_name: str=None, placement_constraints: str=None, load_metrics=None, service_placement_policies=None, extensions=None, has_persisted_state: bool=None, **kwargs) -> None: + super(StatefulServiceTypeDescription, self).__init__(is_stateful=is_stateful, service_type_name=service_type_name, placement_constraints=placement_constraints, load_metrics=load_metrics, service_placement_policies=service_placement_policies, extensions=extensions, **kwargs) + self.has_persisted_state = has_persisted_state + self.kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_update_description.py b/customSDK/servicefabric/models/stateful_service_update_description.py new file mode 100644 index 0000000..60e9b3f --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_update_description.py @@ -0,0 +1,165 @@ +# 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 .service_update_description import ServiceUpdateDescription + + +class StatefulServiceUpdateDescription(ServiceUpdateDescription): + """Describes an update for a stateful service. + + All required parameters must be populated in order to send to Azure. + + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 6 then the flags for + ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + - None - Does not indicate any other properties are set. The value is + zero. + - TargetReplicaSetSize/InstanceCount - Indicates whether the + TargetReplicaSetSize property (for Stateful services) or the InstanceCount + property (for Stateless services) is set. The value is 1. + - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + property is set. The value is 2. + - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property + is set. The value is 4. + - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + property is set. The value is 8. + - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The + value is 16. + - PlacementConstraints - Indicates the PlacementConstraints property is + set. The value is 32. + - PlacementPolicyList - Indicates the ServicePlacementPolicies property is + set. The value is 64. + - Correlation - Indicates the CorrelationScheme property is set. The value + is 128. + - Metrics - Indicates the ServiceLoadMetrics property is set. The value is + 256. + - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The + value is 512. + - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + is 1024. + - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit + property is set. The value is 2048. + - MinInstanceCount - Indicates the MinInstanceCount property is set. The + value is 4096. + - MinInstancePercentage - Indicates the MinInstancePercentage property is + set. The value is 8192. + - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. + :type flags: str + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param load_metrics: The service load metrics. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param target_replica_set_size: The target replica set size as a number. + :type target_replica_set_size: int + :param min_replica_set_size: The minimum replica set size as a number. + :type min_replica_set_size: int + :param replica_restart_wait_duration_seconds: The duration, in seconds, + between when a replica goes down and when a new replica is created. + :type replica_restart_wait_duration_seconds: str + :param quorum_loss_wait_duration_seconds: The maximum duration, in + seconds, for which a partition is allowed to be in a state of quorum loss. + :type quorum_loss_wait_duration_seconds: str + :param stand_by_replica_keep_duration_seconds: The definition on how long + StandBy replicas should be maintained before being removed. + :type stand_by_replica_keep_duration_seconds: str + :param service_placement_time_limit_seconds: The duration for which + replicas can stay InBuild before reporting that build is stuck. + :type service_placement_time_limit_seconds: str + :param drop_source_replica_on_move: Indicates whether to drop source + Secondary replica even if the target replica has not finished build. If + desired behavior is to drop it as soon as possible the value of this + property is true, if not it is false. + :type drop_source_replica_on_move: bool + :param replica_lifecycle_description: Defines how replicas of this service + will behave during their lifecycle. + :type replica_lifecycle_description: + ~azure.servicefabric.models.ReplicaLifecycleDescription + """ + + _validation = { + 'service_kind': {'required': True}, + 'target_replica_set_size': {'minimum': 1}, + 'min_replica_set_size': {'minimum': 1}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'str'}, + 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'str'}, + 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'str'}, + 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'str'}, + 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, + 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, + } + + def __init__(self, **kwargs): + super(StatefulServiceUpdateDescription, self).__init__(**kwargs) + self.target_replica_set_size = kwargs.get('target_replica_set_size', None) + self.min_replica_set_size = kwargs.get('min_replica_set_size', None) + self.replica_restart_wait_duration_seconds = kwargs.get('replica_restart_wait_duration_seconds', None) + self.quorum_loss_wait_duration_seconds = kwargs.get('quorum_loss_wait_duration_seconds', None) + self.stand_by_replica_keep_duration_seconds = kwargs.get('stand_by_replica_keep_duration_seconds', None) + self.service_placement_time_limit_seconds = kwargs.get('service_placement_time_limit_seconds', None) + self.drop_source_replica_on_move = kwargs.get('drop_source_replica_on_move', None) + self.replica_lifecycle_description = kwargs.get('replica_lifecycle_description', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_update_description_py3.py b/customSDK/servicefabric/models/stateful_service_update_description_py3.py new file mode 100644 index 0000000..e212d1e --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_update_description_py3.py @@ -0,0 +1,165 @@ +# 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 .service_update_description_py3 import ServiceUpdateDescription + + +class StatefulServiceUpdateDescription(ServiceUpdateDescription): + """Describes an update for a stateful service. + + All required parameters must be populated in order to send to Azure. + + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 6 then the flags for + ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + - None - Does not indicate any other properties are set. The value is + zero. + - TargetReplicaSetSize/InstanceCount - Indicates whether the + TargetReplicaSetSize property (for Stateful services) or the InstanceCount + property (for Stateless services) is set. The value is 1. + - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + property is set. The value is 2. + - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property + is set. The value is 4. + - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + property is set. The value is 8. + - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The + value is 16. + - PlacementConstraints - Indicates the PlacementConstraints property is + set. The value is 32. + - PlacementPolicyList - Indicates the ServicePlacementPolicies property is + set. The value is 64. + - Correlation - Indicates the CorrelationScheme property is set. The value + is 128. + - Metrics - Indicates the ServiceLoadMetrics property is set. The value is + 256. + - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The + value is 512. + - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + is 1024. + - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit + property is set. The value is 2048. + - MinInstanceCount - Indicates the MinInstanceCount property is set. The + value is 4096. + - MinInstancePercentage - Indicates the MinInstancePercentage property is + set. The value is 8192. + - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. + :type flags: str + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param load_metrics: The service load metrics. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param target_replica_set_size: The target replica set size as a number. + :type target_replica_set_size: int + :param min_replica_set_size: The minimum replica set size as a number. + :type min_replica_set_size: int + :param replica_restart_wait_duration_seconds: The duration, in seconds, + between when a replica goes down and when a new replica is created. + :type replica_restart_wait_duration_seconds: str + :param quorum_loss_wait_duration_seconds: The maximum duration, in + seconds, for which a partition is allowed to be in a state of quorum loss. + :type quorum_loss_wait_duration_seconds: str + :param stand_by_replica_keep_duration_seconds: The definition on how long + StandBy replicas should be maintained before being removed. + :type stand_by_replica_keep_duration_seconds: str + :param service_placement_time_limit_seconds: The duration for which + replicas can stay InBuild before reporting that build is stuck. + :type service_placement_time_limit_seconds: str + :param drop_source_replica_on_move: Indicates whether to drop source + Secondary replica even if the target replica has not finished build. If + desired behavior is to drop it as soon as possible the value of this + property is true, if not it is false. + :type drop_source_replica_on_move: bool + :param replica_lifecycle_description: Defines how replicas of this service + will behave during their lifecycle. + :type replica_lifecycle_description: + ~azure.servicefabric.models.ReplicaLifecycleDescription + """ + + _validation = { + 'service_kind': {'required': True}, + 'target_replica_set_size': {'minimum': 1}, + 'min_replica_set_size': {'minimum': 1}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'str'}, + 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'str'}, + 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'str'}, + 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'str'}, + 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, + 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, + } + + def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, target_replica_set_size: int=None, min_replica_set_size: int=None, replica_restart_wait_duration_seconds: str=None, quorum_loss_wait_duration_seconds: str=None, stand_by_replica_keep_duration_seconds: str=None, service_placement_time_limit_seconds: str=None, drop_source_replica_on_move: bool=None, replica_lifecycle_description=None, **kwargs) -> None: + super(StatefulServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_dns_name=service_dns_name, tags_for_placement=tags_for_placement, tags_for_running=tags_for_running, **kwargs) + self.target_replica_set_size = target_replica_set_size + self.min_replica_set_size = min_replica_set_size + self.replica_restart_wait_duration_seconds = replica_restart_wait_duration_seconds + self.quorum_loss_wait_duration_seconds = quorum_loss_wait_duration_seconds + self.stand_by_replica_keep_duration_seconds = stand_by_replica_keep_duration_seconds + self.service_placement_time_limit_seconds = service_placement_time_limit_seconds + self.drop_source_replica_on_move = drop_source_replica_on_move + self.replica_lifecycle_description = replica_lifecycle_description + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateless_replica_health_report_expired_event.py b/customSDK/servicefabric/models/stateless_replica_health_report_expired_event.py new file mode 100644 index 0000000..13e3fc1 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_replica_health_report_expired_event.py @@ -0,0 +1,109 @@ +# 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 .replica_event import ReplicaEvent + + +class StatelessReplicaHealthReportExpiredEvent(ReplicaEvent): + """Stateless Replica Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(StatelessReplicaHealthReportExpiredEvent, self).__init__(**kwargs) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'StatelessReplicaHealthReportExpired' diff --git a/customSDK/servicefabric/models/stateless_replica_health_report_expired_event_py3.py b/customSDK/servicefabric/models/stateless_replica_health_report_expired_event_py3.py new file mode 100644 index 0000000..dc0c926 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_replica_health_report_expired_event_py3.py @@ -0,0 +1,109 @@ +# 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 .replica_event_py3 import ReplicaEvent + + +class StatelessReplicaHealthReportExpiredEvent(ReplicaEvent): + """Stateless Replica Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(StatelessReplicaHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'StatelessReplicaHealthReportExpired' diff --git a/customSDK/servicefabric/models/stateless_replica_new_health_report_event.py b/customSDK/servicefabric/models/stateless_replica_new_health_report_event.py new file mode 100644 index 0000000..7f2c8f7 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_replica_new_health_report_event.py @@ -0,0 +1,109 @@ +# 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 .replica_event import ReplicaEvent + + +class StatelessReplicaNewHealthReportEvent(ReplicaEvent): + """Stateless Replica Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(StatelessReplicaNewHealthReportEvent, self).__init__(**kwargs) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'StatelessReplicaNewHealthReport' diff --git a/customSDK/servicefabric/models/stateless_replica_new_health_report_event_py3.py b/customSDK/servicefabric/models/stateless_replica_new_health_report_event_py3.py new file mode 100644 index 0000000..fbaeeb9 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_replica_new_health_report_event_py3.py @@ -0,0 +1,109 @@ +# 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 .replica_event_py3 import ReplicaEvent + + +class StatelessReplicaNewHealthReportEvent(ReplicaEvent): + """Stateless Replica Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(StatelessReplicaNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'StatelessReplicaNewHealthReport' diff --git a/customSDK/servicefabric/models/stateless_service_description.py b/customSDK/servicefabric/models/stateless_service_description.py new file mode 100644 index 0000000..7ebf6c9 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_description.py @@ -0,0 +1,192 @@ +# 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 .service_description import ServiceDescription + + +class StatelessServiceDescription(ServiceDescription): + """Describes a stateless service. + + All required parameters must be populated in order to send to Azure. + + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_name: Required. The full name of the service with 'fabric:' + URI scheme. + :type service_name: str + :param service_type_name: Required. Name of the service type as specified + in the service manifest. + :type service_type_name: str + :param initialization_data: The initialization data as an array of bytes. + Initialization data is passed to service instances or replicas when they + are created. + :type initialization_data: list[int] + :param partition_description: Required. The partition description as an + object. + :type partition_description: + ~azure.servicefabric.models.PartitionSchemeDescription + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param service_load_metrics: The service load metrics. + :type service_load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param is_default_move_cost_specified: Indicates if the DefaultMoveCost + property is specified. + :type is_default_move_cost_specified: bool + :param service_package_activation_mode: The activation mode of service + package to be used for a service. Possible values include: + 'SharedProcess', 'ExclusiveProcess' + :type service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :param service_dns_name: The DNS name of the service. It requires the DNS + system service to be enabled in Service Fabric cluster. + :type service_dns_name: str + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_count: Required. The instance count. + :type instance_count: int + :param min_instance_count: MinInstanceCount is the minimum number of + instances that must be up to meet the EnsureAvailability safety check + during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation + -1 is first converted into the number of nodes on which the instances are + allowed to be placed according to the placement constraints on the + service. + :type min_instance_count: int + :param min_instance_percentage: MinInstancePercentage is the minimum + percentage of InstanceCount that must be up to meet the EnsureAvailability + safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage + computation, -1 is first converted into the number of nodes on which the + instances are allowed to be placed according to the placement constraints + on the service. + :type min_instance_percentage: int + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 1 then the flags for + InstanceCloseDelayDuration is set. + - None - Does not indicate any other properties are set. The value is + zero. + - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 1. + - InstanceRestartWaitDuration - Indicates the + InstanceRestartWaitDurationSeconds property is set. The value is 2. + :type flags: int + :param instance_close_delay_duration_seconds: Duration in seconds, to wait + before a stateless instance is closed, to allow the active requests to + drain gracefully. This would be effective when the instance is closing + during the application/cluster upgrade and disabling node. + The endpoint exposed on this instance is removed prior to starting the + delay, which prevents new connections to this instance. + In addition, clients that have subscribed to service endpoint change + events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), + can do + the following upon receiving the endpoint removal notification: + - Stop sending new requests to this instance. + - Close existing connections after in-flight requests have completed. + - Connect to a different instance of the service partition for future + requests. + Note, the default value of InstanceCloseDelayDuration is 0, which + indicates that there won't be any delay or removal of the endpoint prior + to closing the instance. + :type instance_close_delay_duration_seconds: long + :param instance_lifecycle_description: Defines how instances of this + service will behave during their lifecycle. + :type instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :param instance_restart_wait_duration_seconds: When a stateless instance + goes down, this timer starts. When it expires Service Fabric will create a + new instance on any node in the cluster. + This configuration is to reduce unnecessary creation of a new instance in + situations where the instance going down is likely to recover in a short + time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes + down, Service Fabric will immediately start building its replacement. + :type instance_restart_wait_duration_seconds: long + """ + + _validation = { + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + 'service_kind': {'required': True}, + 'instance_count': {'required': True, 'minimum': -1}, + 'instance_close_delay_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'instance_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'long'}, + 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, + 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(StatelessServiceDescription, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) + self.min_instance_count = kwargs.get('min_instance_count', None) + self.min_instance_percentage = kwargs.get('min_instance_percentage', None) + self.flags = kwargs.get('flags', None) + self.instance_close_delay_duration_seconds = kwargs.get('instance_close_delay_duration_seconds', None) + self.instance_lifecycle_description = kwargs.get('instance_lifecycle_description', None) + self.instance_restart_wait_duration_seconds = kwargs.get('instance_restart_wait_duration_seconds', None) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_description_py3.py b/customSDK/servicefabric/models/stateless_service_description_py3.py new file mode 100644 index 0000000..87109ca --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_description_py3.py @@ -0,0 +1,192 @@ +# 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 .service_description_py3 import ServiceDescription + + +class StatelessServiceDescription(ServiceDescription): + """Describes a stateless service. + + All required parameters must be populated in order to send to Azure. + + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_name: Required. The full name of the service with 'fabric:' + URI scheme. + :type service_name: str + :param service_type_name: Required. Name of the service type as specified + in the service manifest. + :type service_type_name: str + :param initialization_data: The initialization data as an array of bytes. + Initialization data is passed to service instances or replicas when they + are created. + :type initialization_data: list[int] + :param partition_description: Required. The partition description as an + object. + :type partition_description: + ~azure.servicefabric.models.PartitionSchemeDescription + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param service_load_metrics: The service load metrics. + :type service_load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param is_default_move_cost_specified: Indicates if the DefaultMoveCost + property is specified. + :type is_default_move_cost_specified: bool + :param service_package_activation_mode: The activation mode of service + package to be used for a service. Possible values include: + 'SharedProcess', 'ExclusiveProcess' + :type service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :param service_dns_name: The DNS name of the service. It requires the DNS + system service to be enabled in Service Fabric cluster. + :type service_dns_name: str + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_count: Required. The instance count. + :type instance_count: int + :param min_instance_count: MinInstanceCount is the minimum number of + instances that must be up to meet the EnsureAvailability safety check + during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation + -1 is first converted into the number of nodes on which the instances are + allowed to be placed according to the placement constraints on the + service. + :type min_instance_count: int + :param min_instance_percentage: MinInstancePercentage is the minimum + percentage of InstanceCount that must be up to meet the EnsureAvailability + safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage + computation, -1 is first converted into the number of nodes on which the + instances are allowed to be placed according to the placement constraints + on the service. + :type min_instance_percentage: int + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 1 then the flags for + InstanceCloseDelayDuration is set. + - None - Does not indicate any other properties are set. The value is + zero. + - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 1. + - InstanceRestartWaitDuration - Indicates the + InstanceRestartWaitDurationSeconds property is set. The value is 2. + :type flags: int + :param instance_close_delay_duration_seconds: Duration in seconds, to wait + before a stateless instance is closed, to allow the active requests to + drain gracefully. This would be effective when the instance is closing + during the application/cluster upgrade and disabling node. + The endpoint exposed on this instance is removed prior to starting the + delay, which prevents new connections to this instance. + In addition, clients that have subscribed to service endpoint change + events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), + can do + the following upon receiving the endpoint removal notification: + - Stop sending new requests to this instance. + - Close existing connections after in-flight requests have completed. + - Connect to a different instance of the service partition for future + requests. + Note, the default value of InstanceCloseDelayDuration is 0, which + indicates that there won't be any delay or removal of the endpoint prior + to closing the instance. + :type instance_close_delay_duration_seconds: long + :param instance_lifecycle_description: Defines how instances of this + service will behave during their lifecycle. + :type instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :param instance_restart_wait_duration_seconds: When a stateless instance + goes down, this timer starts. When it expires Service Fabric will create a + new instance on any node in the cluster. + This configuration is to reduce unnecessary creation of a new instance in + situations where the instance going down is likely to recover in a short + time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes + down, Service Fabric will immediately start building its replacement. + :type instance_restart_wait_duration_seconds: long + """ + + _validation = { + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + 'service_kind': {'required': True}, + 'instance_count': {'required': True, 'minimum': -1}, + 'instance_close_delay_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'instance_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'long'}, + 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, + 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'long'}, + } + + def __init__(self, *, service_name: str, service_type_name: str, partition_description, instance_count: int, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, min_instance_count: int=None, min_instance_percentage: int=None, flags: int=None, instance_close_delay_duration_seconds: int=None, instance_lifecycle_description=None, instance_restart_wait_duration_seconds: int=None, **kwargs) -> None: + super(StatelessServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, tags_required_to_place=tags_required_to_place, tags_required_to_run=tags_required_to_run, **kwargs) + self.instance_count = instance_count + self.min_instance_count = min_instance_count + self.min_instance_percentage = min_instance_percentage + self.flags = flags + self.instance_close_delay_duration_seconds = instance_close_delay_duration_seconds + self.instance_lifecycle_description = instance_lifecycle_description + self.instance_restart_wait_duration_seconds = instance_restart_wait_duration_seconds + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_info.py b/customSDK/servicefabric/models/stateless_service_info.py new file mode 100644 index 0000000..234c4e1 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_info.py @@ -0,0 +1,66 @@ +# 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 .service_info import ServiceInfo + + +class StatelessServiceInfo(ServiceInfo): + """Information about a stateless Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :param id: The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to + identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type id: str + :param name: The full name of the service with 'fabric:' URI scheme. + :type name: str + :param type_name: Name of the service type as specified in the service + manifest. + :type type_name: str + :param manifest_version: The version of the service manifest. + :type manifest_version: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_status: The status of the application. Possible values + include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + 'Failed' + :type service_status: str or ~azure.servicefabric.models.ServiceStatus + :param is_service_group: Whether the service is in a service group. + :type is_service_group: bool + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StatelessServiceInfo, self).__init__(**kwargs) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_info_py3.py b/customSDK/servicefabric/models/stateless_service_info_py3.py new file mode 100644 index 0000000..6c09bd4 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_info_py3.py @@ -0,0 +1,66 @@ +# 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 .service_info_py3 import ServiceInfo + + +class StatelessServiceInfo(ServiceInfo): + """Information about a stateless Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :param id: The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to + identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type id: str + :param name: The full name of the service with 'fabric:' URI scheme. + :type name: str + :param type_name: Name of the service type as specified in the service + manifest. + :type type_name: str + :param manifest_version: The version of the service manifest. + :type manifest_version: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_status: The status of the application. Possible values + include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + 'Failed' + :type service_status: str or ~azure.servicefabric.models.ServiceStatus + :param is_service_group: Whether the service is in a service group. + :type is_service_group: bool + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, type_name: str=None, manifest_version: str=None, health_state=None, service_status=None, is_service_group: bool=None, **kwargs) -> None: + super(StatelessServiceInfo, self).__init__(id=id, name=name, type_name=type_name, manifest_version=manifest_version, health_state=health_state, service_status=service_status, is_service_group=is_service_group, **kwargs) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_health.py b/customSDK/servicefabric/models/stateless_service_instance_health.py new file mode 100644 index 0000000..aadcd57 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_instance_health.py @@ -0,0 +1,68 @@ +# 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 .replica_health import ReplicaHealth + + +class StatelessServiceInstanceHealth(ReplicaHealth): + """Represents the health of the stateless service instance. + Contains the instance aggregated health state, the health events and the + unhealthy evaluations. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param partition_id: Id of the partition to which this replica belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_id: Id of a stateless service instance. InstanceId is used + by Service Fabric to uniquely identify an instance of a partition of a + stateless service. It is unique within a partition and does not change for + the lifetime of the instance. If the instance has failed over on the same + or different node, it will get a different value for the InstanceId. + :type instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StatelessServiceInstanceHealth, self).__init__(**kwargs) + self.instance_id = kwargs.get('instance_id', None) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_health_py3.py b/customSDK/servicefabric/models/stateless_service_instance_health_py3.py new file mode 100644 index 0000000..ce8448d --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_instance_health_py3.py @@ -0,0 +1,68 @@ +# 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 .replica_health_py3 import ReplicaHealth + + +class StatelessServiceInstanceHealth(ReplicaHealth): + """Represents the health of the stateless service instance. + Contains the instance aggregated health state, the health events and the + unhealthy evaluations. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param partition_id: Id of the partition to which this replica belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_id: Id of a stateless service instance. InstanceId is used + by Service Fabric to uniquely identify an instance of a partition of a + stateless service. It is unique within a partition and does not change for + the lifetime of the instance. If the instance has failed over on the same + or different node, it will get a different value for the InstanceId. + :type instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, instance_id: str=None, **kwargs) -> None: + super(StatelessServiceInstanceHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, partition_id=partition_id, **kwargs) + self.instance_id = instance_id + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_health_state.py b/customSDK/servicefabric/models/stateless_service_instance_health_state.py new file mode 100644 index 0000000..bfd2e8f --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_instance_health_state.py @@ -0,0 +1,51 @@ +# 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 .replica_health_state import ReplicaHealthState + + +class StatelessServiceInstanceHealthState(ReplicaHealthState): + """Represents the health state of the stateless service instance, which + contains the instance ID and the aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param partition_id: The ID of the partition to which this replica + belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of the stateless service instance on the wire this + field is called ReplicaId. + :type replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StatelessServiceInstanceHealthState, self).__init__(**kwargs) + self.replica_id = kwargs.get('replica_id', None) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_health_state_py3.py b/customSDK/servicefabric/models/stateless_service_instance_health_state_py3.py new file mode 100644 index 0000000..e417aab --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_instance_health_state_py3.py @@ -0,0 +1,51 @@ +# 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 .replica_health_state_py3 import ReplicaHealthState + + +class StatelessServiceInstanceHealthState(ReplicaHealthState): + """Represents the health state of the stateless service instance, which + contains the instance ID and the aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param partition_id: The ID of the partition to which this replica + belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of the stateless service instance on the wire this + field is called ReplicaId. + :type replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, partition_id: str=None, replica_id: str=None, **kwargs) -> None: + super(StatelessServiceInstanceHealthState, self).__init__(aggregated_health_state=aggregated_health_state, partition_id=partition_id, **kwargs) + self.replica_id = replica_id + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_info.py b/customSDK/servicefabric/models/stateless_service_instance_info.py new file mode 100644 index 0000000..daa9fa1 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_instance_info.py @@ -0,0 +1,64 @@ +# 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 .replica_info import ReplicaInfo + + +class StatelessServiceInstanceInfo(ReplicaInfo): + """Represents a stateless service instance. This includes information about + the identity, status, health, node name, uptime, and other details about + the instance. + + All required parameters must be populated in order to send to Azure. + + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param address: The address the replica is listening on. + :type address: str + :param last_in_build_duration_in_seconds: The last in build duration of + the replica in seconds. + :type last_in_build_duration_in_seconds: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_id: Id of a stateless service instance. InstanceId is used + by Service Fabric to uniquely identify an instance of a partition of a + stateless service. It is unique within a partition and does not change for + the lifetime of the instance. If the instance has failed over on the same + or different node, it will get a different value for the InstanceId. + :type instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StatelessServiceInstanceInfo, self).__init__(**kwargs) + self.instance_id = kwargs.get('instance_id', None) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_info_py3.py b/customSDK/servicefabric/models/stateless_service_instance_info_py3.py new file mode 100644 index 0000000..74dc045 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_instance_info_py3.py @@ -0,0 +1,64 @@ +# 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 .replica_info_py3 import ReplicaInfo + + +class StatelessServiceInstanceInfo(ReplicaInfo): + """Represents a stateless service instance. This includes information about + the identity, status, health, node name, uptime, and other details about + the instance. + + All required parameters must be populated in order to send to Azure. + + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param address: The address the replica is listening on. + :type address: str + :param last_in_build_duration_in_seconds: The last in build duration of + the replica in seconds. + :type last_in_build_duration_in_seconds: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_id: Id of a stateless service instance. InstanceId is used + by Service Fabric to uniquely identify an instance of a partition of a + stateless service. It is unique within a partition and does not change for + the lifetime of the instance. If the instance has failed over on the same + or different node, it will get a different value for the InstanceId. + :type instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__(self, *, replica_status=None, health_state=None, node_name: str=None, address: str=None, last_in_build_duration_in_seconds: str=None, instance_id: str=None, **kwargs) -> None: + super(StatelessServiceInstanceInfo, self).__init__(replica_status=replica_status, health_state=health_state, node_name=node_name, address=address, last_in_build_duration_in_seconds=last_in_build_duration_in_seconds, **kwargs) + self.instance_id = instance_id + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_partition_info.py b/customSDK/servicefabric/models/stateless_service_partition_info.py new file mode 100644 index 0000000..8e95d4d --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_partition_info.py @@ -0,0 +1,78 @@ +# 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 .service_partition_info import ServicePartitionInfo + + +class StatelessServicePartitionInfo(ServicePartitionInfo): + """Information about a partition of a stateless Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param partition_status: The status of the service fabric service + partition. Possible values include: 'Invalid', 'Ready', 'NotReady', + 'InQuorumLoss', 'Reconfiguring', 'Deleting' + :type partition_status: str or + ~azure.servicefabric.models.ServicePartitionStatus + :param partition_information: Information about the partition identity, + partitioning scheme and keys supported by it. + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_count: Number of instances of this partition. + :type instance_count: long + :param min_instance_count: MinInstanceCount is the minimum number of + instances that must be up to meet the EnsureAvailability safety check + during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation + -1 is first converted into the number of nodes on which the instances are + allowed to be placed according to the placement constraints on the + service. + :type min_instance_count: int + :param min_instance_percentage: MinInstancePercentage is the minimum + percentage of InstanceCount that must be up to meet the EnsureAvailability + safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage + computation, -1 is first converted into the number of nodes on which the + instances are allowed to be placed according to the placement constraints + on the service. + :type min_instance_percentage: int + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'long'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(StatelessServicePartitionInfo, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) + self.min_instance_count = kwargs.get('min_instance_count', None) + self.min_instance_percentage = kwargs.get('min_instance_percentage', None) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_partition_info_py3.py b/customSDK/servicefabric/models/stateless_service_partition_info_py3.py new file mode 100644 index 0000000..8b97621 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_partition_info_py3.py @@ -0,0 +1,78 @@ +# 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 .service_partition_info_py3 import ServicePartitionInfo + + +class StatelessServicePartitionInfo(ServicePartitionInfo): + """Information about a partition of a stateless Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param partition_status: The status of the service fabric service + partition. Possible values include: 'Invalid', 'Ready', 'NotReady', + 'InQuorumLoss', 'Reconfiguring', 'Deleting' + :type partition_status: str or + ~azure.servicefabric.models.ServicePartitionStatus + :param partition_information: Information about the partition identity, + partitioning scheme and keys supported by it. + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_count: Number of instances of this partition. + :type instance_count: long + :param min_instance_count: MinInstanceCount is the minimum number of + instances that must be up to meet the EnsureAvailability safety check + during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation + -1 is first converted into the number of nodes on which the instances are + allowed to be placed according to the placement constraints on the + service. + :type min_instance_count: int + :param min_instance_percentage: MinInstancePercentage is the minimum + percentage of InstanceCount that must be up to meet the EnsureAvailability + safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage + computation, -1 is first converted into the number of nodes on which the + instances are allowed to be placed according to the placement constraints + on the service. + :type min_instance_percentage: int + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'long'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + } + + def __init__(self, *, health_state=None, partition_status=None, partition_information=None, instance_count: int=None, min_instance_count: int=None, min_instance_percentage: int=None, **kwargs) -> None: + super(StatelessServicePartitionInfo, self).__init__(health_state=health_state, partition_status=partition_status, partition_information=partition_information, **kwargs) + self.instance_count = instance_count + self.min_instance_count = min_instance_count + self.min_instance_percentage = min_instance_percentage + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_type_description.py b/customSDK/servicefabric/models/stateless_service_type_description.py new file mode 100644 index 0000000..73cd84a --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_type_description.py @@ -0,0 +1,69 @@ +# 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 .service_type_description import ServiceTypeDescription + + +class StatelessServiceTypeDescription(ServiceTypeDescription): + """Describes a stateless service type defined in the service manifest of a + provisioned application type. + + All required parameters must be populated in order to send to Azure. + + :param is_stateful: Indicates whether the service type is a stateful + service type or a stateless service type. This property is true if the + service type is a stateful service type, false otherwise. + :type is_stateful: bool + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param placement_constraints: The placement constraint to be used when + instantiating this service in a Service Fabric cluster. + :type placement_constraints: str + :param load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: List of service placement policy + descriptions. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param extensions: List of service type extensions. + :type extensions: + list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :param kind: Required. Constant filled by server. + :type kind: str + :param use_implicit_host: A flag indicating if this type is not + implemented and hosted by a user service process, but is implicitly hosted + by a system created process. This value is true for services using the + guest executable services, false otherwise. + :type use_implicit_host: bool + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'use_implicit_host': {'key': 'UseImplicitHost', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(StatelessServiceTypeDescription, self).__init__(**kwargs) + self.use_implicit_host = kwargs.get('use_implicit_host', None) + self.kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_type_description_py3.py b/customSDK/servicefabric/models/stateless_service_type_description_py3.py new file mode 100644 index 0000000..bd0aa3e --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_type_description_py3.py @@ -0,0 +1,69 @@ +# 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 .service_type_description_py3 import ServiceTypeDescription + + +class StatelessServiceTypeDescription(ServiceTypeDescription): + """Describes a stateless service type defined in the service manifest of a + provisioned application type. + + All required parameters must be populated in order to send to Azure. + + :param is_stateful: Indicates whether the service type is a stateful + service type or a stateless service type. This property is true if the + service type is a stateful service type, false otherwise. + :type is_stateful: bool + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param placement_constraints: The placement constraint to be used when + instantiating this service in a Service Fabric cluster. + :type placement_constraints: str + :param load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: List of service placement policy + descriptions. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param extensions: List of service type extensions. + :type extensions: + list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :param kind: Required. Constant filled by server. + :type kind: str + :param use_implicit_host: A flag indicating if this type is not + implemented and hosted by a user service process, but is implicitly hosted + by a system created process. This value is true for services using the + guest executable services, false otherwise. + :type use_implicit_host: bool + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'use_implicit_host': {'key': 'UseImplicitHost', 'type': 'bool'}, + } + + def __init__(self, *, is_stateful: bool=None, service_type_name: str=None, placement_constraints: str=None, load_metrics=None, service_placement_policies=None, extensions=None, use_implicit_host: bool=None, **kwargs) -> None: + super(StatelessServiceTypeDescription, self).__init__(is_stateful=is_stateful, service_type_name=service_type_name, placement_constraints=placement_constraints, load_metrics=load_metrics, service_placement_policies=service_placement_policies, extensions=extensions, **kwargs) + self.use_implicit_host = use_implicit_host + self.kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_update_description.py b/customSDK/servicefabric/models/stateless_service_update_description.py new file mode 100644 index 0000000..4dc9927 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_update_description.py @@ -0,0 +1,185 @@ +# 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 .service_update_description import ServiceUpdateDescription + + +class StatelessServiceUpdateDescription(ServiceUpdateDescription): + """Describes an update for a stateless service. + + All required parameters must be populated in order to send to Azure. + + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 6 then the flags for + ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + - None - Does not indicate any other properties are set. The value is + zero. + - TargetReplicaSetSize/InstanceCount - Indicates whether the + TargetReplicaSetSize property (for Stateful services) or the InstanceCount + property (for Stateless services) is set. The value is 1. + - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + property is set. The value is 2. + - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property + is set. The value is 4. + - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + property is set. The value is 8. + - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The + value is 16. + - PlacementConstraints - Indicates the PlacementConstraints property is + set. The value is 32. + - PlacementPolicyList - Indicates the ServicePlacementPolicies property is + set. The value is 64. + - Correlation - Indicates the CorrelationScheme property is set. The value + is 128. + - Metrics - Indicates the ServiceLoadMetrics property is set. The value is + 256. + - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The + value is 512. + - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + is 1024. + - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit + property is set. The value is 2048. + - MinInstanceCount - Indicates the MinInstanceCount property is set. The + value is 4096. + - MinInstancePercentage - Indicates the MinInstancePercentage property is + set. The value is 8192. + - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. + :type flags: str + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param load_metrics: The service load metrics. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_count: The instance count. + :type instance_count: int + :param min_instance_count: MinInstanceCount is the minimum number of + instances that must be up to meet the EnsureAvailability safety check + during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation + -1 is first converted into the number of nodes on which the instances are + allowed to be placed according to the placement constraints on the + service. + :type min_instance_count: int + :param min_instance_percentage: MinInstancePercentage is the minimum + percentage of InstanceCount that must be up to meet the EnsureAvailability + safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage + computation, -1 is first converted into the number of nodes on which the + instances are allowed to be placed according to the placement constraints + on the service. + :type min_instance_percentage: int + :param instance_close_delay_duration_seconds: Duration in seconds, to wait + before a stateless instance is closed, to allow the active requests to + drain gracefully. This would be effective when the instance is closing + during the application/cluster upgrade and disabling node. + The endpoint exposed on this instance is removed prior to starting the + delay, which prevents new connections to this instance. + In addition, clients that have subscribed to service endpoint change + events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), + can do + the following upon receiving the endpoint removal notification: + - Stop sending new requests to this instance. + - Close existing connections after in-flight requests have completed. + - Connect to a different instance of the service partition for future + requests. + :type instance_close_delay_duration_seconds: str + :param instance_lifecycle_description: Defines how instances of this + service will behave during their lifecycle. + :type instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :param instance_restart_wait_duration_seconds: When a stateless instance + goes down, this timer starts. When it expires Service Fabric will create a + new instance on any node in the cluster. + This configuration is to reduce unnecessary creation of a new instance in + situations where the instance going down is likely to recover in a short + time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes + down, Service Fabric will immediately start building its replacement. + :type instance_restart_wait_duration_seconds: str + """ + + _validation = { + 'service_kind': {'required': True}, + 'instance_count': {'minimum': -1}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'str'}, + 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, + 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StatelessServiceUpdateDescription, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) + self.min_instance_count = kwargs.get('min_instance_count', None) + self.min_instance_percentage = kwargs.get('min_instance_percentage', None) + self.instance_close_delay_duration_seconds = kwargs.get('instance_close_delay_duration_seconds', None) + self.instance_lifecycle_description = kwargs.get('instance_lifecycle_description', None) + self.instance_restart_wait_duration_seconds = kwargs.get('instance_restart_wait_duration_seconds', None) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_update_description_py3.py b/customSDK/servicefabric/models/stateless_service_update_description_py3.py new file mode 100644 index 0000000..0e3ad1a --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_update_description_py3.py @@ -0,0 +1,185 @@ +# 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 .service_update_description_py3 import ServiceUpdateDescription + + +class StatelessServiceUpdateDescription(ServiceUpdateDescription): + """Describes an update for a stateless service. + + All required parameters must be populated in order to send to Azure. + + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 6 then the flags for + ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + - None - Does not indicate any other properties are set. The value is + zero. + - TargetReplicaSetSize/InstanceCount - Indicates whether the + TargetReplicaSetSize property (for Stateful services) or the InstanceCount + property (for Stateless services) is set. The value is 1. + - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + property is set. The value is 2. + - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property + is set. The value is 4. + - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + property is set. The value is 8. + - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The + value is 16. + - PlacementConstraints - Indicates the PlacementConstraints property is + set. The value is 32. + - PlacementPolicyList - Indicates the ServicePlacementPolicies property is + set. The value is 64. + - Correlation - Indicates the CorrelationScheme property is set. The value + is 128. + - Metrics - Indicates the ServiceLoadMetrics property is set. The value is + 256. + - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The + value is 512. + - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + is 1024. + - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit + property is set. The value is 2048. + - MinInstanceCount - Indicates the MinInstanceCount property is set. The + value is 4096. + - MinInstancePercentage - Indicates the MinInstancePercentage property is + set. The value is 8192. + - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. + :type flags: str + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param load_metrics: The service load metrics. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_count: The instance count. + :type instance_count: int + :param min_instance_count: MinInstanceCount is the minimum number of + instances that must be up to meet the EnsureAvailability safety check + during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation + -1 is first converted into the number of nodes on which the instances are + allowed to be placed according to the placement constraints on the + service. + :type min_instance_count: int + :param min_instance_percentage: MinInstancePercentage is the minimum + percentage of InstanceCount that must be up to meet the EnsureAvailability + safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage + computation, -1 is first converted into the number of nodes on which the + instances are allowed to be placed according to the placement constraints + on the service. + :type min_instance_percentage: int + :param instance_close_delay_duration_seconds: Duration in seconds, to wait + before a stateless instance is closed, to allow the active requests to + drain gracefully. This would be effective when the instance is closing + during the application/cluster upgrade and disabling node. + The endpoint exposed on this instance is removed prior to starting the + delay, which prevents new connections to this instance. + In addition, clients that have subscribed to service endpoint change + events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), + can do + the following upon receiving the endpoint removal notification: + - Stop sending new requests to this instance. + - Close existing connections after in-flight requests have completed. + - Connect to a different instance of the service partition for future + requests. + :type instance_close_delay_duration_seconds: str + :param instance_lifecycle_description: Defines how instances of this + service will behave during their lifecycle. + :type instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :param instance_restart_wait_duration_seconds: When a stateless instance + goes down, this timer starts. When it expires Service Fabric will create a + new instance on any node in the cluster. + This configuration is to reduce unnecessary creation of a new instance in + situations where the instance going down is likely to recover in a short + time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes + down, Service Fabric will immediately start building its replacement. + :type instance_restart_wait_duration_seconds: str + """ + + _validation = { + 'service_kind': {'required': True}, + 'instance_count': {'minimum': -1}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'str'}, + 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, + 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'str'}, + } + + def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, instance_count: int=None, min_instance_count: int=None, min_instance_percentage: int=None, instance_close_delay_duration_seconds: str=None, instance_lifecycle_description=None, instance_restart_wait_duration_seconds: str=None, **kwargs) -> None: + super(StatelessServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_dns_name=service_dns_name, tags_for_placement=tags_for_placement, tags_for_running=tags_for_running, **kwargs) + self.instance_count = instance_count + self.min_instance_count = min_instance_count + self.min_instance_percentage = min_instance_percentage + self.instance_close_delay_duration_seconds = instance_close_delay_duration_seconds + self.instance_lifecycle_description = instance_lifecycle_description + self.instance_restart_wait_duration_seconds = instance_restart_wait_duration_seconds + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stopped_chaos_event.py b/customSDK/servicefabric/models/stopped_chaos_event.py new file mode 100644 index 0000000..c86b889 --- /dev/null +++ b/customSDK/servicefabric/models/stopped_chaos_event.py @@ -0,0 +1,45 @@ +# 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 .chaos_event import ChaosEvent + + +class StoppedChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos stops because either + the user issued a stop or the time to run was up. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Describes why Chaos stopped. Chaos can stop because of + StopChaos API call or the timeToRun provided in ChaosParameters is over. + :type reason: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StoppedChaosEvent, self).__init__(**kwargs) + self.reason = kwargs.get('reason', None) + self.kind = 'Stopped' diff --git a/customSDK/servicefabric/models/stopped_chaos_event_py3.py b/customSDK/servicefabric/models/stopped_chaos_event_py3.py new file mode 100644 index 0000000..0390a4a --- /dev/null +++ b/customSDK/servicefabric/models/stopped_chaos_event_py3.py @@ -0,0 +1,45 @@ +# 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 .chaos_event_py3 import ChaosEvent + + +class StoppedChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos stops because either + the user issued a stop or the time to run was up. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Describes why Chaos stopped. Chaos can stop because of + StopChaos API call or the timeToRun provided in ChaosParameters is over. + :type reason: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: + super(StoppedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.reason = reason + self.kind = 'Stopped' diff --git a/customSDK/servicefabric/models/string_property_value.py b/customSDK/servicefabric/models/string_property_value.py new file mode 100644 index 0000000..6a4abd8 --- /dev/null +++ b/customSDK/servicefabric/models/string_property_value.py @@ -0,0 +1,39 @@ +# 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 .property_value import PropertyValue + + +class StringPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type String. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. The data of the property value. + :type data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StringPropertyValue, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.kind = 'String' diff --git a/customSDK/servicefabric/models/string_property_value_py3.py b/customSDK/servicefabric/models/string_property_value_py3.py new file mode 100644 index 0000000..65761bc --- /dev/null +++ b/customSDK/servicefabric/models/string_property_value_py3.py @@ -0,0 +1,39 @@ +# 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 .property_value_py3 import PropertyValue + + +class StringPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type String. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. The data of the property value. + :type data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__(self, *, data: str, **kwargs) -> None: + super(StringPropertyValue, self).__init__(**kwargs) + self.data = data + self.kind = 'String' diff --git a/customSDK/servicefabric/models/successful_property_batch_info.py b/customSDK/servicefabric/models/successful_property_batch_info.py new file mode 100644 index 0000000..5f28d5b --- /dev/null +++ b/customSDK/servicefabric/models/successful_property_batch_info.py @@ -0,0 +1,42 @@ +# 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 .property_batch_info import PropertyBatchInfo + + +class SuccessfulPropertyBatchInfo(PropertyBatchInfo): + """Derived from PropertyBatchInfo. Represents the property batch succeeding. + Contains the results of any "Get" operations in the batch. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param properties: A map containing the properties that were requested + through any "Get" property batch operations. The key represents the index + of the "Get" operation in the original request, in string form. The value + is the property. If a property is not found, it will not be in the map. + :type properties: dict[str, ~azure.servicefabric.models.PropertyInfo] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'properties': {'key': 'Properties', 'type': '{PropertyInfo}'}, + } + + def __init__(self, **kwargs): + super(SuccessfulPropertyBatchInfo, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.kind = 'Successful' diff --git a/customSDK/servicefabric/models/successful_property_batch_info_py3.py b/customSDK/servicefabric/models/successful_property_batch_info_py3.py new file mode 100644 index 0000000..34fc606 --- /dev/null +++ b/customSDK/servicefabric/models/successful_property_batch_info_py3.py @@ -0,0 +1,42 @@ +# 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 .property_batch_info_py3 import PropertyBatchInfo + + +class SuccessfulPropertyBatchInfo(PropertyBatchInfo): + """Derived from PropertyBatchInfo. Represents the property batch succeeding. + Contains the results of any "Get" operations in the batch. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param properties: A map containing the properties that were requested + through any "Get" property batch operations. The key represents the index + of the "Get" operation in the original request, in string form. The value + is the property. If a property is not found, it will not be in the map. + :type properties: dict[str, ~azure.servicefabric.models.PropertyInfo] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'properties': {'key': 'Properties', 'type': '{PropertyInfo}'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(SuccessfulPropertyBatchInfo, self).__init__(**kwargs) + self.properties = properties + self.kind = 'Successful' diff --git a/customSDK/servicefabric/models/system_application_health_evaluation.py b/customSDK/servicefabric/models/system_application_health_evaluation.py new file mode 100644 index 0000000..fb13fb7 --- /dev/null +++ b/customSDK/servicefabric/models/system_application_health_evaluation.py @@ -0,0 +1,56 @@ +# 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 .health_evaluation import HealthEvaluation + + +class SystemApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for the fabric:/System application, containing + information about the data and the algorithm used by health store to + evaluate health. The evaluation is returned only when the aggregated health + state of the cluster is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the system application. The types + of the unhealthy evaluations can be DeployedApplicationsHealthEvaluation, + ServicesHealthEvaluation or EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(SystemApplicationHealthEvaluation, self).__init__(**kwargs) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'SystemApplication' diff --git a/customSDK/servicefabric/models/system_application_health_evaluation_py3.py b/customSDK/servicefabric/models/system_application_health_evaluation_py3.py new file mode 100644 index 0000000..5a12102 --- /dev/null +++ b/customSDK/servicefabric/models/system_application_health_evaluation_py3.py @@ -0,0 +1,56 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class SystemApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for the fabric:/System application, containing + information about the data and the algorithm used by health store to + evaluate health. The evaluation is returned only when the aggregated health + state of the cluster is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the system application. The types + of the unhealthy evaluations can be DeployedApplicationsHealthEvaluation, + ServicesHealthEvaluation or EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, unhealthy_evaluations=None, **kwargs) -> None: + super(SystemApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'SystemApplication' diff --git a/customSDK/servicefabric/models/tcp_config.py b/customSDK/servicefabric/models/tcp_config.py new file mode 100644 index 0000000..9640169 --- /dev/null +++ b/customSDK/servicefabric/models/tcp_config.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class TcpConfig(Model): + """Describes the tcp configuration for external connectivity for this network. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. tcp gateway config name. + :type name: str + :param port: Required. Specifies the port at which the service endpoint + below needs to be exposed. + :type port: int + :param destination: Required. Describes destination endpoint for routing + traffic. + :type destination: ~azure.servicefabric.models.GatewayDestination + """ + + _validation = { + 'name': {'required': True}, + 'port': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, + } + + def __init__(self, **kwargs): + super(TcpConfig, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.port = kwargs.get('port', None) + self.destination = kwargs.get('destination', None) diff --git a/customSDK/servicefabric/models/tcp_config_py3.py b/customSDK/servicefabric/models/tcp_config_py3.py new file mode 100644 index 0000000..7266484 --- /dev/null +++ b/customSDK/servicefabric/models/tcp_config_py3.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class TcpConfig(Model): + """Describes the tcp configuration for external connectivity for this network. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. tcp gateway config name. + :type name: str + :param port: Required. Specifies the port at which the service endpoint + below needs to be exposed. + :type port: int + :param destination: Required. Describes destination endpoint for routing + traffic. + :type destination: ~azure.servicefabric.models.GatewayDestination + """ + + _validation = { + 'name': {'required': True}, + 'port': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, + } + + def __init__(self, *, name: str, port: int, destination, **kwargs) -> None: + super(TcpConfig, self).__init__(**kwargs) + self.name = name + self.port = port + self.destination = destination diff --git a/customSDK/servicefabric/models/test_error_chaos_event.py b/customSDK/servicefabric/models/test_error_chaos_event.py new file mode 100644 index 0000000..70ea29a --- /dev/null +++ b/customSDK/servicefabric/models/test_error_chaos_event.py @@ -0,0 +1,50 @@ +# 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 .chaos_event import ChaosEvent + + +class TestErrorChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when an unexpected event occurs + in the Chaos engine. + For example, due to the cluster snapshot being inconsistent, while faulting + an entity, Chaos found that the entity was already faulted -- which would + be an unexpected event. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Describes why TestErrorChaosEvent was generated. For + example, Chaos tries to fault a partition but finds that the partition is + no longer fault tolerant, then a TestErrorEvent gets generated with the + reason stating that the partition is not fault tolerant. + :type reason: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TestErrorChaosEvent, self).__init__(**kwargs) + self.reason = kwargs.get('reason', None) + self.kind = 'TestError' diff --git a/customSDK/servicefabric/models/test_error_chaos_event_py3.py b/customSDK/servicefabric/models/test_error_chaos_event_py3.py new file mode 100644 index 0000000..3ab8f58 --- /dev/null +++ b/customSDK/servicefabric/models/test_error_chaos_event_py3.py @@ -0,0 +1,50 @@ +# 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 .chaos_event_py3 import ChaosEvent + + +class TestErrorChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when an unexpected event occurs + in the Chaos engine. + For example, due to the cluster snapshot being inconsistent, while faulting + an entity, Chaos found that the entity was already faulted -- which would + be an unexpected event. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Describes why TestErrorChaosEvent was generated. For + example, Chaos tries to fault a partition but finds that the partition is + no longer fault tolerant, then a TestErrorEvent gets generated with the + reason stating that the partition is not fault tolerant. + :type reason: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: + super(TestErrorChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.reason = reason + self.kind = 'TestError' diff --git a/customSDK/servicefabric/models/time_based_backup_schedule_description.py b/customSDK/servicefabric/models/time_based_backup_schedule_description.py new file mode 100644 index 0000000..b2f36cd --- /dev/null +++ b/customSDK/servicefabric/models/time_based_backup_schedule_description.py @@ -0,0 +1,55 @@ +# 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 .backup_schedule_description import BackupScheduleDescription + + +class TimeBasedBackupScheduleDescription(BackupScheduleDescription): + """Describes the time based backup schedule. + + All required parameters must be populated in order to send to Azure. + + :param schedule_kind: Required. Constant filled by server. + :type schedule_kind: str + :param schedule_frequency_type: Required. Describes the frequency with + which to run the time based backup schedule. Possible values include: + 'Invalid', 'Daily', 'Weekly' + :type schedule_frequency_type: str or + ~azure.servicefabric.models.BackupScheduleFrequencyType + :param run_days: List of days of a week when to trigger the periodic + backup. This is valid only when the backup schedule frequency type is + weekly. + :type run_days: list[str or ~azure.servicefabric.models.DayOfWeek] + :param run_times: Required. Represents the list of exact time during the + day in ISO8601 format. Like '19:00:00' will represent '7PM' during the + day. Date specified along with time will be ignored. + :type run_times: list[datetime] + """ + + _validation = { + 'schedule_kind': {'required': True}, + 'schedule_frequency_type': {'required': True}, + 'run_times': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + 'schedule_frequency_type': {'key': 'ScheduleFrequencyType', 'type': 'str'}, + 'run_days': {'key': 'RunDays', 'type': '[str]'}, + 'run_times': {'key': 'RunTimes', 'type': '[iso-8601]'}, + } + + def __init__(self, **kwargs): + super(TimeBasedBackupScheduleDescription, self).__init__(**kwargs) + self.schedule_frequency_type = kwargs.get('schedule_frequency_type', None) + self.run_days = kwargs.get('run_days', None) + self.run_times = kwargs.get('run_times', None) + self.schedule_kind = 'TimeBased' diff --git a/customSDK/servicefabric/models/time_based_backup_schedule_description_py3.py b/customSDK/servicefabric/models/time_based_backup_schedule_description_py3.py new file mode 100644 index 0000000..63b0d0b --- /dev/null +++ b/customSDK/servicefabric/models/time_based_backup_schedule_description_py3.py @@ -0,0 +1,55 @@ +# 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 .backup_schedule_description_py3 import BackupScheduleDescription + + +class TimeBasedBackupScheduleDescription(BackupScheduleDescription): + """Describes the time based backup schedule. + + All required parameters must be populated in order to send to Azure. + + :param schedule_kind: Required. Constant filled by server. + :type schedule_kind: str + :param schedule_frequency_type: Required. Describes the frequency with + which to run the time based backup schedule. Possible values include: + 'Invalid', 'Daily', 'Weekly' + :type schedule_frequency_type: str or + ~azure.servicefabric.models.BackupScheduleFrequencyType + :param run_days: List of days of a week when to trigger the periodic + backup. This is valid only when the backup schedule frequency type is + weekly. + :type run_days: list[str or ~azure.servicefabric.models.DayOfWeek] + :param run_times: Required. Represents the list of exact time during the + day in ISO8601 format. Like '19:00:00' will represent '7PM' during the + day. Date specified along with time will be ignored. + :type run_times: list[datetime] + """ + + _validation = { + 'schedule_kind': {'required': True}, + 'schedule_frequency_type': {'required': True}, + 'run_times': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + 'schedule_frequency_type': {'key': 'ScheduleFrequencyType', 'type': 'str'}, + 'run_days': {'key': 'RunDays', 'type': '[str]'}, + 'run_times': {'key': 'RunTimes', 'type': '[iso-8601]'}, + } + + def __init__(self, *, schedule_frequency_type, run_times, run_days=None, **kwargs) -> None: + super(TimeBasedBackupScheduleDescription, self).__init__(**kwargs) + self.schedule_frequency_type = schedule_frequency_type + self.run_days = run_days + self.run_times = run_times + self.schedule_kind = 'TimeBased' diff --git a/customSDK/servicefabric/models/time_of_day.py b/customSDK/servicefabric/models/time_of_day.py new file mode 100644 index 0000000..313c4fd --- /dev/null +++ b/customSDK/servicefabric/models/time_of_day.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class TimeOfDay(Model): + """Defines an hour and minute of the day specified in 24 hour time. + + :param hour: Represents the hour of the day. Value must be between 0 and + 23 inclusive. + :type hour: int + :param minute: Represents the minute of the hour. Value must be between 0 + to 59 inclusive. + :type minute: int + """ + + _validation = { + 'hour': {'maximum': 23, 'minimum': 0}, + 'minute': {'maximum': 59, 'minimum': 0}, + } + + _attribute_map = { + 'hour': {'key': 'Hour', 'type': 'int'}, + 'minute': {'key': 'Minute', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(TimeOfDay, self).__init__(**kwargs) + self.hour = kwargs.get('hour', None) + self.minute = kwargs.get('minute', None) diff --git a/customSDK/servicefabric/models/time_of_day_py3.py b/customSDK/servicefabric/models/time_of_day_py3.py new file mode 100644 index 0000000..28215d0 --- /dev/null +++ b/customSDK/servicefabric/models/time_of_day_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class TimeOfDay(Model): + """Defines an hour and minute of the day specified in 24 hour time. + + :param hour: Represents the hour of the day. Value must be between 0 and + 23 inclusive. + :type hour: int + :param minute: Represents the minute of the hour. Value must be between 0 + to 59 inclusive. + :type minute: int + """ + + _validation = { + 'hour': {'maximum': 23, 'minimum': 0}, + 'minute': {'maximum': 59, 'minimum': 0}, + } + + _attribute_map = { + 'hour': {'key': 'Hour', 'type': 'int'}, + 'minute': {'key': 'Minute', 'type': 'int'}, + } + + def __init__(self, *, hour: int=None, minute: int=None, **kwargs) -> None: + super(TimeOfDay, self).__init__(**kwargs) + self.hour = hour + self.minute = minute diff --git a/customSDK/servicefabric/models/time_range.py b/customSDK/servicefabric/models/time_range.py new file mode 100644 index 0000000..2378d82 --- /dev/null +++ b/customSDK/servicefabric/models/time_range.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class TimeRange(Model): + """Defines a time range in a 24 hour day specified by a start and end time. + + :param start_time: Defines an hour and minute of the day specified in 24 + hour time. + :type start_time: ~azure.servicefabric.models.TimeOfDay + :param end_time: Defines an hour and minute of the day specified in 24 + hour time. + :type end_time: ~azure.servicefabric.models.TimeOfDay + """ + + _attribute_map = { + 'start_time': {'key': 'StartTime', 'type': 'TimeOfDay'}, + 'end_time': {'key': 'EndTime', 'type': 'TimeOfDay'}, + } + + def __init__(self, **kwargs): + super(TimeRange, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) diff --git a/customSDK/servicefabric/models/time_range_py3.py b/customSDK/servicefabric/models/time_range_py3.py new file mode 100644 index 0000000..09c72e1 --- /dev/null +++ b/customSDK/servicefabric/models/time_range_py3.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class TimeRange(Model): + """Defines a time range in a 24 hour day specified by a start and end time. + + :param start_time: Defines an hour and minute of the day specified in 24 + hour time. + :type start_time: ~azure.servicefabric.models.TimeOfDay + :param end_time: Defines an hour and minute of the day specified in 24 + hour time. + :type end_time: ~azure.servicefabric.models.TimeOfDay + """ + + _attribute_map = { + 'start_time': {'key': 'StartTime', 'type': 'TimeOfDay'}, + 'end_time': {'key': 'EndTime', 'type': 'TimeOfDay'}, + } + + def __init__(self, *, start_time=None, end_time=None, **kwargs) -> None: + super(TimeRange, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time diff --git a/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description.py b/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description.py new file mode 100644 index 0000000..3007da8 --- /dev/null +++ b/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description.py @@ -0,0 +1,54 @@ +# 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 .partition_scheme_description import PartitionSchemeDescription + + +class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): + """Describes a partitioning scheme where an integer range is allocated evenly + across a number of partitions. + + All required parameters must be populated in order to send to Azure. + + :param partition_scheme: Required. Constant filled by server. + :type partition_scheme: str + :param count: Required. The number of partitions. + :type count: int + :param low_key: Required. String indicating the lower bound of the + partition key range that + should be split between the partitions. + :type low_key: str + :param high_key: Required. String indicating the upper bound of the + partition key range that + should be split between the partitions. + :type high_key: str + """ + + _validation = { + 'partition_scheme': {'required': True}, + 'count': {'required': True}, + 'low_key': {'required': True}, + 'high_key': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + 'count': {'key': 'Count', 'type': 'int'}, + 'low_key': {'key': 'LowKey', 'type': 'str'}, + 'high_key': {'key': 'HighKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UniformInt64RangePartitionSchemeDescription, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.low_key = kwargs.get('low_key', None) + self.high_key = kwargs.get('high_key', None) + self.partition_scheme = 'UniformInt64Range' diff --git a/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description_py3.py b/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description_py3.py new file mode 100644 index 0000000..4ad8718 --- /dev/null +++ b/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description_py3.py @@ -0,0 +1,54 @@ +# 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 .partition_scheme_description_py3 import PartitionSchemeDescription + + +class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): + """Describes a partitioning scheme where an integer range is allocated evenly + across a number of partitions. + + All required parameters must be populated in order to send to Azure. + + :param partition_scheme: Required. Constant filled by server. + :type partition_scheme: str + :param count: Required. The number of partitions. + :type count: int + :param low_key: Required. String indicating the lower bound of the + partition key range that + should be split between the partitions. + :type low_key: str + :param high_key: Required. String indicating the upper bound of the + partition key range that + should be split between the partitions. + :type high_key: str + """ + + _validation = { + 'partition_scheme': {'required': True}, + 'count': {'required': True}, + 'low_key': {'required': True}, + 'high_key': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + 'count': {'key': 'Count', 'type': 'int'}, + 'low_key': {'key': 'LowKey', 'type': 'str'}, + 'high_key': {'key': 'HighKey', 'type': 'str'}, + } + + def __init__(self, *, count: int, low_key: str, high_key: str, **kwargs) -> None: + super(UniformInt64RangePartitionSchemeDescription, self).__init__(**kwargs) + self.count = count + self.low_key = low_key + self.high_key = high_key + self.partition_scheme = 'UniformInt64Range' diff --git a/customSDK/servicefabric/models/unplaced_replica_information.py b/customSDK/servicefabric/models/unplaced_replica_information.py new file mode 100644 index 0000000..ed715c2 --- /dev/null +++ b/customSDK/servicefabric/models/unplaced_replica_information.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class UnplacedReplicaInformation(Model): + """Contains information for an unplaced replica. + + :param service_name: The name of the service. + :type service_name: str + :param partition_id: The ID of the partition. + :type partition_id: str + :param unplaced_replica_details: List of reasons due to which a replica + cannot be placed. + :type unplaced_replica_details: list[str] + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'unplaced_replica_details': {'key': 'UnplacedReplicaDetails', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(UnplacedReplicaInformation, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) + self.unplaced_replica_details = kwargs.get('unplaced_replica_details', None) diff --git a/customSDK/servicefabric/models/unplaced_replica_information_py3.py b/customSDK/servicefabric/models/unplaced_replica_information_py3.py new file mode 100644 index 0000000..93e162c --- /dev/null +++ b/customSDK/servicefabric/models/unplaced_replica_information_py3.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class UnplacedReplicaInformation(Model): + """Contains information for an unplaced replica. + + :param service_name: The name of the service. + :type service_name: str + :param partition_id: The ID of the partition. + :type partition_id: str + :param unplaced_replica_details: List of reasons due to which a replica + cannot be placed. + :type unplaced_replica_details: list[str] + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'unplaced_replica_details': {'key': 'UnplacedReplicaDetails', 'type': '[str]'}, + } + + def __init__(self, *, service_name: str=None, partition_id: str=None, unplaced_replica_details=None, **kwargs) -> None: + super(UnplacedReplicaInformation, self).__init__(**kwargs) + self.service_name = service_name + self.partition_id = partition_id + self.unplaced_replica_details = unplaced_replica_details diff --git a/customSDK/servicefabric/models/unprovision_application_type_description_info.py b/customSDK/servicefabric/models/unprovision_application_type_description_info.py new file mode 100644 index 0000000..d946b38 --- /dev/null +++ b/customSDK/servicefabric/models/unprovision_application_type_description_info.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class UnprovisionApplicationTypeDescriptionInfo(Model): + """Describes the operation to unregister or unprovision an application type + and its version that was registered with the Service Fabric. + + All required parameters must be populated in order to send to Azure. + + :param application_type_version: Required. The version of the application + type as defined in the application manifest. + :type application_type_version: str + :param async_property: The flag indicating whether or not unprovision + should occur asynchronously. When set to true, the unprovision operation + returns when the request is accepted by the system, and the unprovision + operation continues without any timeout limit. The default value is false. + However, we recommend setting it to true for large application packages + that were provisioned. + :type async_property: bool + """ + + _validation = { + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'async_property': {'key': 'Async', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(UnprovisionApplicationTypeDescriptionInfo, self).__init__(**kwargs) + self.application_type_version = kwargs.get('application_type_version', None) + self.async_property = kwargs.get('async_property', None) diff --git a/customSDK/servicefabric/models/unprovision_application_type_description_info_py3.py b/customSDK/servicefabric/models/unprovision_application_type_description_info_py3.py new file mode 100644 index 0000000..abc8598 --- /dev/null +++ b/customSDK/servicefabric/models/unprovision_application_type_description_info_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class UnprovisionApplicationTypeDescriptionInfo(Model): + """Describes the operation to unregister or unprovision an application type + and its version that was registered with the Service Fabric. + + All required parameters must be populated in order to send to Azure. + + :param application_type_version: Required. The version of the application + type as defined in the application manifest. + :type application_type_version: str + :param async_property: The flag indicating whether or not unprovision + should occur asynchronously. When set to true, the unprovision operation + returns when the request is accepted by the system, and the unprovision + operation continues without any timeout limit. The default value is false. + However, we recommend setting it to true for large application packages + that were provisioned. + :type async_property: bool + """ + + _validation = { + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'async_property': {'key': 'Async', 'type': 'bool'}, + } + + def __init__(self, *, application_type_version: str, async_property: bool=None, **kwargs) -> None: + super(UnprovisionApplicationTypeDescriptionInfo, self).__init__(**kwargs) + self.application_type_version = application_type_version + self.async_property = async_property diff --git a/customSDK/servicefabric/models/unprovision_fabric_description.py b/customSDK/servicefabric/models/unprovision_fabric_description.py new file mode 100644 index 0000000..c56746b --- /dev/null +++ b/customSDK/servicefabric/models/unprovision_fabric_description.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class UnprovisionFabricDescription(Model): + """Describes the parameters for unprovisioning a cluster. + + :param code_version: The cluster code package version. + :type code_version: str + :param config_version: The cluster manifest version. + :type config_version: str + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UnprovisionFabricDescription, self).__init__(**kwargs) + self.code_version = kwargs.get('code_version', None) + self.config_version = kwargs.get('config_version', None) diff --git a/customSDK/servicefabric/models/unprovision_fabric_description_py3.py b/customSDK/servicefabric/models/unprovision_fabric_description_py3.py new file mode 100644 index 0000000..02691b0 --- /dev/null +++ b/customSDK/servicefabric/models/unprovision_fabric_description_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class UnprovisionFabricDescription(Model): + """Describes the parameters for unprovisioning a cluster. + + :param code_version: The cluster code package version. + :type code_version: str + :param config_version: The cluster manifest version. + :type config_version: str + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + } + + def __init__(self, *, code_version: str=None, config_version: str=None, **kwargs) -> None: + super(UnprovisionFabricDescription, self).__init__(**kwargs) + self.code_version = code_version + self.config_version = config_version diff --git a/customSDK/servicefabric/models/update_cluster_upgrade_description.py b/customSDK/servicefabric/models/update_cluster_upgrade_description.py new file mode 100644 index 0000000..22632ca --- /dev/null +++ b/customSDK/servicefabric/models/update_cluster_upgrade_description.py @@ -0,0 +1,61 @@ +# 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 msrest.serialization import Model + + +class UpdateClusterUpgradeDescription(Model): + """Parameters for updating a cluster upgrade. + + :param upgrade_kind: The type of upgrade out of the following possible + values. Possible values include: 'Invalid', 'Rolling', + 'Rolling_ForceRestart'. Default value: "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeType + :param update_description: Describes the parameters for updating a rolling + upgrade of application or cluster. + :type update_description: + ~azure.servicefabric.models.RollingUpgradeUpdateDescription + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param enable_delta_health_evaluation: When true, enables delta health + evaluation rather than absolute health evaluation after completion of each + upgrade domain. + :type enable_delta_health_evaluation: bool + :param cluster_upgrade_health_policy: Defines a health policy used to + evaluate the health of the cluster during a cluster upgrade. + :type cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :param application_health_policy_map: Defines the application health + policy map used to evaluate the health of an application or one of its + children entities. + :type application_health_policy_map: + ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _attribute_map = { + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__(self, **kwargs): + super(UpdateClusterUpgradeDescription, self).__init__(**kwargs) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.update_description = kwargs.get('update_description', None) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) + self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) diff --git a/customSDK/servicefabric/models/update_cluster_upgrade_description_py3.py b/customSDK/servicefabric/models/update_cluster_upgrade_description_py3.py new file mode 100644 index 0000000..8e1f16c --- /dev/null +++ b/customSDK/servicefabric/models/update_cluster_upgrade_description_py3.py @@ -0,0 +1,61 @@ +# 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 msrest.serialization import Model + + +class UpdateClusterUpgradeDescription(Model): + """Parameters for updating a cluster upgrade. + + :param upgrade_kind: The type of upgrade out of the following possible + values. Possible values include: 'Invalid', 'Rolling', + 'Rolling_ForceRestart'. Default value: "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeType + :param update_description: Describes the parameters for updating a rolling + upgrade of application or cluster. + :type update_description: + ~azure.servicefabric.models.RollingUpgradeUpdateDescription + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param enable_delta_health_evaluation: When true, enables delta health + evaluation rather than absolute health evaluation after completion of each + upgrade domain. + :type enable_delta_health_evaluation: bool + :param cluster_upgrade_health_policy: Defines a health policy used to + evaluate the health of the cluster during a cluster upgrade. + :type cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :param application_health_policy_map: Defines the application health + policy map used to evaluate the health of an application or one of its + children entities. + :type application_health_policy_map: + ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _attribute_map = { + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__(self, *, upgrade_kind="Rolling", update_description=None, cluster_health_policy=None, enable_delta_health_evaluation: bool=None, cluster_upgrade_health_policy=None, application_health_policy_map=None, **kwargs) -> None: + super(UpdateClusterUpgradeDescription, self).__init__(**kwargs) + self.upgrade_kind = upgrade_kind + self.update_description = update_description + self.cluster_health_policy = cluster_health_policy + self.enable_delta_health_evaluation = enable_delta_health_evaluation + self.cluster_upgrade_health_policy = cluster_upgrade_health_policy + self.application_health_policy_map = application_health_policy_map diff --git a/customSDK/servicefabric/models/update_partition_load_result.py b/customSDK/servicefabric/models/update_partition_load_result.py new file mode 100644 index 0000000..38866a2 --- /dev/null +++ b/customSDK/servicefabric/models/update_partition_load_result.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class UpdatePartitionLoadResult(Model): + """Specifies result of updating load for specified partitions. The output will + be ordered based on the partition ID. + + :param partition_id: Id of the partition. + :type partition_id: str + :param partition_error_code: If OperationState is Completed - this is 0. + If OperationState is Faulted - this is an error code indicating the + reason. + :type partition_error_code: int + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'partition_error_code': {'key': 'PartitionErrorCode', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(UpdatePartitionLoadResult, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.partition_error_code = kwargs.get('partition_error_code', None) diff --git a/customSDK/servicefabric/models/update_partition_load_result_py3.py b/customSDK/servicefabric/models/update_partition_load_result_py3.py new file mode 100644 index 0000000..f5991dc --- /dev/null +++ b/customSDK/servicefabric/models/update_partition_load_result_py3.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class UpdatePartitionLoadResult(Model): + """Specifies result of updating load for specified partitions. The output will + be ordered based on the partition ID. + + :param partition_id: Id of the partition. + :type partition_id: str + :param partition_error_code: If OperationState is Completed - this is 0. + If OperationState is Faulted - this is an error code indicating the + reason. + :type partition_error_code: int + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'partition_error_code': {'key': 'PartitionErrorCode', 'type': 'int'}, + } + + def __init__(self, *, partition_id: str=None, partition_error_code: int=None, **kwargs) -> None: + super(UpdatePartitionLoadResult, self).__init__(**kwargs) + self.partition_id = partition_id + self.partition_error_code = partition_error_code diff --git a/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation.py b/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation.py new file mode 100644 index 0000000..02d0947 --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation.py @@ -0,0 +1,82 @@ +# 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 .health_evaluation import HealthEvaluation + + +class UpgradeDomainDeltaNodesCheckHealthEvaluation(HealthEvaluation): + """Represents health evaluation for delta unhealthy cluster nodes in an + upgrade domain, containing health evaluations for each unhealthy node that + impacted current aggregated health state. + Can be returned during cluster upgrade when cluster aggregated health state + is Warning or Error. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param upgrade_domain_name: Name of the upgrade domain where nodes health + is currently evaluated. + :type upgrade_domain_name: str + :param baseline_error_count: Number of upgrade domain nodes with + aggregated heath state Error in the health store at the beginning of the + cluster upgrade. + :type baseline_error_count: long + :param baseline_total_count: Total number of upgrade domain nodes in the + health store at the beginning of the cluster upgrade. + :type baseline_total_count: long + :param max_percent_delta_unhealthy_nodes: Maximum allowed percentage of + upgrade domain delta unhealthy nodes from the ClusterUpgradeHealthPolicy. + :type max_percent_delta_unhealthy_nodes: int + :param total_count: Total number of upgrade domain nodes in the health + store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, + 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(UpgradeDomainDeltaNodesCheckHealthEvaluation, self).__init__(**kwargs) + self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) + self.baseline_error_count = kwargs.get('baseline_error_count', None) + self.baseline_total_count = kwargs.get('baseline_total_count', None) + self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'UpgradeDomainDeltaNodesCheck' diff --git a/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation_py3.py b/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation_py3.py new file mode 100644 index 0000000..9df9759 --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation_py3.py @@ -0,0 +1,82 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class UpgradeDomainDeltaNodesCheckHealthEvaluation(HealthEvaluation): + """Represents health evaluation for delta unhealthy cluster nodes in an + upgrade domain, containing health evaluations for each unhealthy node that + impacted current aggregated health state. + Can be returned during cluster upgrade when cluster aggregated health state + is Warning or Error. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param upgrade_domain_name: Name of the upgrade domain where nodes health + is currently evaluated. + :type upgrade_domain_name: str + :param baseline_error_count: Number of upgrade domain nodes with + aggregated heath state Error in the health store at the beginning of the + cluster upgrade. + :type baseline_error_count: long + :param baseline_total_count: Total number of upgrade domain nodes in the + health store at the beginning of the cluster upgrade. + :type baseline_total_count: long + :param max_percent_delta_unhealthy_nodes: Maximum allowed percentage of + upgrade domain delta unhealthy nodes from the ClusterUpgradeHealthPolicy. + :type max_percent_delta_unhealthy_nodes: int + :param total_count: Total number of upgrade domain nodes in the health + store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, + 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, upgrade_domain_name: str=None, baseline_error_count: int=None, baseline_total_count: int=None, max_percent_delta_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(UpgradeDomainDeltaNodesCheckHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.upgrade_domain_name = upgrade_domain_name + self.baseline_error_count = baseline_error_count + self.baseline_total_count = baseline_total_count + self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'UpgradeDomainDeltaNodesCheck' diff --git a/customSDK/servicefabric/models/upgrade_domain_info.py b/customSDK/servicefabric/models/upgrade_domain_info.py new file mode 100644 index 0000000..71233ce --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_domain_info.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class UpgradeDomainInfo(Model): + """Information about an upgrade domain. + + :param name: The name of the upgrade domain + :type name: str + :param state: The state of the upgrade domain. Possible values include: + 'Invalid', 'Pending', 'InProgress', 'Completed' + :type state: str or ~azure.servicefabric.models.UpgradeDomainState + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpgradeDomainInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.state = kwargs.get('state', None) diff --git a/customSDK/servicefabric/models/upgrade_domain_info_py3.py b/customSDK/servicefabric/models/upgrade_domain_info_py3.py new file mode 100644 index 0000000..9edb2cf --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_domain_info_py3.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class UpgradeDomainInfo(Model): + """Information about an upgrade domain. + + :param name: The name of the upgrade domain + :type name: str + :param state: The state of the upgrade domain. Possible values include: + 'Invalid', 'Pending', 'InProgress', 'Completed' + :type state: str or ~azure.servicefabric.models.UpgradeDomainState + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, state=None, **kwargs) -> None: + super(UpgradeDomainInfo, self).__init__(**kwargs) + self.name = name + self.state = state diff --git a/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation.py b/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation.py new file mode 100644 index 0000000..dcdfe3d --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation.py @@ -0,0 +1,70 @@ +# 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 .health_evaluation import HealthEvaluation + + +class UpgradeDomainNodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for cluster nodes in an upgrade domain, + containing health evaluations for each unhealthy node that impacted current + aggregated health state. Can be returned when evaluating cluster health + during cluster upgrade and the aggregated health state is either Error or + Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param upgrade_domain_name: Name of the upgrade domain where nodes health + is currently evaluated. + :type upgrade_domain_name: str + :param max_percent_unhealthy_nodes: Maximum allowed percentage of + unhealthy nodes from the ClusterHealthPolicy. + :type max_percent_unhealthy_nodes: int + :param total_count: Total number of nodes in the current upgrade domain. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(UpgradeDomainNodesHealthEvaluation, self).__init__(**kwargs) + self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) + self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'UpgradeDomainNodes' diff --git a/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation_py3.py b/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation_py3.py new file mode 100644 index 0000000..547ffab --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation_py3.py @@ -0,0 +1,70 @@ +# 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 .health_evaluation_py3 import HealthEvaluation + + +class UpgradeDomainNodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for cluster nodes in an upgrade domain, + containing health evaluations for each unhealthy node that impacted current + aggregated health state. Can be returned when evaluating cluster health + during cluster upgrade and the aggregated health state is either Error or + Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param upgrade_domain_name: Name of the upgrade domain where nodes health + is currently evaluated. + :type upgrade_domain_name: str + :param max_percent_unhealthy_nodes: Maximum allowed percentage of + unhealthy nodes from the ClusterHealthPolicy. + :type max_percent_unhealthy_nodes: int + :param total_count: Total number of nodes in the current upgrade domain. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, upgrade_domain_name: str=None, max_percent_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(UpgradeDomainNodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.upgrade_domain_name = upgrade_domain_name + self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'UpgradeDomainNodes' diff --git a/customSDK/servicefabric/models/upgrade_orchestration_service_state.py b/customSDK/servicefabric/models/upgrade_orchestration_service_state.py new file mode 100644 index 0000000..6118fc3 --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_orchestration_service_state.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class UpgradeOrchestrationServiceState(Model): + """Service state of Service Fabric Upgrade Orchestration Service. + + :param service_state: The state of Service Fabric Upgrade Orchestration + Service. + :type service_state: str + """ + + _attribute_map = { + 'service_state': {'key': 'ServiceState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpgradeOrchestrationServiceState, self).__init__(**kwargs) + self.service_state = kwargs.get('service_state', None) diff --git a/customSDK/servicefabric/models/upgrade_orchestration_service_state_py3.py b/customSDK/servicefabric/models/upgrade_orchestration_service_state_py3.py new file mode 100644 index 0000000..35477c1 --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_orchestration_service_state_py3.py @@ -0,0 +1,29 @@ +# 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 msrest.serialization import Model + + +class UpgradeOrchestrationServiceState(Model): + """Service state of Service Fabric Upgrade Orchestration Service. + + :param service_state: The state of Service Fabric Upgrade Orchestration + Service. + :type service_state: str + """ + + _attribute_map = { + 'service_state': {'key': 'ServiceState', 'type': 'str'}, + } + + def __init__(self, *, service_state: str=None, **kwargs) -> None: + super(UpgradeOrchestrationServiceState, self).__init__(**kwargs) + self.service_state = service_state diff --git a/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary.py b/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary.py new file mode 100644 index 0000000..0f15dd5 --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary.py @@ -0,0 +1,47 @@ +# 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 msrest.serialization import Model + + +class UpgradeOrchestrationServiceStateSummary(Model): + """Service state summary of Service Fabric Upgrade Orchestration Service. + + :param current_code_version: The current code version of the cluster. + :type current_code_version: str + :param current_manifest_version: The current manifest version of the + cluster. + :type current_manifest_version: str + :param target_code_version: The target code version of the cluster. + :type target_code_version: str + :param target_manifest_version: The target manifest version of the + cluster. + :type target_manifest_version: str + :param pending_upgrade_type: The type of the pending upgrade of the + cluster. + :type pending_upgrade_type: str + """ + + _attribute_map = { + 'current_code_version': {'key': 'CurrentCodeVersion', 'type': 'str'}, + 'current_manifest_version': {'key': 'CurrentManifestVersion', 'type': 'str'}, + 'target_code_version': {'key': 'TargetCodeVersion', 'type': 'str'}, + 'target_manifest_version': {'key': 'TargetManifestVersion', 'type': 'str'}, + 'pending_upgrade_type': {'key': 'PendingUpgradeType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpgradeOrchestrationServiceStateSummary, self).__init__(**kwargs) + self.current_code_version = kwargs.get('current_code_version', None) + self.current_manifest_version = kwargs.get('current_manifest_version', None) + self.target_code_version = kwargs.get('target_code_version', None) + self.target_manifest_version = kwargs.get('target_manifest_version', None) + self.pending_upgrade_type = kwargs.get('pending_upgrade_type', None) diff --git a/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary_py3.py b/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary_py3.py new file mode 100644 index 0000000..1a90d31 --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary_py3.py @@ -0,0 +1,47 @@ +# 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 msrest.serialization import Model + + +class UpgradeOrchestrationServiceStateSummary(Model): + """Service state summary of Service Fabric Upgrade Orchestration Service. + + :param current_code_version: The current code version of the cluster. + :type current_code_version: str + :param current_manifest_version: The current manifest version of the + cluster. + :type current_manifest_version: str + :param target_code_version: The target code version of the cluster. + :type target_code_version: str + :param target_manifest_version: The target manifest version of the + cluster. + :type target_manifest_version: str + :param pending_upgrade_type: The type of the pending upgrade of the + cluster. + :type pending_upgrade_type: str + """ + + _attribute_map = { + 'current_code_version': {'key': 'CurrentCodeVersion', 'type': 'str'}, + 'current_manifest_version': {'key': 'CurrentManifestVersion', 'type': 'str'}, + 'target_code_version': {'key': 'TargetCodeVersion', 'type': 'str'}, + 'target_manifest_version': {'key': 'TargetManifestVersion', 'type': 'str'}, + 'pending_upgrade_type': {'key': 'PendingUpgradeType', 'type': 'str'}, + } + + def __init__(self, *, current_code_version: str=None, current_manifest_version: str=None, target_code_version: str=None, target_manifest_version: str=None, pending_upgrade_type: str=None, **kwargs) -> None: + super(UpgradeOrchestrationServiceStateSummary, self).__init__(**kwargs) + self.current_code_version = current_code_version + self.current_manifest_version = current_manifest_version + self.target_code_version = target_code_version + self.target_manifest_version = target_manifest_version + self.pending_upgrade_type = pending_upgrade_type diff --git a/customSDK/servicefabric/models/upload_chunk_range.py b/customSDK/servicefabric/models/upload_chunk_range.py new file mode 100644 index 0000000..494aa8d --- /dev/null +++ b/customSDK/servicefabric/models/upload_chunk_range.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class UploadChunkRange(Model): + """Information about which portion of the file to upload. + + :param start_position: The start position of the portion of the file. It's + represented by the number of bytes. + :type start_position: str + :param end_position: The end position of the portion of the file. It's + represented by the number of bytes. + :type end_position: str + """ + + _attribute_map = { + 'start_position': {'key': 'StartPosition', 'type': 'str'}, + 'end_position': {'key': 'EndPosition', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UploadChunkRange, self).__init__(**kwargs) + self.start_position = kwargs.get('start_position', None) + self.end_position = kwargs.get('end_position', None) diff --git a/customSDK/servicefabric/models/upload_chunk_range_py3.py b/customSDK/servicefabric/models/upload_chunk_range_py3.py new file mode 100644 index 0000000..a67b302 --- /dev/null +++ b/customSDK/servicefabric/models/upload_chunk_range_py3.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class UploadChunkRange(Model): + """Information about which portion of the file to upload. + + :param start_position: The start position of the portion of the file. It's + represented by the number of bytes. + :type start_position: str + :param end_position: The end position of the portion of the file. It's + represented by the number of bytes. + :type end_position: str + """ + + _attribute_map = { + 'start_position': {'key': 'StartPosition', 'type': 'str'}, + 'end_position': {'key': 'EndPosition', 'type': 'str'}, + } + + def __init__(self, *, start_position: str=None, end_position: str=None, **kwargs) -> None: + super(UploadChunkRange, self).__init__(**kwargs) + self.start_position = start_position + self.end_position = end_position diff --git a/customSDK/servicefabric/models/upload_session.py b/customSDK/servicefabric/models/upload_session.py new file mode 100644 index 0000000..a9f2e1e --- /dev/null +++ b/customSDK/servicefabric/models/upload_session.py @@ -0,0 +1,31 @@ +# 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 msrest.serialization import Model + + +class UploadSession(Model): + """Information about a image store upload session. + + :param upload_sessions: When querying upload session by upload session ID, + the result contains only one upload session. When querying upload session + by image store relative path, the result might contain multiple upload + sessions. + :type upload_sessions: list[~azure.servicefabric.models.UploadSessionInfo] + """ + + _attribute_map = { + 'upload_sessions': {'key': 'UploadSessions', 'type': '[UploadSessionInfo]'}, + } + + def __init__(self, **kwargs): + super(UploadSession, self).__init__(**kwargs) + self.upload_sessions = kwargs.get('upload_sessions', None) diff --git a/customSDK/servicefabric/models/upload_session_info.py b/customSDK/servicefabric/models/upload_session_info.py new file mode 100644 index 0000000..eb71d20 --- /dev/null +++ b/customSDK/servicefabric/models/upload_session_info.py @@ -0,0 +1,49 @@ +# 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 msrest.serialization import Model + + +class UploadSessionInfo(Model): + """Information about an image store upload session. A session is associated + with a relative path in the image store. + + :param store_relative_path: The remote location within image store. This + path is relative to the image store root. + :type store_relative_path: str + :param session_id: A unique ID of the upload session. A session ID can be + reused only if the session was committed or removed. + :type session_id: str + :param modified_date: The date and time when the upload session was last + modified. + :type modified_date: datetime + :param file_size: The size in bytes of the uploading file. + :type file_size: str + :param expected_ranges: List of chunk ranges that image store has not + received yet. + :type expected_ranges: list[~azure.servicefabric.models.UploadChunkRange] + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'session_id': {'key': 'SessionId', 'type': 'str'}, + 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, + 'file_size': {'key': 'FileSize', 'type': 'str'}, + 'expected_ranges': {'key': 'ExpectedRanges', 'type': '[UploadChunkRange]'}, + } + + def __init__(self, **kwargs): + super(UploadSessionInfo, self).__init__(**kwargs) + self.store_relative_path = kwargs.get('store_relative_path', None) + self.session_id = kwargs.get('session_id', None) + self.modified_date = kwargs.get('modified_date', None) + self.file_size = kwargs.get('file_size', None) + self.expected_ranges = kwargs.get('expected_ranges', None) diff --git a/customSDK/servicefabric/models/upload_session_info_py3.py b/customSDK/servicefabric/models/upload_session_info_py3.py new file mode 100644 index 0000000..342df6e --- /dev/null +++ b/customSDK/servicefabric/models/upload_session_info_py3.py @@ -0,0 +1,49 @@ +# 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 msrest.serialization import Model + + +class UploadSessionInfo(Model): + """Information about an image store upload session. A session is associated + with a relative path in the image store. + + :param store_relative_path: The remote location within image store. This + path is relative to the image store root. + :type store_relative_path: str + :param session_id: A unique ID of the upload session. A session ID can be + reused only if the session was committed or removed. + :type session_id: str + :param modified_date: The date and time when the upload session was last + modified. + :type modified_date: datetime + :param file_size: The size in bytes of the uploading file. + :type file_size: str + :param expected_ranges: List of chunk ranges that image store has not + received yet. + :type expected_ranges: list[~azure.servicefabric.models.UploadChunkRange] + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'session_id': {'key': 'SessionId', 'type': 'str'}, + 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, + 'file_size': {'key': 'FileSize', 'type': 'str'}, + 'expected_ranges': {'key': 'ExpectedRanges', 'type': '[UploadChunkRange]'}, + } + + def __init__(self, *, store_relative_path: str=None, session_id: str=None, modified_date=None, file_size: str=None, expected_ranges=None, **kwargs) -> None: + super(UploadSessionInfo, self).__init__(**kwargs) + self.store_relative_path = store_relative_path + self.session_id = session_id + self.modified_date = modified_date + self.file_size = file_size + self.expected_ranges = expected_ranges diff --git a/customSDK/servicefabric/models/upload_session_py3.py b/customSDK/servicefabric/models/upload_session_py3.py new file mode 100644 index 0000000..34394b8 --- /dev/null +++ b/customSDK/servicefabric/models/upload_session_py3.py @@ -0,0 +1,31 @@ +# 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 msrest.serialization import Model + + +class UploadSession(Model): + """Information about a image store upload session. + + :param upload_sessions: When querying upload session by upload session ID, + the result contains only one upload session. When querying upload session + by image store relative path, the result might contain multiple upload + sessions. + :type upload_sessions: list[~azure.servicefabric.models.UploadSessionInfo] + """ + + _attribute_map = { + 'upload_sessions': {'key': 'UploadSessions', 'type': '[UploadSessionInfo]'}, + } + + def __init__(self, *, upload_sessions=None, **kwargs) -> None: + super(UploadSession, self).__init__(**kwargs) + self.upload_sessions = upload_sessions diff --git a/customSDK/servicefabric/models/usage_info.py b/customSDK/servicefabric/models/usage_info.py new file mode 100644 index 0000000..28f9c84 --- /dev/null +++ b/customSDK/servicefabric/models/usage_info.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class UsageInfo(Model): + """Information about how much space and how many files in the file system the + ImageStore is using in this category. + + :param used_space: the size of all files in this category + :type used_space: str + :param file_count: the number of all files in this category + :type file_count: str + """ + + _attribute_map = { + 'used_space': {'key': 'UsedSpace', 'type': 'str'}, + 'file_count': {'key': 'FileCount', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageInfo, self).__init__(**kwargs) + self.used_space = kwargs.get('used_space', None) + self.file_count = kwargs.get('file_count', None) diff --git a/customSDK/servicefabric/models/usage_info_py3.py b/customSDK/servicefabric/models/usage_info_py3.py new file mode 100644 index 0000000..2a28cbc --- /dev/null +++ b/customSDK/servicefabric/models/usage_info_py3.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class UsageInfo(Model): + """Information about how much space and how many files in the file system the + ImageStore is using in this category. + + :param used_space: the size of all files in this category + :type used_space: str + :param file_count: the number of all files in this category + :type file_count: str + """ + + _attribute_map = { + 'used_space': {'key': 'UsedSpace', 'type': 'str'}, + 'file_count': {'key': 'FileCount', 'type': 'str'}, + } + + def __init__(self, *, used_space: str=None, file_count: str=None, **kwargs) -> None: + super(UsageInfo, self).__init__(**kwargs) + self.used_space = used_space + self.file_count = file_count diff --git a/customSDK/servicefabric/models/validation_failed_chaos_event.py b/customSDK/servicefabric/models/validation_failed_chaos_event.py new file mode 100644 index 0000000..c394439 --- /dev/null +++ b/customSDK/servicefabric/models/validation_failed_chaos_event.py @@ -0,0 +1,46 @@ +# 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 .chaos_event import ChaosEvent + + +class ValidationFailedChaosEvent(ChaosEvent): + """Chaos event corresponding to a failure during validation. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Describes why the ValidationFailedChaosEvent was generated. + This may happen because more than MaxPercentUnhealthyNodes are unhealthy + for more than MaxClusterStabilizationTimeout. This reason will be in the + Reason property of the ValidationFailedChaosEvent as a string. + :type reason: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ValidationFailedChaosEvent, self).__init__(**kwargs) + self.reason = kwargs.get('reason', None) + self.kind = 'ValidationFailed' diff --git a/customSDK/servicefabric/models/validation_failed_chaos_event_py3.py b/customSDK/servicefabric/models/validation_failed_chaos_event_py3.py new file mode 100644 index 0000000..5d983a0 --- /dev/null +++ b/customSDK/servicefabric/models/validation_failed_chaos_event_py3.py @@ -0,0 +1,46 @@ +# 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 .chaos_event_py3 import ChaosEvent + + +class ValidationFailedChaosEvent(ChaosEvent): + """Chaos event corresponding to a failure during validation. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Describes why the ValidationFailedChaosEvent was generated. + This may happen because more than MaxPercentUnhealthyNodes are unhealthy + for more than MaxClusterStabilizationTimeout. This reason will be in the + Reason property of the ValidationFailedChaosEvent as a string. + :type reason: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: + super(ValidationFailedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.reason = reason + self.kind = 'ValidationFailed' diff --git a/customSDK/servicefabric/models/volume_provider_parameters_azure_file.py b/customSDK/servicefabric/models/volume_provider_parameters_azure_file.py new file mode 100644 index 0000000..c10943e --- /dev/null +++ b/customSDK/servicefabric/models/volume_provider_parameters_azure_file.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class VolumeProviderParametersAzureFile(Model): + """This type describes a volume provided by an Azure Files file share. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. Name of the Azure storage account for the + File Share. + :type account_name: str + :param account_key: Access key of the Azure storage account for the File + Share. + :type account_key: str + :param share_name: Required. Name of the Azure Files file share that + provides storage for the volume. + :type share_name: str + """ + + _validation = { + 'account_name': {'required': True}, + 'share_name': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'share_name': {'key': 'shareName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VolumeProviderParametersAzureFile, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + self.account_key = kwargs.get('account_key', None) + self.share_name = kwargs.get('share_name', None) diff --git a/customSDK/servicefabric/models/volume_provider_parameters_azure_file_py3.py b/customSDK/servicefabric/models/volume_provider_parameters_azure_file_py3.py new file mode 100644 index 0000000..c8fea05 --- /dev/null +++ b/customSDK/servicefabric/models/volume_provider_parameters_azure_file_py3.py @@ -0,0 +1,46 @@ +# 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 msrest.serialization import Model + + +class VolumeProviderParametersAzureFile(Model): + """This type describes a volume provided by an Azure Files file share. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. Name of the Azure storage account for the + File Share. + :type account_name: str + :param account_key: Access key of the Azure storage account for the File + Share. + :type account_key: str + :param share_name: Required. Name of the Azure Files file share that + provides storage for the volume. + :type share_name: str + """ + + _validation = { + 'account_name': {'required': True}, + 'share_name': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'share_name': {'key': 'shareName', 'type': 'str'}, + } + + def __init__(self, *, account_name: str, share_name: str, account_key: str=None, **kwargs) -> None: + super(VolumeProviderParametersAzureFile, self).__init__(**kwargs) + self.account_name = account_name + self.account_key = account_key + self.share_name = share_name diff --git a/customSDK/servicefabric/models/volume_reference.py b/customSDK/servicefabric/models/volume_reference.py new file mode 100644 index 0000000..5896c0e --- /dev/null +++ b/customSDK/servicefabric/models/volume_reference.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class VolumeReference(Model): + """Describes a reference to a volume resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the volume being referenced. + :type name: str + :param read_only: The flag indicating whether the volume is read only. + Default is 'false'. + :type read_only: bool + :param destination_path: Required. The path within the container at which + the volume should be mounted. Only valid path characters are allowed. + :type destination_path: str + """ + + _validation = { + 'name': {'required': True}, + 'destination_path': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'destination_path': {'key': 'destinationPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VolumeReference, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.read_only = kwargs.get('read_only', None) + self.destination_path = kwargs.get('destination_path', None) diff --git a/customSDK/servicefabric/models/volume_reference_py3.py b/customSDK/servicefabric/models/volume_reference_py3.py new file mode 100644 index 0000000..78adefa --- /dev/null +++ b/customSDK/servicefabric/models/volume_reference_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class VolumeReference(Model): + """Describes a reference to a volume resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the volume being referenced. + :type name: str + :param read_only: The flag indicating whether the volume is read only. + Default is 'false'. + :type read_only: bool + :param destination_path: Required. The path within the container at which + the volume should be mounted. Only valid path characters are allowed. + :type destination_path: str + """ + + _validation = { + 'name': {'required': True}, + 'destination_path': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'destination_path': {'key': 'destinationPath', 'type': 'str'}, + } + + def __init__(self, *, name: str, destination_path: str, read_only: bool=None, **kwargs) -> None: + super(VolumeReference, self).__init__(**kwargs) + self.name = name + self.read_only = read_only + self.destination_path = destination_path diff --git a/customSDK/servicefabric/models/volume_resource_description.py b/customSDK/servicefabric/models/volume_resource_description.py new file mode 100644 index 0000000..6d7b418 --- /dev/null +++ b/customSDK/servicefabric/models/volume_resource_description.py @@ -0,0 +1,66 @@ +# 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 msrest.serialization import Model + + +class VolumeResourceDescription(Model): + """This type describes a volume resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Volume resource. + :type name: str + :param description: User readable description of the volume. + :type description: str + :ivar status: Status of the volume. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the volume. + :vartype status_details: str + :ivar provider: Required. Provider of the volume. Default value: + "SFAzureFile" . + :vartype provider: str + :param azure_file_parameters: This type describes a volume provided by an + Azure Files file share. + :type azure_file_parameters: + ~azure.servicefabric.models.VolumeProviderParametersAzureFile + """ + + _validation = { + 'name': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'provider': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, + } + + provider = "SFAzureFile" + + def __init__(self, **kwargs): + super(VolumeResourceDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.status = None + self.status_details = None + self.azure_file_parameters = kwargs.get('azure_file_parameters', None) diff --git a/customSDK/servicefabric/models/volume_resource_description_py3.py b/customSDK/servicefabric/models/volume_resource_description_py3.py new file mode 100644 index 0000000..bc27555 --- /dev/null +++ b/customSDK/servicefabric/models/volume_resource_description_py3.py @@ -0,0 +1,66 @@ +# 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 msrest.serialization import Model + + +class VolumeResourceDescription(Model): + """This type describes a volume resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Volume resource. + :type name: str + :param description: User readable description of the volume. + :type description: str + :ivar status: Status of the volume. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the volume. + :vartype status_details: str + :ivar provider: Required. Provider of the volume. Default value: + "SFAzureFile" . + :vartype provider: str + :param azure_file_parameters: This type describes a volume provided by an + Azure Files file share. + :type azure_file_parameters: + ~azure.servicefabric.models.VolumeProviderParametersAzureFile + """ + + _validation = { + 'name': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'provider': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, + } + + provider = "SFAzureFile" + + def __init__(self, *, name: str, description: str=None, azure_file_parameters=None, **kwargs) -> None: + super(VolumeResourceDescription, self).__init__(**kwargs) + self.name = name + self.description = description + self.status = None + self.status_details = None + self.azure_file_parameters = azure_file_parameters diff --git a/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check.py b/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check.py new file mode 100644 index 0000000..a9e3c65 --- /dev/null +++ b/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check.py @@ -0,0 +1,41 @@ +# 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 .partition_safety_check import PartitionSafetyCheck + + +class WaitForInbuildReplicaSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the replica build operation to finish. This + indicates that there is a replica that is going through the copy or is + providing data for building another replica. Bring the node down will abort + this copy operation which are typically expensive involving data movements. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WaitForInbuildReplicaSafetyCheck, self).__init__(**kwargs) + self.kind = 'WaitForInbuildReplica' diff --git a/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check_py3.py b/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check_py3.py new file mode 100644 index 0000000..2880f6b --- /dev/null +++ b/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check_py3.py @@ -0,0 +1,41 @@ +# 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 .partition_safety_check_py3 import PartitionSafetyCheck + + +class WaitForInbuildReplicaSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the replica build operation to finish. This + indicates that there is a replica that is going through the copy or is + providing data for building another replica. Bring the node down will abort + this copy operation which are typically expensive involving data movements. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, partition_id: str=None, **kwargs) -> None: + super(WaitForInbuildReplicaSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'WaitForInbuildReplica' diff --git a/customSDK/servicefabric/models/wait_for_primary_placement_safety_check.py b/customSDK/servicefabric/models/wait_for_primary_placement_safety_check.py new file mode 100644 index 0000000..22974a0 --- /dev/null +++ b/customSDK/servicefabric/models/wait_for_primary_placement_safety_check.py @@ -0,0 +1,39 @@ +# 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 .partition_safety_check import PartitionSafetyCheck + + +class WaitForPrimaryPlacementSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the primary replica that was moved out of the + node due to upgrade to be placed back again on that node. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WaitForPrimaryPlacementSafetyCheck, self).__init__(**kwargs) + self.kind = 'WaitForPrimaryPlacement' diff --git a/customSDK/servicefabric/models/wait_for_primary_placement_safety_check_py3.py b/customSDK/servicefabric/models/wait_for_primary_placement_safety_check_py3.py new file mode 100644 index 0000000..ff14b6a --- /dev/null +++ b/customSDK/servicefabric/models/wait_for_primary_placement_safety_check_py3.py @@ -0,0 +1,39 @@ +# 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 .partition_safety_check_py3 import PartitionSafetyCheck + + +class WaitForPrimaryPlacementSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the primary replica that was moved out of the + node due to upgrade to be placed back again on that node. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, partition_id: str=None, **kwargs) -> None: + super(WaitForPrimaryPlacementSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'WaitForPrimaryPlacement' diff --git a/customSDK/servicefabric/models/wait_for_primary_swap_safety_check.py b/customSDK/servicefabric/models/wait_for_primary_swap_safety_check.py new file mode 100644 index 0000000..9619071 --- /dev/null +++ b/customSDK/servicefabric/models/wait_for_primary_swap_safety_check.py @@ -0,0 +1,40 @@ +# 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 .partition_safety_check import PartitionSafetyCheck + + +class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the primary replica to be moved out of the node + before starting an upgrade to ensure the availability of the primary + replica for the partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WaitForPrimarySwapSafetyCheck, self).__init__(**kwargs) + self.kind = 'WaitForPrimarySwap' diff --git a/customSDK/servicefabric/models/wait_for_primary_swap_safety_check_py3.py b/customSDK/servicefabric/models/wait_for_primary_swap_safety_check_py3.py new file mode 100644 index 0000000..bc895a2 --- /dev/null +++ b/customSDK/servicefabric/models/wait_for_primary_swap_safety_check_py3.py @@ -0,0 +1,40 @@ +# 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 .partition_safety_check_py3 import PartitionSafetyCheck + + +class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the primary replica to be moved out of the node + before starting an upgrade to ensure the availability of the primary + replica for the partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, partition_id: str=None, **kwargs) -> None: + super(WaitForPrimarySwapSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'WaitForPrimarySwap' diff --git a/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check.py b/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check.py new file mode 100644 index 0000000..78a6d6d --- /dev/null +++ b/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check.py @@ -0,0 +1,39 @@ +# 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 .partition_safety_check import PartitionSafetyCheck + + +class WaitForReconfigurationSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the current reconfiguration of the partition to + be completed before starting an upgrade. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WaitForReconfigurationSafetyCheck, self).__init__(**kwargs) + self.kind = 'WaitForReconfiguration' diff --git a/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check_py3.py b/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check_py3.py new file mode 100644 index 0000000..e3900df --- /dev/null +++ b/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check_py3.py @@ -0,0 +1,39 @@ +# 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 .partition_safety_check_py3 import PartitionSafetyCheck + + +class WaitForReconfigurationSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the current reconfiguration of the partition to + be completed before starting an upgrade. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, partition_id: str=None, **kwargs) -> None: + super(WaitForReconfigurationSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'WaitForReconfiguration' diff --git a/customSDK/servicefabric/models/waiting_chaos_event.py b/customSDK/servicefabric/models/waiting_chaos_event.py new file mode 100644 index 0000000..75ddfc5 --- /dev/null +++ b/customSDK/servicefabric/models/waiting_chaos_event.py @@ -0,0 +1,46 @@ +# 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 .chaos_event import ChaosEvent + + +class WaitingChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos is waiting for the + cluster to become ready for faulting, for example, Chaos may be waiting for + the on-going upgrade to finish. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Describes why the WaitingChaosEvent was generated, for + example, due to a cluster upgrade. + :type reason: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WaitingChaosEvent, self).__init__(**kwargs) + self.reason = kwargs.get('reason', None) + self.kind = 'Waiting' diff --git a/customSDK/servicefabric/models/waiting_chaos_event_py3.py b/customSDK/servicefabric/models/waiting_chaos_event_py3.py new file mode 100644 index 0000000..b36fdf6 --- /dev/null +++ b/customSDK/servicefabric/models/waiting_chaos_event_py3.py @@ -0,0 +1,46 @@ +# 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 .chaos_event_py3 import ChaosEvent + + +class WaitingChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos is waiting for the + cluster to become ready for faulting, for example, Chaos may be waiting for + the on-going upgrade to finish. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Describes why the WaitingChaosEvent was generated, for + example, due to a cluster upgrade. + :type reason: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: + super(WaitingChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.reason = reason + self.kind = 'Waiting' diff --git a/customSDK/servicefabric/operations/__init__.py b/customSDK/servicefabric/operations/__init__.py index 2d275dc..0bef1cb 100644 --- a/customSDK/servicefabric/operations/__init__.py +++ b/customSDK/servicefabric/operations/__init__.py @@ -9,16 +9,15 @@ # regenerated. # -------------------------------------------------------------------------- -from ._mesh_secret_operations import MeshSecretOperations -from ._mesh_secret_value_operations import MeshSecretValueOperations -from ._mesh_volume_operations import MeshVolumeOperations -from ._mesh_network_operations import MeshNetworkOperations -from ._mesh_application_operations import MeshApplicationOperations -from ._mesh_service_operations import MeshServiceOperations -from ._mesh_code_package_operations import MeshCodePackageOperations -from ._mesh_service_replica_operations import MeshServiceReplicaOperations -from ._mesh_gateway_operations import MeshGatewayOperations -from ._service_fabric_client_ap_is_operations import ServiceFabricClientAPIsOperationsMixin +from .mesh_secret_operations import MeshSecretOperations +from .mesh_secret_value_operations import MeshSecretValueOperations +from .mesh_volume_operations import MeshVolumeOperations +from .mesh_network_operations import MeshNetworkOperations +from .mesh_application_operations import MeshApplicationOperations +from .mesh_service_operations import MeshServiceOperations +from .mesh_code_package_operations import MeshCodePackageOperations +from .mesh_service_replica_operations import MeshServiceReplicaOperations +from .mesh_gateway_operations import MeshGatewayOperations __all__ = [ 'MeshSecretOperations', @@ -30,5 +29,4 @@ __all__ = [ 'MeshCodePackageOperations', 'MeshServiceReplicaOperations', 'MeshGatewayOperations', - 'ServiceFabricClientAPIsOperationsMixin', ] diff --git a/customSDK/servicefabric/operations/_mesh_application_operations.py b/customSDK/servicefabric/operations/mesh_application_operations.py similarity index 99% rename from customSDK/servicefabric/operations/_mesh_application_operations.py rename to customSDK/servicefabric/operations/mesh_application_operations.py index 44177f7..a9d3763 100644 --- a/customSDK/servicefabric/operations/_mesh_application_operations.py +++ b/customSDK/servicefabric/operations/mesh_application_operations.py @@ -18,8 +18,6 @@ from .. import models class MeshApplicationOperations(object): """MeshApplicationOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -97,6 +95,7 @@ class MeshApplicationOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ApplicationResourceDescription', response) if response.status_code == 201: @@ -162,6 +161,7 @@ class MeshApplicationOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ApplicationResourceDescription', response) @@ -272,6 +272,7 @@ class MeshApplicationOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedApplicationResourceDescriptionList', response) @@ -337,6 +338,7 @@ class MeshApplicationOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ApplicationResourceUpgradeProgressInfo', response) diff --git a/customSDK/servicefabric/operations/_mesh_code_package_operations.py b/customSDK/servicefabric/operations/mesh_code_package_operations.py similarity index 97% rename from customSDK/servicefabric/operations/_mesh_code_package_operations.py rename to customSDK/servicefabric/operations/mesh_code_package_operations.py index 50edd0f..a1d4afa 100644 --- a/customSDK/servicefabric/operations/_mesh_code_package_operations.py +++ b/customSDK/servicefabric/operations/mesh_code_package_operations.py @@ -18,8 +18,6 @@ from .. import models class MeshCodePackageOperations(object): """MeshCodePackageOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -101,6 +99,7 @@ class MeshCodePackageOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ContainerLogs', response) diff --git a/customSDK/servicefabric/operations/_mesh_gateway_operations.py b/customSDK/servicefabric/operations/mesh_gateway_operations.py similarity index 98% rename from customSDK/servicefabric/operations/_mesh_gateway_operations.py rename to customSDK/servicefabric/operations/mesh_gateway_operations.py index 6871211..a9c2c8b 100644 --- a/customSDK/servicefabric/operations/_mesh_gateway_operations.py +++ b/customSDK/servicefabric/operations/mesh_gateway_operations.py @@ -18,8 +18,6 @@ from .. import models class MeshGatewayOperations(object): """MeshGatewayOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -97,6 +95,7 @@ class MeshGatewayOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('GatewayResourceDescription', response) if response.status_code == 201: @@ -159,6 +158,7 @@ class MeshGatewayOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('GatewayResourceDescription', response) @@ -265,6 +265,7 @@ class MeshGatewayOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedGatewayResourceDescriptionList', response) diff --git a/customSDK/servicefabric/operations/_mesh_network_operations.py b/customSDK/servicefabric/operations/mesh_network_operations.py similarity index 98% rename from customSDK/servicefabric/operations/_mesh_network_operations.py rename to customSDK/servicefabric/operations/mesh_network_operations.py index ebdcc1d..1ff8a55 100644 --- a/customSDK/servicefabric/operations/_mesh_network_operations.py +++ b/customSDK/servicefabric/operations/mesh_network_operations.py @@ -18,8 +18,6 @@ from .. import models class MeshNetworkOperations(object): """MeshNetworkOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -100,6 +98,7 @@ class MeshNetworkOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('NetworkResourceDescription', response) if response.status_code == 201: @@ -162,6 +161,7 @@ class MeshNetworkOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('NetworkResourceDescription', response) @@ -268,6 +268,7 @@ class MeshNetworkOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedNetworkResourceDescriptionList', response) diff --git a/customSDK/servicefabric/operations/_mesh_secret_operations.py b/customSDK/servicefabric/operations/mesh_secret_operations.py similarity index 98% rename from customSDK/servicefabric/operations/_mesh_secret_operations.py rename to customSDK/servicefabric/operations/mesh_secret_operations.py index 68be7ff..bf15d6c 100644 --- a/customSDK/servicefabric/operations/_mesh_secret_operations.py +++ b/customSDK/servicefabric/operations/mesh_secret_operations.py @@ -18,8 +18,6 @@ from .. import models class MeshSecretOperations(object): """MeshSecretOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -99,6 +97,7 @@ class MeshSecretOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('SecretResourceDescription', response) if response.status_code == 201: @@ -160,6 +159,7 @@ class MeshSecretOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('SecretResourceDescription', response) @@ -265,6 +265,7 @@ class MeshSecretOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedSecretResourceDescriptionList', response) diff --git a/customSDK/servicefabric/operations/_mesh_secret_value_operations.py b/customSDK/servicefabric/operations/mesh_secret_value_operations.py similarity index 99% rename from customSDK/servicefabric/operations/_mesh_secret_value_operations.py rename to customSDK/servicefabric/operations/mesh_secret_value_operations.py index 34acd2c..9c4fba4 100644 --- a/customSDK/servicefabric/operations/_mesh_secret_value_operations.py +++ b/customSDK/servicefabric/operations/mesh_secret_value_operations.py @@ -18,8 +18,6 @@ from .. import models class MeshSecretValueOperations(object): """MeshSecretValueOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -104,6 +102,7 @@ class MeshSecretValueOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('SecretValueResourceDescription', response) if response.status_code == 201: @@ -170,6 +169,7 @@ class MeshSecretValueOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('SecretValueResourceDescription', response) @@ -288,6 +288,7 @@ class MeshSecretValueOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedSecretValueResourceDescriptionList', response) @@ -351,6 +352,7 @@ class MeshSecretValueOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('SecretValue', response) diff --git a/customSDK/servicefabric/operations/_mesh_service_operations.py b/customSDK/servicefabric/operations/mesh_service_operations.py similarity index 98% rename from customSDK/servicefabric/operations/_mesh_service_operations.py rename to customSDK/servicefabric/operations/mesh_service_operations.py index 1449f14..04a179f 100644 --- a/customSDK/servicefabric/operations/_mesh_service_operations.py +++ b/customSDK/servicefabric/operations/mesh_service_operations.py @@ -18,8 +18,6 @@ from .. import models class MeshServiceOperations(object): """MeshServiceOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -91,6 +89,7 @@ class MeshServiceOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ServiceResourceDescription', response) @@ -153,6 +152,7 @@ class MeshServiceOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedServiceResourceDescriptionList', response) diff --git a/customSDK/servicefabric/operations/_mesh_service_replica_operations.py b/customSDK/servicefabric/operations/mesh_service_replica_operations.py similarity index 98% rename from customSDK/servicefabric/operations/_mesh_service_replica_operations.py rename to customSDK/servicefabric/operations/mesh_service_replica_operations.py index 49474b3..19bea15 100644 --- a/customSDK/servicefabric/operations/_mesh_service_replica_operations.py +++ b/customSDK/servicefabric/operations/mesh_service_replica_operations.py @@ -18,8 +18,6 @@ from .. import models class MeshServiceReplicaOperations(object): """MeshServiceReplicaOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -94,6 +92,7 @@ class MeshServiceReplicaOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ServiceReplicaDescription', response) @@ -157,6 +156,7 @@ class MeshServiceReplicaOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedServiceReplicaDescriptionList', response) diff --git a/customSDK/servicefabric/operations/_mesh_volume_operations.py b/customSDK/servicefabric/operations/mesh_volume_operations.py similarity index 98% rename from customSDK/servicefabric/operations/_mesh_volume_operations.py rename to customSDK/servicefabric/operations/mesh_volume_operations.py index 3c2a3c8..f637bac 100644 --- a/customSDK/servicefabric/operations/_mesh_volume_operations.py +++ b/customSDK/servicefabric/operations/mesh_volume_operations.py @@ -18,8 +18,6 @@ from .. import models class MeshVolumeOperations(object): """MeshVolumeOperations operations. - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -96,6 +94,7 @@ class MeshVolumeOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('VolumeResourceDescription', response) if response.status_code == 201: @@ -157,6 +156,7 @@ class MeshVolumeOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('VolumeResourceDescription', response) @@ -262,6 +262,7 @@ class MeshVolumeOperations(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedVolumeResourceDescriptionList', response) diff --git a/customSDK/servicefabric/operations/_service_fabric_client_ap_is_operations.py b/customSDK/servicefabric/service_fabric_client_ap_is.py similarity index 99% rename from customSDK/servicefabric/operations/_service_fabric_client_ap_is_operations.py rename to customSDK/servicefabric/service_fabric_client_ap_is.py index f2fea93..04d2525 100644 --- a/customSDK/servicefabric/operations/_service_fabric_client_ap_is_operations.py +++ b/customSDK/servicefabric/service_fabric_client_ap_is.py @@ -9,12 +9,111 @@ # regenerated. # -------------------------------------------------------------------------- +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION from msrest.pipeline import ClientRawResponse -from .. import models import uuid +from .operations.mesh_secret_operations import MeshSecretOperations +from .operations.mesh_secret_value_operations import MeshSecretValueOperations +from .operations.mesh_volume_operations import MeshVolumeOperations +from .operations.mesh_network_operations import MeshNetworkOperations +from .operations.mesh_application_operations import MeshApplicationOperations +from .operations.mesh_service_operations import MeshServiceOperations +from .operations.mesh_code_package_operations import MeshCodePackageOperations +from .operations.mesh_service_replica_operations import MeshServiceReplicaOperations +from .operations.mesh_gateway_operations import MeshGatewayOperations +from . import models -class ServiceFabricClientAPIsOperationsMixin(object): +class ServiceFabricClientAPIsConfiguration(AzureConfiguration): + """Configuration for ServiceFabricClientAPIs + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if not base_url: + base_url = 'http://localhost:19080' + + super(ServiceFabricClientAPIsConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-servicefabric/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + + +class ServiceFabricClientAPIs(SDKClient): + """Service Fabric REST Client APIs allows management of Service Fabric clusters, applications and services. + + :ivar config: Configuration for client. + :vartype config: ServiceFabricClientAPIsConfiguration + + :ivar mesh_secret: MeshSecret operations + :vartype mesh_secret: azure.servicefabric.operations.MeshSecretOperations + :ivar mesh_secret_value: MeshSecretValue operations + :vartype mesh_secret_value: azure.servicefabric.operations.MeshSecretValueOperations + :ivar mesh_volume: MeshVolume operations + :vartype mesh_volume: azure.servicefabric.operations.MeshVolumeOperations + :ivar mesh_network: MeshNetwork operations + :vartype mesh_network: azure.servicefabric.operations.MeshNetworkOperations + :ivar mesh_application: MeshApplication operations + :vartype mesh_application: azure.servicefabric.operations.MeshApplicationOperations + :ivar mesh_service: MeshService operations + :vartype mesh_service: azure.servicefabric.operations.MeshServiceOperations + :ivar mesh_code_package: MeshCodePackage operations + :vartype mesh_code_package: azure.servicefabric.operations.MeshCodePackageOperations + :ivar mesh_service_replica: MeshServiceReplica operations + :vartype mesh_service_replica: azure.servicefabric.operations.MeshServiceReplicaOperations + :ivar mesh_gateway: MeshGateway operations + :vartype mesh_gateway: azure.servicefabric.operations.MeshGatewayOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + self.config = ServiceFabricClientAPIsConfiguration(credentials, base_url) + super(ServiceFabricClientAPIs, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '8.0.0.46' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.mesh_secret = MeshSecretOperations( + self._client, self.config, self._serialize, self._deserialize) + self.mesh_secret_value = MeshSecretValueOperations( + self._client, self.config, self._serialize, self._deserialize) + self.mesh_volume = MeshVolumeOperations( + self._client, self.config, self._serialize, self._deserialize) + self.mesh_network = MeshNetworkOperations( + self._client, self.config, self._serialize, self._deserialize) + self.mesh_application = MeshApplicationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.mesh_service = MeshServiceOperations( + self._client, self.config, self._serialize, self._deserialize) + self.mesh_code_package = MeshCodePackageOperations( + self._client, self.config, self._serialize, self._deserialize) + self.mesh_service_replica = MeshServiceReplicaOperations( + self._client, self.config, self._serialize, self._deserialize) + self.mesh_gateway = MeshGatewayOperations( + self._client, self.config, self._serialize, self._deserialize) def get_cluster_manifest( self, timeout=60, custom_headers=None, raw=False, **operation_config): @@ -78,6 +177,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ClusterManifest', response) @@ -246,6 +346,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ClusterHealth', response) @@ -442,6 +543,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ClusterHealth', response) @@ -508,6 +610,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ClusterHealthChunk', response) @@ -611,6 +714,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ClusterHealthChunk', response) @@ -774,6 +878,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[FabricCodeVersionInfo]', response) @@ -842,6 +947,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[FabricConfigVersionInfo]', response) @@ -905,6 +1011,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ClusterUpgradeProgressObject', response) @@ -972,6 +1079,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ClusterConfiguration', response) @@ -1037,6 +1145,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ClusterConfigurationUpgradeStatusInfo', response) @@ -1100,6 +1209,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('UpgradeOrchestrationServiceState', response) @@ -1174,6 +1284,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('UpgradeOrchestrationServiceStateSummary', response) @@ -1675,6 +1786,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('AadMetadataObject', response) @@ -1737,6 +1849,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ClusterVersion', response) @@ -1799,6 +1912,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ClusterLoadInfo', response) @@ -1949,6 +2063,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedNodeInfoList', response) @@ -2018,6 +2133,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('NodeInfo', response) @@ -2114,6 +2230,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('NodeHealth', response) @@ -2226,6 +2343,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('NodeHealth', response) @@ -2395,6 +2513,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('NodeLoadInfo', response) @@ -2818,6 +2937,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[ConfigParameterOverride]', response) @@ -3119,6 +3239,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedApplicationTypeInfoList', response) @@ -3231,6 +3352,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedApplicationTypeInfoList', response) @@ -3454,6 +3576,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[ServiceTypeInfo]', response) @@ -3533,6 +3656,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ServiceTypeInfo', response) @@ -3608,6 +3732,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ServiceTypeManifest', response) @@ -3697,6 +3822,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[DeployedServiceTypeInfo]', response) @@ -3791,6 +3917,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[DeployedServiceTypeInfo]', response) @@ -4012,6 +4139,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ApplicationLoadInfo', response) @@ -4127,6 +4255,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedApplicationInfoList', response) @@ -4210,6 +4339,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ApplicationInfo', response) @@ -4376,6 +4506,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ApplicationHealth', response) @@ -4558,6 +4689,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ApplicationHealth', response) @@ -4824,6 +4956,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ApplicationUpgradeProgressInfo', response) @@ -5154,6 +5287,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedDeployedApplicationInfoList', response) @@ -5246,6 +5380,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('DeployedApplicationInfo', response) @@ -5393,6 +5528,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('DeployedApplicationHealth', response) @@ -5558,6 +5694,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('DeployedApplicationHealth', response) @@ -5740,6 +5877,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ApplicationTypeManifest', response) @@ -5831,6 +5969,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedServiceInfoList', response) @@ -5916,6 +6055,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ServiceInfo', response) @@ -5991,6 +6131,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ApplicationNameInfo', response) @@ -6383,6 +6524,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ServiceDescription', response) @@ -6524,6 +6666,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ServiceHealth', response) @@ -6684,6 +6827,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ServiceHealth', response) @@ -6897,6 +7041,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ResolvedServicePartition', response) @@ -6986,6 +7131,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('UnplacedReplicaInformation', response) @@ -7076,6 +7222,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('LoadedPartitionInformationResultList', response) @@ -7162,6 +7309,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedServicePartitionInfoList', response) @@ -7232,6 +7380,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ServicePartitionInfo', response) @@ -7300,6 +7449,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ServiceNameInfo', response) @@ -7432,6 +7582,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PartitionHealth', response) @@ -7586,6 +7737,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PartitionHealth', response) @@ -7758,6 +7910,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PartitionLoadInformation', response) @@ -8314,6 +8467,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedUpdatePartitionLoadResultList', response) @@ -8482,6 +8636,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('RepairTaskUpdateInfo', response) @@ -8545,6 +8700,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('RepairTaskUpdateInfo', response) @@ -8681,6 +8837,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[RepairTask]', response) @@ -8749,6 +8906,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('RepairTaskUpdateInfo', response) @@ -8812,6 +8970,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('RepairTaskUpdateInfo', response) @@ -8874,6 +9033,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('RepairTaskUpdateInfo', response) @@ -8954,6 +9114,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedReplicaInfoList', response) @@ -9025,6 +9186,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ReplicaInfo', response) @@ -9124,6 +9286,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ReplicaHealth', response) @@ -9241,6 +9404,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ReplicaHealth', response) @@ -9442,6 +9606,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[DeployedServiceReplicaInfo]', response) @@ -9519,6 +9684,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('DeployedServiceReplicaDetailInfo', response) @@ -9593,6 +9759,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('DeployedServiceReplicaDetailInfo', response) @@ -9820,6 +9987,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[DeployedServicePackageInfo]', response) @@ -9904,6 +10072,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[DeployedServicePackageInfo]', response) @@ -10015,6 +10184,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('DeployedServicePackageHealth', response) @@ -10144,6 +10314,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('DeployedServicePackageHealth', response) @@ -10420,6 +10591,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[DeployedCodePackageInfo]', response) @@ -10597,6 +10769,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ContainerLogs', response) @@ -10696,6 +10869,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ContainerApiResponse', response) @@ -10831,6 +11005,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ComposeDeploymentStatusInfo', response) @@ -10920,6 +11095,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedComposeDeploymentStatusInfoList', response) @@ -10991,6 +11167,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ComposeDeploymentUpgradeProgressInfo', response) @@ -11241,6 +11418,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('Chaos', response) @@ -11472,6 +11650,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ChaosEventsSegment', response) @@ -11534,6 +11713,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ChaosScheduleDescription', response) @@ -11744,6 +11924,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ImageStoreContent', response) @@ -11868,6 +12049,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ImageStoreContent', response) @@ -12117,6 +12299,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('UploadSession', response) @@ -12187,6 +12370,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('UploadSession', response) @@ -12332,6 +12516,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('FolderSizeInfo', response) @@ -12402,6 +12587,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('FolderSizeInfo', response) @@ -12465,6 +12651,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('ImageStoreInfo', response) @@ -12546,6 +12733,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('str', response) @@ -12626,6 +12814,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('str', response) @@ -12802,6 +12991,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PartitionDataLossProgress', response) @@ -12973,6 +13163,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PartitionQuorumLossProgress', response) @@ -13138,6 +13329,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PartitionRestartProgress', response) @@ -13296,6 +13488,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('NodeTransitionProgress', response) @@ -13379,6 +13572,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[OperationStatus]', response) @@ -13673,6 +13867,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedBackupPolicyDescriptionList', response) @@ -13740,6 +13935,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('BackupPolicyDescription', response) @@ -13828,6 +14024,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedBackupEntityList', response) @@ -14158,6 +14355,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedBackupConfigurationInfoList', response) @@ -14276,6 +14474,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedBackupInfoList', response) @@ -14678,6 +14877,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedBackupConfigurationInfoList', response) @@ -14794,6 +14994,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedBackupInfoList', response) @@ -15152,6 +15353,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PartitionBackupConfigurationInfo', response) @@ -15242,6 +15444,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedBackupInfoList', response) @@ -15521,6 +15724,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('BackupProgressInfo', response) @@ -15676,6 +15880,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('RestoreProgressInfo', response) @@ -15768,6 +15973,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedBackupInfoList', response) @@ -16038,6 +16244,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedSubNameInfoList', response) @@ -16125,6 +16332,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PagedPropertyInfoList', response) @@ -16266,6 +16474,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('PropertyInfo', response) @@ -16409,6 +16618,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('SuccessfulPropertyBatchInfo', response) if response.status_code == 409: @@ -16498,6 +16708,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[ClusterEvent]', response) @@ -16585,6 +16796,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[ContainerInstanceEvent]', response) @@ -16678,6 +16890,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[NodeEvent]', response) @@ -16765,6 +16978,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[NodeEvent]', response) @@ -16865,6 +17079,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[ApplicationEvent]', response) @@ -16952,6 +17167,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[ApplicationEvent]', response) @@ -17051,6 +17267,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[ServiceEvent]', response) @@ -17138,6 +17355,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[ServiceEvent]', response) @@ -17231,6 +17449,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[PartitionEvent]', response) @@ -17318,6 +17537,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[PartitionEvent]', response) @@ -17414,6 +17634,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[ReplicaEvent]', response) @@ -17507,6 +17728,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[ReplicaEvent]', response) @@ -17574,6 +17796,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): raise models.FabricErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('[FabricEvent]', response)