diff --git a/azure-servicefabric/HISTORY.rst b/azure-servicefabric/HISTORY.rst index 049e32a054c7..80524bea4cbd 100644 --- a/azure-servicefabric/HISTORY.rst +++ b/azure-servicefabric/HISTORY.rst @@ -3,6 +3,18 @@ Release History =============== +6.3.0.0 (2018-07-27) +++++++++++++++++++++ + +**Bugfixes** + +- Numerous improvements to descriptions and help texts + +**Features** + +- Add application health policies parameter for config upgrade +- Query to get nodes now supports specification to limit number of returned items + 6.2.0.0 (2018-05-10) ++++++++++++++++++++ diff --git a/azure-servicefabric/README.rst b/azure-servicefabric/README.rst index 5c63e58e6a83..cdb9d23af0aa 100644 --- a/azure-servicefabric/README.rst +++ b/azure-servicefabric/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Service Fabric Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5, 3.6, and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/azure-servicefabric/azure/servicefabric/models/__init__.py b/azure-servicefabric/azure/servicefabric/models/__init__.py index 56974bfbcdda..dc2cb2fd10fb 100644 --- a/azure-servicefabric/azure/servicefabric/models/__init__.py +++ b/azure-servicefabric/azure/servicefabric/models/__init__.py @@ -423,6 +423,31 @@ from .chaos_move_primary_fault_scheduled_event_py3 import ChaosMovePrimaryFaultScheduledEvent from .chaos_restart_replica_fault_scheduled_event_py3 import ChaosRestartReplicaFaultScheduledEvent from .chaos_restart_node_fault_scheduled_event_py3 import ChaosRestartNodeFaultScheduledEvent + from .service_resource_description_py3 import ServiceResourceDescription + from .diagnostics_sink_properties_py3 import DiagnosticsSinkProperties + from .diagnostics_description_py3 import DiagnosticsDescription + from .application_resource_description_py3 import ApplicationResourceDescription + from .paged_service_resource_description_list_py3 import PagedServiceResourceDescriptionList + from .service_resource_replica_description_py3 import ServiceResourceReplicaDescription + from .paged_service_resource_replica_description_list_py3 import PagedServiceResourceReplicaDescriptionList + from .volume_provider_parameters_azure_file_py3 import VolumeProviderParametersAzureFile + from .volume_resource_description_py3 import VolumeResourceDescription + 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 .container_volume_py3 import ContainerVolume + from .container_state_py3 import ContainerState + from .container_event_py3 import ContainerEvent + from .container_instance_view_py3 import ContainerInstanceView + from .diagnostics_ref_py3 import DiagnosticsRef + from .container_code_package_properties_py3 import ContainerCodePackageProperties + from .network_ref_py3 import NetworkRef + from .service_replica_properties_py3 import ServiceReplicaProperties except (SyntaxError, ImportError): from .aad_metadata import AadMetadata from .aad_metadata_object import AadMetadataObject @@ -837,6 +862,31 @@ from .chaos_move_primary_fault_scheduled_event import ChaosMovePrimaryFaultScheduledEvent from .chaos_restart_replica_fault_scheduled_event import ChaosRestartReplicaFaultScheduledEvent from .chaos_restart_node_fault_scheduled_event import ChaosRestartNodeFaultScheduledEvent + from .service_resource_description import ServiceResourceDescription + from .diagnostics_sink_properties import DiagnosticsSinkProperties + from .diagnostics_description import DiagnosticsDescription + from .application_resource_description import ApplicationResourceDescription + from .paged_service_resource_description_list import PagedServiceResourceDescriptionList + from .service_resource_replica_description import ServiceResourceReplicaDescription + from .paged_service_resource_replica_description_list import PagedServiceResourceReplicaDescriptionList + from .volume_provider_parameters_azure_file import VolumeProviderParametersAzureFile + from .volume_resource_description import VolumeResourceDescription + 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 .container_volume import ContainerVolume + from .container_state import ContainerState + from .container_event import ContainerEvent + from .container_instance_view import ContainerInstanceView + from .diagnostics_ref import DiagnosticsRef + from .container_code_package_properties import ContainerCodePackageProperties + from .network_ref import NetworkRef + from .service_replica_properties import ServiceReplicaProperties from .service_fabric_client_ap_is_enums import ( ApplicationDefinitionKind, HealthState, @@ -919,6 +969,10 @@ RepairTaskHealthCheckState, ScalingTriggerKind, ScalingMechanismKind, + ServiceResourceStatus, + ApplicationResourceStatus, + DiagnosticsSinkKind, + OperatingSystemTypes, NodeStatusFilter, ReplicaHealthReportServiceKind, DataLossMode, @@ -1341,6 +1395,31 @@ 'ChaosMovePrimaryFaultScheduledEvent', 'ChaosRestartReplicaFaultScheduledEvent', 'ChaosRestartNodeFaultScheduledEvent', + 'ServiceResourceDescription', + 'DiagnosticsSinkProperties', + 'DiagnosticsDescription', + 'ApplicationResourceDescription', + 'PagedServiceResourceDescriptionList', + 'ServiceResourceReplicaDescription', + 'PagedServiceResourceReplicaDescriptionList', + 'VolumeProviderParametersAzureFile', + 'VolumeResourceDescription', + 'ImageRegistryCredential', + 'EnvironmentVariable', + 'Setting', + 'ContainerLabel', + 'EndpointProperties', + 'ResourceRequests', + 'ResourceLimits', + 'ResourceRequirements', + 'ContainerVolume', + 'ContainerState', + 'ContainerEvent', + 'ContainerInstanceView', + 'DiagnosticsRef', + 'ContainerCodePackageProperties', + 'NetworkRef', + 'ServiceReplicaProperties', 'ApplicationDefinitionKind', 'HealthState', 'ApplicationStatus', @@ -1422,6 +1501,10 @@ 'RepairTaskHealthCheckState', 'ScalingTriggerKind', 'ScalingMechanismKind', + 'ServiceResourceStatus', + 'ApplicationResourceStatus', + 'DiagnosticsSinkKind', + 'OperatingSystemTypes', 'NodeStatusFilter', 'ReplicaHealthReportServiceKind', 'DataLossMode', diff --git a/azure-servicefabric/azure/servicefabric/models/application_health_state_filter.py b/azure-servicefabric/azure/servicefabric/models/application_health_state_filter.py index 71d8519bbe2d..3bc1bfb77040 100644 --- a/azure-servicefabric/azure/servicefabric/models/application_health_state_filter.py +++ b/azure-servicefabric/azure/servicefabric/models/application_health_state_filter.py @@ -48,7 +48,7 @@ class ApplicationHealthStateFilter(Model): 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 + 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). diff --git a/azure-servicefabric/azure/servicefabric/models/application_health_state_filter_py3.py b/azure-servicefabric/azure/servicefabric/models/application_health_state_filter_py3.py index 0c28776c469e..609e919173b8 100644 --- a/azure-servicefabric/azure/servicefabric/models/application_health_state_filter_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/application_health_state_filter_py3.py @@ -48,7 +48,7 @@ class ApplicationHealthStateFilter(Model): 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 + 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). diff --git a/azure-servicefabric/azure/servicefabric/models/application_resource_description.py b/azure-servicefabric/azure/servicefabric/models/application_resource_description.py new file mode 100644 index 000000000000..52b38c02c723 --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/application_resource_description.py @@ -0,0 +1,86 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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): + """Describes a service fabric 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 description: User readable description of the application. + :type description: str + :param debug_params: Internal use. + :type debug_params: str + :param services: describes the services in the application. + :type services: + list[~azure.servicefabric.models.ServiceResourceDescription] + :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 + :ivar status: Status of the application resource. Possible values include: + 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or + ~azure.servicefabric.models.ApplicationResourceStatus + :ivar status_details: Gives additional information about the current + status of the application deployment. + :vartype status_details: str + :ivar service_names: Names of the services in the application. + :vartype service_names: list[str] + :param diagnostics: Describes the diagnostics definition and usage for an + application resource. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsDescription + :param name: Required. Application resource name. + :type name: str + """ + + _validation = { + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'service_names': {'readonly': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, + 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationResourceDescription, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.debug_params = kwargs.get('debug_params', None) + self.services = kwargs.get('services', None) + self.health_state = None + self.unhealthy_evaluation = None + self.status = None + self.status_details = None + self.service_names = None + self.diagnostics = kwargs.get('diagnostics', None) + self.name = kwargs.get('name', None) diff --git a/azure-servicefabric/azure/servicefabric/models/application_resource_description_py3.py b/azure-servicefabric/azure/servicefabric/models/application_resource_description_py3.py new file mode 100644 index 000000000000..8f763cd5c83a --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/application_resource_description_py3.py @@ -0,0 +1,86 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (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): + """Describes a service fabric 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 description: User readable description of the application. + :type description: str + :param debug_params: Internal use. + :type debug_params: str + :param services: describes the services in the application. + :type services: + list[~azure.servicefabric.models.ServiceResourceDescription] + :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 + :ivar status: Status of the application resource. Possible values include: + 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or + ~azure.servicefabric.models.ApplicationResourceStatus + :ivar status_details: Gives additional information about the current + status of the application deployment. + :vartype status_details: str + :ivar service_names: Names of the services in the application. + :vartype service_names: list[str] + :param diagnostics: Describes the diagnostics definition and usage for an + application resource. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsDescription + :param name: Required. Application resource name. + :type name: str + """ + + _validation = { + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'service_names': {'readonly': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, + 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str, description: str=None, debug_params: str=None, services=None, diagnostics=None, **kwargs) -> None: + super(ApplicationResourceDescription, self).__init__(**kwargs) + self.description = description + self.debug_params = debug_params + self.services = services + self.health_state = None + self.unhealthy_evaluation = None + self.status = None + self.status_details = None + self.service_names = None + self.diagnostics = diagnostics + self.name = name diff --git a/azure-servicefabric/azure/servicefabric/models/application_upgrade_description.py b/azure-servicefabric/azure/servicefabric/models/application_upgrade_description.py index 564d3b0fb35e..0e05fe147c53 100644 --- a/azure-servicefabric/azure/servicefabric/models/application_upgrade_description.py +++ b/azure-servicefabric/azure/servicefabric/models/application_upgrade_description.py @@ -13,11 +13,11 @@ class ApplicationUpgradeDescription(Model): - """Describes the parameters for an application upgrade. Please 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 results in application using the default value of the parameters from + """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 diff --git a/azure-servicefabric/azure/servicefabric/models/application_upgrade_description_py3.py b/azure-servicefabric/azure/servicefabric/models/application_upgrade_description_py3.py index b488ee2eca27..6c5ee662b247 100644 --- a/azure-servicefabric/azure/servicefabric/models/application_upgrade_description_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/application_upgrade_description_py3.py @@ -13,11 +13,11 @@ class ApplicationUpgradeDescription(Model): - """Describes the parameters for an application upgrade. Please 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 results in application using the default value of the parameters from + """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 diff --git a/azure-servicefabric/azure/servicefabric/models/application_upgrade_progress_info.py b/azure-servicefabric/azure/servicefabric/models/application_upgrade_progress_info.py index 0e87a90611ed..4246e259b3f2 100644 --- a/azure-servicefabric/azure/servicefabric/models/application_upgrade_progress_info.py +++ b/azure-servicefabric/azure/servicefabric/models/application_upgrade_progress_info.py @@ -40,14 +40,14 @@ class ApplicationUpgradeProgressInfo(Model): '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. Please 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 results in 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. + 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 diff --git a/azure-servicefabric/azure/servicefabric/models/application_upgrade_progress_info_py3.py b/azure-servicefabric/azure/servicefabric/models/application_upgrade_progress_info_py3.py index 24a68fb516df..eb71121dc2a4 100644 --- a/azure-servicefabric/azure/servicefabric/models/application_upgrade_progress_info_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/application_upgrade_progress_info_py3.py @@ -40,14 +40,14 @@ class ApplicationUpgradeProgressInfo(Model): '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. Please 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 results in 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. + 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 diff --git a/azure-servicefabric/azure/servicefabric/models/chaos_events_segment.py b/azure-servicefabric/azure/servicefabric/models/chaos_events_segment.py index c4ba31499c7b..a6373aa67b59 100644 --- a/azure-servicefabric/azure/servicefabric/models/chaos_events_segment.py +++ b/azure-servicefabric/azure/servicefabric/models/chaos_events_segment.py @@ -20,7 +20,7 @@ class ChaosEventsSegment(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/chaos_events_segment_py3.py b/azure-servicefabric/azure/servicefabric/models/chaos_events_segment_py3.py index b46bbb279472..e916ca94c686 100644 --- a/azure-servicefabric/azure/servicefabric/models/chaos_events_segment_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/chaos_events_segment_py3.py @@ -20,7 +20,7 @@ class ChaosEventsSegment(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/chaos_parameters.py b/azure-servicefabric/azure/servicefabric/models/chaos_parameters.py index fa05c7d606da..ed32218f29c4 100644 --- a/azure-servicefabric/azure/servicefabric/models/chaos_parameters.py +++ b/azure-servicefabric/azure/servicefabric/models/chaos_parameters.py @@ -31,8 +31,8 @@ class ChaosParameters(Model): 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 -- - inducing more complex series of states to uncover bugs. + 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 diff --git a/azure-servicefabric/azure/servicefabric/models/chaos_parameters_py3.py b/azure-servicefabric/azure/servicefabric/models/chaos_parameters_py3.py index fa1e0ebecad4..ed9ab927a1bc 100644 --- a/azure-servicefabric/azure/servicefabric/models/chaos_parameters_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/chaos_parameters_py3.py @@ -31,8 +31,8 @@ class ChaosParameters(Model): 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 -- - inducing more complex series of states to uncover bugs. + 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 diff --git a/azure-servicefabric/azure/servicefabric/models/cluster_configuration_upgrade_description.py b/azure-servicefabric/azure/servicefabric/models/cluster_configuration_upgrade_description.py index 80b70090e060..e5599d7e52b4 100644 --- a/azure-servicefabric/azure/servicefabric/models/cluster_configuration_upgrade_description.py +++ b/azure-servicefabric/azure/servicefabric/models/cluster_configuration_upgrade_description.py @@ -54,6 +54,11 @@ class ClusterConfigurationUpgradeDescription(Model): 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 = { @@ -71,6 +76,7 @@ class ClusterConfigurationUpgradeDescription(Model): '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): @@ -85,3 +91,4 @@ def __init__(self, **kwargs): 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/azure-servicefabric/azure/servicefabric/models/cluster_configuration_upgrade_description_py3.py b/azure-servicefabric/azure/servicefabric/models/cluster_configuration_upgrade_description_py3.py index 4ff72e8a4a54..594219794d72 100644 --- a/azure-servicefabric/azure/servicefabric/models/cluster_configuration_upgrade_description_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/cluster_configuration_upgrade_description_py3.py @@ -54,6 +54,11 @@ class ClusterConfigurationUpgradeDescription(Model): 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 = { @@ -71,9 +76,10 @@ class ClusterConfigurationUpgradeDescription(Model): '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, **kwargs) -> None: + 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 @@ -85,3 +91,4 @@ def __init__(self, *, cluster_config: str, health_check_retry_timeout="PT0H0M0S" 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/azure-servicefabric/azure/servicefabric/models/container_code_package_properties.py b/azure-servicefabric/azure/servicefabric/models/container_code_package_properties.py new file mode 100644 index 000000000000..7f9982d44792 --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/container_code_package_properties.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 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 entrypoint: Override for the default entry point in the container. + :type entrypoint: 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. This type describes the resource requirements + for a container or a service. + :type resources: ~azure.servicefabric.models.ResourceRequirements + :param volume_refs: The volumes to be attached to the container. + :type volume_refs: list[~azure.servicefabric.models.ContainerVolume] + :ivar instance_view: Runtime information of a container instance. + :vartype instance_view: ~azure.servicefabric.models.ContainerInstanceView + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + """ + + _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'}, + 'entrypoint': {'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': '[ContainerVolume]'}, + 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + } + + 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.entrypoint = kwargs.get('entrypoint', 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.instance_view = None + self.diagnostics = kwargs.get('diagnostics', None) diff --git a/azure-servicefabric/azure/servicefabric/models/container_code_package_properties_py3.py b/azure-servicefabric/azure/servicefabric/models/container_code_package_properties_py3.py new file mode 100644 index 000000000000..8022d73d5487 --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/container_code_package_properties_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 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 entrypoint: Override for the default entry point in the container. + :type entrypoint: 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. This type describes the resource requirements + for a container or a service. + :type resources: ~azure.servicefabric.models.ResourceRequirements + :param volume_refs: The volumes to be attached to the container. + :type volume_refs: list[~azure.servicefabric.models.ContainerVolume] + :ivar instance_view: Runtime information of a container instance. + :vartype instance_view: ~azure.servicefabric.models.ContainerInstanceView + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + """ + + _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'}, + 'entrypoint': {'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': '[ContainerVolume]'}, + 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + } + + def __init__(self, *, name: str, image: str, resources, image_registry_credential=None, entrypoint: str=None, commands=None, environment_variables=None, settings=None, labels=None, endpoints=None, volume_refs=None, diagnostics=None, **kwargs) -> None: + super(ContainerCodePackageProperties, self).__init__(**kwargs) + self.name = name + self.image = image + self.image_registry_credential = image_registry_credential + self.entrypoint = entrypoint + 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.instance_view = None + self.diagnostics = diagnostics diff --git a/azure-servicefabric/azure/servicefabric/models/container_event.py b/azure-servicefabric/azure/servicefabric/models/container_event.py new file mode 100644 index 000000000000..36bb437c0be0 --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/container_event_py3.py b/azure-servicefabric/azure/servicefabric/models/container_event_py3.py new file mode 100644 index 000000000000..4851036a54cc --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/container_instance_view.py b/azure-servicefabric/azure/servicefabric/models/container_instance_view.py new file mode 100644 index 000000000000..74d0408d6b89 --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/container_instance_view_py3.py b/azure-servicefabric/azure/servicefabric/models/container_instance_view_py3.py new file mode 100644 index 000000000000..2f14ce0f928f --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/container_label.py b/azure-servicefabric/azure/servicefabric/models/container_label.py new file mode 100644 index 000000000000..f474f141d643 --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/container_label_py3.py b/azure-servicefabric/azure/servicefabric/models/container_label_py3.py new file mode 100644 index 000000000000..118326393d68 --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/container_state.py b/azure-servicefabric/azure/servicefabric/models/container_state.py new file mode 100644 index 000000000000..3e2c2bf0f367 --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/container_state_py3.py b/azure-servicefabric/azure/servicefabric/models/container_state_py3.py new file mode 100644 index 000000000000..eb2f51953faf --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/container_volume.py b/azure-servicefabric/azure/servicefabric/models/container_volume.py new file mode 100644 index 000000000000..47323174239c --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/container_volume.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 ContainerVolume(Model): + """Describes how a volume is attached to a container. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the volume. + :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(ContainerVolume, 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/azure-servicefabric/azure/servicefabric/models/container_volume_py3.py b/azure-servicefabric/azure/servicefabric/models/container_volume_py3.py new file mode 100644 index 000000000000..0ff73ba3b086 --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/container_volume_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 ContainerVolume(Model): + """Describes how a volume is attached to a container. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the volume. + :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(ContainerVolume, self).__init__(**kwargs) + self.name = name + self.read_only = read_only + self.destination_path = destination_path diff --git a/azure-servicefabric/azure/servicefabric/models/deployed_application_health_state_filter.py b/azure-servicefabric/azure/servicefabric/models/deployed_application_health_state_filter.py index 7474be070c6f..00453b4359b4 100644 --- a/azure-servicefabric/azure/servicefabric/models/deployed_application_health_state_filter.py +++ b/azure-servicefabric/azure/servicefabric/models/deployed_application_health_state_filter.py @@ -44,7 +44,7 @@ class DeployedApplicationHealthStateFilter(Model): 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 + 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). diff --git a/azure-servicefabric/azure/servicefabric/models/deployed_application_health_state_filter_py3.py b/azure-servicefabric/azure/servicefabric/models/deployed_application_health_state_filter_py3.py index 5b1174b8756f..4ced80a50e53 100644 --- a/azure-servicefabric/azure/servicefabric/models/deployed_application_health_state_filter_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/deployed_application_health_state_filter_py3.py @@ -44,7 +44,7 @@ class DeployedApplicationHealthStateFilter(Model): 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 + 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). diff --git a/azure-servicefabric/azure/servicefabric/models/deployed_service_package_health_state_filter.py b/azure-servicefabric/azure/servicefabric/models/deployed_service_package_health_state_filter.py index 739bfe996b85..5dc226984414 100644 --- a/azure-servicefabric/azure/servicefabric/models/deployed_service_package_health_state_filter.py +++ b/azure-servicefabric/azure/servicefabric/models/deployed_service_package_health_state_filter.py @@ -53,7 +53,7 @@ class DeployedServicePackageHealthStateFilter(Model): 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 + 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). diff --git a/azure-servicefabric/azure/servicefabric/models/deployed_service_package_health_state_filter_py3.py b/azure-servicefabric/azure/servicefabric/models/deployed_service_package_health_state_filter_py3.py index 2217a8045075..a4af67606cfe 100644 --- a/azure-servicefabric/azure/servicefabric/models/deployed_service_package_health_state_filter_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/deployed_service_package_health_state_filter_py3.py @@ -53,7 +53,7 @@ class DeployedServicePackageHealthStateFilter(Model): 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 + 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). diff --git a/azure-servicefabric/azure/servicefabric/models/deployed_stateful_service_replica_detail_info.py b/azure-servicefabric/azure/servicefabric/models/deployed_stateful_service_replica_detail_info.py index 2e73177e89e4..03c616621d32 100644 --- a/azure-servicefabric/azure/servicefabric/models/deployed_stateful_service_replica_detail_info.py +++ b/azure-servicefabric/azure/servicefabric/models/deployed_stateful_service_replica_detail_info.py @@ -13,7 +13,7 @@ class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo): - """Information about a stateful replica running in a code package. Please note + """Information about a stateful replica running in a code package. Note DeployedServiceReplicaQueryResult will contain duplicate data like ServiceKind, ServiceName, PartitionId and replicaId. diff --git a/azure-servicefabric/azure/servicefabric/models/deployed_stateful_service_replica_detail_info_py3.py b/azure-servicefabric/azure/servicefabric/models/deployed_stateful_service_replica_detail_info_py3.py index ded02eb75d63..fe98aade8b95 100644 --- a/azure-servicefabric/azure/servicefabric/models/deployed_stateful_service_replica_detail_info_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/deployed_stateful_service_replica_detail_info_py3.py @@ -13,7 +13,7 @@ class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo): - """Information about a stateful replica running in a code package. Please note + """Information about a stateful replica running in a code package. Note DeployedServiceReplicaQueryResult will contain duplicate data like ServiceKind, ServiceName, PartitionId and replicaId. diff --git a/azure-servicefabric/azure/servicefabric/models/deployed_stateless_service_instance_detail_info.py b/azure-servicefabric/azure/servicefabric/models/deployed_stateless_service_instance_detail_info.py index d02ce2d384b0..4f06117b7380 100644 --- a/azure-servicefabric/azure/servicefabric/models/deployed_stateless_service_instance_detail_info.py +++ b/azure-servicefabric/azure/servicefabric/models/deployed_stateless_service_instance_detail_info.py @@ -13,9 +13,9 @@ class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInfo): - """Information about a stateless instance running in a code package. Please - note that DeployedServiceReplicaQueryResult will contain duplicate data - like ServiceKind, ServiceName, PartitionId and InstanceId. + """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. diff --git a/azure-servicefabric/azure/servicefabric/models/deployed_stateless_service_instance_detail_info_py3.py b/azure-servicefabric/azure/servicefabric/models/deployed_stateless_service_instance_detail_info_py3.py index 9726a274b788..3bbb72b65620 100644 --- a/azure-servicefabric/azure/servicefabric/models/deployed_stateless_service_instance_detail_info_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/deployed_stateless_service_instance_detail_info_py3.py @@ -13,9 +13,9 @@ class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInfo): - """Information about a stateless instance running in a code package. Please - note that DeployedServiceReplicaQueryResult will contain duplicate data - like ServiceKind, ServiceName, PartitionId and InstanceId. + """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. diff --git a/azure-servicefabric/azure/servicefabric/models/diagnostics_description.py b/azure-servicefabric/azure/servicefabric/models/diagnostics_description.py new file mode 100644 index 000000000000..8c4e0a81adad --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/diagnostics_description_py3.py b/azure-servicefabric/azure/servicefabric/models/diagnostics_description_py3.py new file mode 100644 index 000000000000..6ff42afccddd --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/diagnostics_ref.py b/azure-servicefabric/azure/servicefabric/models/diagnostics_ref.py new file mode 100644 index 000000000000..3d4c803cac28 --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/diagnostics_ref_py3.py b/azure-servicefabric/azure/servicefabric/models/diagnostics_ref_py3.py new file mode 100644 index 000000000000..f11fbf2b40d2 --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/diagnostics_sink_properties.py b/azure-servicefabric/azure/servicefabric/models/diagnostics_sink_properties.py new file mode 100644 index 000000000000..0f92568c3b43 --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/diagnostics_sink_properties.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 DiagnosticsSinkProperties(Model): + """Properties of a DiagnosticsSink. + + 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'}, + } + + 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/azure-servicefabric/azure/servicefabric/models/diagnostics_sink_properties_py3.py b/azure-servicefabric/azure/servicefabric/models/diagnostics_sink_properties_py3.py new file mode 100644 index 000000000000..a127b1a8af5c --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/diagnostics_sink_properties_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 DiagnosticsSinkProperties(Model): + """Properties of a DiagnosticsSink. + + 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'}, + } + + 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/azure-servicefabric/azure/servicefabric/models/endpoint_properties.py b/azure-servicefabric/azure/servicefabric/models/endpoint_properties.py new file mode 100644 index 000000000000..fe53d35ee902 --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/endpoint_properties_py3.py b/azure-servicefabric/azure/servicefabric/models/endpoint_properties_py3.py new file mode 100644 index 000000000000..d61442506a61 --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/environment_variable.py b/azure-servicefabric/azure/servicefabric/models/environment_variable.py new file mode 100644 index 000000000000..0e61588e7c86 --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/environment_variable.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 EnvironmentVariable(Model): + """Describes an environment variable for the container. + + :param name: The name of the environment variable. + :type name: str + :param value: The value of the environment variable. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnvironmentVariable, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-servicefabric/azure/servicefabric/models/environment_variable_py3.py b/azure-servicefabric/azure/servicefabric/models/environment_variable_py3.py new file mode 100644 index 000000000000..a91fdc50ebbd --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/environment_variable_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 EnvironmentVariable(Model): + """Describes an environment variable for the container. + + :param name: The name of the environment variable. + :type name: str + :param value: The value of the environment variable. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(EnvironmentVariable, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-servicefabric/azure/servicefabric/models/fabric_error_error.py b/azure-servicefabric/azure/servicefabric/models/fabric_error_error.py index 6a99561c327c..62007b111bb4 100644 --- a/azure-servicefabric/azure/servicefabric/models/fabric_error_error.py +++ b/azure-servicefabric/azure/servicefabric/models/fabric_error_error.py @@ -97,6 +97,11 @@ class FabricErrorError(Model): 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" + - "ABRIC_E_VOLUME_NOT_FOUND" + - "SerializationError" - Possible values of the error code for HTTP status code 503 (Service Unavailable) - "FABRIC_E_NO_WRITE_QUORUM" @@ -162,7 +167,11 @@ class FabricErrorError(Model): '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_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' :type code: str or ~azure.servicefabric.models.FabricErrorCodes :param message: Error message. :type message: str diff --git a/azure-servicefabric/azure/servicefabric/models/fabric_error_error_py3.py b/azure-servicefabric/azure/servicefabric/models/fabric_error_error_py3.py index c4223a268840..981f5bc7d10e 100644 --- a/azure-servicefabric/azure/servicefabric/models/fabric_error_error_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/fabric_error_error_py3.py @@ -97,6 +97,11 @@ class FabricErrorError(Model): 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" + - "ABRIC_E_VOLUME_NOT_FOUND" + - "SerializationError" - Possible values of the error code for HTTP status code 503 (Service Unavailable) - "FABRIC_E_NO_WRITE_QUORUM" @@ -162,7 +167,11 @@ class FabricErrorError(Model): '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_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' :type code: str or ~azure.servicefabric.models.FabricErrorCodes :param message: Error message. :type message: str diff --git a/azure-servicefabric/azure/servicefabric/models/health_event.py b/azure-servicefabric/azure/servicefabric/models/health_event.py index e513fc233ebb..cc865612cc31 100644 --- a/azure-servicefabric/azure/servicefabric/models/health_event.py +++ b/azure-servicefabric/azure/servicefabric/models/health_event.py @@ -18,8 +18,8 @@ class HealthEvent(HealthInformation): All required parameters must be populated in order to send to Azure. - :param source_id: Required. The source name which identifies the - client/watchdog/system component which generated the health information. + :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. diff --git a/azure-servicefabric/azure/servicefabric/models/health_event_py3.py b/azure-servicefabric/azure/servicefabric/models/health_event_py3.py index 8ab24006eff4..5ea857d34c74 100644 --- a/azure-servicefabric/azure/servicefabric/models/health_event_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/health_event_py3.py @@ -18,8 +18,8 @@ class HealthEvent(HealthInformation): All required parameters must be populated in order to send to Azure. - :param source_id: Required. The source name which identifies the - client/watchdog/system component which generated the health information. + :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. diff --git a/azure-servicefabric/azure/servicefabric/models/health_information.py b/azure-servicefabric/azure/servicefabric/models/health_information.py index af1425bb1a04..86501bb5b65c 100644 --- a/azure-servicefabric/azure/servicefabric/models/health_information.py +++ b/azure-servicefabric/azure/servicefabric/models/health_information.py @@ -19,8 +19,8 @@ class HealthInformation(Model): All required parameters must be populated in order to send to Azure. - :param source_id: Required. The source name which identifies the - client/watchdog/system component which generated the health information. + :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. diff --git a/azure-servicefabric/azure/servicefabric/models/health_information_py3.py b/azure-servicefabric/azure/servicefabric/models/health_information_py3.py index 912cdc71161c..1c7878e09687 100644 --- a/azure-servicefabric/azure/servicefabric/models/health_information_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/health_information_py3.py @@ -19,8 +19,8 @@ class HealthInformation(Model): All required parameters must be populated in order to send to Azure. - :param source_id: Required. The source name which identifies the - client/watchdog/system component which generated the health information. + :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. diff --git a/azure-servicefabric/azure/servicefabric/models/image_registry_credential.py b/azure-servicefabric/azure/servicefabric/models/image_registry_credential.py new file mode 100644 index 000000000000..4a31577dad55 --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/image_registry_credential.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 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: The password for the private registry. + :type password: str + """ + + _validation = { + 'server': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'server': {'key': 'server', 'type': 'str'}, + 'username': {'key': 'username', '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 = kwargs.get('password', None) diff --git a/azure-servicefabric/azure/servicefabric/models/image_registry_credential_py3.py b/azure-servicefabric/azure/servicefabric/models/image_registry_credential_py3.py new file mode 100644 index 000000000000..d189db0f0041 --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/image_registry_credential_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 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: The password for the private registry. + :type password: str + """ + + _validation = { + 'server': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'server': {'key': 'server', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, server: str, username: str, password: str=None, **kwargs) -> None: + super(ImageRegistryCredential, self).__init__(**kwargs) + self.server = server + self.username = username + self.password = password diff --git a/azure-servicefabric/azure/servicefabric/models/network_ref.py b/azure-servicefabric/azure/servicefabric/models/network_ref.py new file mode 100644 index 000000000000..b86c10253c0f --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/network_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 NetworkRef(Model): + """Describes a network reference in a service. + + :param name: Name of the network. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NetworkRef, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-servicefabric/azure/servicefabric/models/network_ref_py3.py b/azure-servicefabric/azure/servicefabric/models/network_ref_py3.py new file mode 100644 index 000000000000..45e5d333f747 --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/network_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 NetworkRef(Model): + """Describes a network reference in a service. + + :param name: Name of the network. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(NetworkRef, self).__init__(**kwargs) + self.name = name diff --git a/azure-servicefabric/azure/servicefabric/models/node_health_state_filter.py b/azure-servicefabric/azure/servicefabric/models/node_health_state_filter.py index 20bb11d9fe8d..cd2e1a93cbe7 100644 --- a/azure-servicefabric/azure/servicefabric/models/node_health_state_filter.py +++ b/azure-servicefabric/azure/servicefabric/models/node_health_state_filter.py @@ -37,7 +37,7 @@ class NodeHealthStateFilter(Model): 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 + 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). diff --git a/azure-servicefabric/azure/servicefabric/models/node_health_state_filter_py3.py b/azure-servicefabric/azure/servicefabric/models/node_health_state_filter_py3.py index 58981ab684ad..e6e59041e330 100644 --- a/azure-servicefabric/azure/servicefabric/models/node_health_state_filter_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/node_health_state_filter_py3.py @@ -37,7 +37,7 @@ class NodeHealthStateFilter(Model): 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 + 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). diff --git a/azure-servicefabric/azure/servicefabric/models/paged_application_info_list.py b/azure-servicefabric/azure/servicefabric/models/paged_application_info_list.py index 539e0c29c5c7..7aa9d71f603c 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_application_info_list.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_application_info_list.py @@ -22,7 +22,7 @@ class PagedApplicationInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_application_info_list_py3.py b/azure-servicefabric/azure/servicefabric/models/paged_application_info_list_py3.py index 43aa243a74e6..46dc2cc8d921 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_application_info_list_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_application_info_list_py3.py @@ -22,7 +22,7 @@ class PagedApplicationInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_application_type_info_list.py b/azure-servicefabric/azure/servicefabric/models/paged_application_type_info_list.py index 5d8ca73e3ea4..486df2b118c5 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_application_type_info_list.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_application_type_info_list.py @@ -22,7 +22,7 @@ class PagedApplicationTypeInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_application_type_info_list_py3.py b/azure-servicefabric/azure/servicefabric/models/paged_application_type_info_list_py3.py index 18e7445b835b..cfcfce6f0482 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_application_type_info_list_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_application_type_info_list_py3.py @@ -22,7 +22,7 @@ class PagedApplicationTypeInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_backup_configuration_info_list.py b/azure-servicefabric/azure/servicefabric/models/paged_backup_configuration_info_list.py index 37211ee7f6e6..732c5ac80597 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_backup_configuration_info_list.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_backup_configuration_info_list.py @@ -22,7 +22,7 @@ class PagedBackupConfigurationInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_backup_configuration_info_list_py3.py b/azure-servicefabric/azure/servicefabric/models/paged_backup_configuration_info_list_py3.py index 7523de04f771..643ec9e4b97d 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_backup_configuration_info_list_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_backup_configuration_info_list_py3.py @@ -22,7 +22,7 @@ class PagedBackupConfigurationInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_backup_entity_list.py b/azure-servicefabric/azure/servicefabric/models/paged_backup_entity_list.py index a75c8df56422..08b04f6472f4 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_backup_entity_list.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_backup_entity_list.py @@ -22,7 +22,7 @@ class PagedBackupEntityList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_backup_entity_list_py3.py b/azure-servicefabric/azure/servicefabric/models/paged_backup_entity_list_py3.py index 814c8b9b9cee..b2e4f9ec05c4 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_backup_entity_list_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_backup_entity_list_py3.py @@ -22,7 +22,7 @@ class PagedBackupEntityList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_backup_info_list.py b/azure-servicefabric/azure/servicefabric/models/paged_backup_info_list.py index aa8882ca711f..b65adcc86e88 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_backup_info_list.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_backup_info_list.py @@ -21,7 +21,7 @@ class PagedBackupInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_backup_info_list_py3.py b/azure-servicefabric/azure/servicefabric/models/paged_backup_info_list_py3.py index d13665a77de6..f3cfc51db5cb 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_backup_info_list_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_backup_info_list_py3.py @@ -21,7 +21,7 @@ class PagedBackupInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_backup_policy_description_list.py b/azure-servicefabric/azure/servicefabric/models/paged_backup_policy_description_list.py index 988a4fc95ad7..5898dc191d0e 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_backup_policy_description_list.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_backup_policy_description_list.py @@ -22,7 +22,7 @@ class PagedBackupPolicyDescriptionList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_backup_policy_description_list_py3.py b/azure-servicefabric/azure/servicefabric/models/paged_backup_policy_description_list_py3.py index e39c6005f5e4..e87b88558b16 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_backup_policy_description_list_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_backup_policy_description_list_py3.py @@ -22,7 +22,7 @@ class PagedBackupPolicyDescriptionList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_compose_deployment_status_info_list.py b/azure-servicefabric/azure/servicefabric/models/paged_compose_deployment_status_info_list.py index 63caf245ca11..1b2d2c5a231d 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_compose_deployment_status_info_list.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_compose_deployment_status_info_list.py @@ -22,7 +22,7 @@ class PagedComposeDeploymentStatusInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_compose_deployment_status_info_list_py3.py b/azure-servicefabric/azure/servicefabric/models/paged_compose_deployment_status_info_list_py3.py index 2ef82ee97867..37c8f8dc388e 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_compose_deployment_status_info_list_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_compose_deployment_status_info_list_py3.py @@ -22,7 +22,7 @@ class PagedComposeDeploymentStatusInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_deployed_application_info_list.py b/azure-servicefabric/azure/servicefabric/models/paged_deployed_application_info_list.py index 6209d11fe096..9d6ed5ef3b8a 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_deployed_application_info_list.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_deployed_application_info_list.py @@ -23,7 +23,7 @@ class PagedDeployedApplicationInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_deployed_application_info_list_py3.py b/azure-servicefabric/azure/servicefabric/models/paged_deployed_application_info_list_py3.py index eca2fffc165f..9610051b3119 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_deployed_application_info_list_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_deployed_application_info_list_py3.py @@ -23,7 +23,7 @@ class PagedDeployedApplicationInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_node_info_list.py b/azure-servicefabric/azure/servicefabric/models/paged_node_info_list.py index a204b9cf5884..4819ccb76d02 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_node_info_list.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_node_info_list.py @@ -21,7 +21,7 @@ class PagedNodeInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_node_info_list_py3.py b/azure-servicefabric/azure/servicefabric/models/paged_node_info_list_py3.py index 74d6ead03040..3834bceed0f3 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_node_info_list_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_node_info_list_py3.py @@ -21,7 +21,7 @@ class PagedNodeInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_property_info_list.py b/azure-servicefabric/azure/servicefabric/models/paged_property_info_list.py index 28d546319b6d..a4744c9ff2fc 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_property_info_list.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_property_info_list.py @@ -22,7 +22,7 @@ class PagedPropertyInfoList(Model): 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 + 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 diff --git a/azure-servicefabric/azure/servicefabric/models/paged_property_info_list_py3.py b/azure-servicefabric/azure/servicefabric/models/paged_property_info_list_py3.py index ecebddd507df..5317c8745572 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_property_info_list_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_property_info_list_py3.py @@ -22,7 +22,7 @@ class PagedPropertyInfoList(Model): 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 + 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 diff --git a/azure-servicefabric/azure/servicefabric/models/paged_replica_info_list.py b/azure-servicefabric/azure/servicefabric/models/paged_replica_info_list.py index 55b6e258387d..3fb73e21deb4 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_replica_info_list.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_replica_info_list.py @@ -22,7 +22,7 @@ class PagedReplicaInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_replica_info_list_py3.py b/azure-servicefabric/azure/servicefabric/models/paged_replica_info_list_py3.py index 289a01f9b245..94fb1a703980 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_replica_info_list_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_replica_info_list_py3.py @@ -22,7 +22,7 @@ class PagedReplicaInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_service_info_list.py b/azure-servicefabric/azure/servicefabric/models/paged_service_info_list.py index 8d3feead13db..f17b883c1184 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_service_info_list.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_service_info_list.py @@ -22,7 +22,7 @@ class PagedServiceInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_service_info_list_py3.py b/azure-servicefabric/azure/servicefabric/models/paged_service_info_list_py3.py index 06a444f4e301..3f8d6c02453c 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_service_info_list_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_service_info_list_py3.py @@ -22,7 +22,7 @@ class PagedServiceInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_service_partition_info_list.py b/azure-servicefabric/azure/servicefabric/models/paged_service_partition_info_list.py index 013fc622dc53..8cf85e24f086 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_service_partition_info_list.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_service_partition_info_list.py @@ -22,7 +22,7 @@ class PagedServicePartitionInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_service_partition_info_list_py3.py b/azure-servicefabric/azure/servicefabric/models/paged_service_partition_info_list_py3.py index 786de1bad73a..58d90e9fa3be 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_service_partition_info_list_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_service_partition_info_list_py3.py @@ -22,7 +22,7 @@ class PagedServicePartitionInfoList(Model): 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 + 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. diff --git a/azure-servicefabric/azure/servicefabric/models/paged_service_resource_description_list.py b/azure-servicefabric/azure/servicefabric/models/paged_service_resource_description_list.py new file mode 100644 index 000000000000..004ad553d81e --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/paged_service_resource_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 PagedServiceResourceDescriptionList(Model): + """The list of service resources 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 description. + :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/azure-servicefabric/azure/servicefabric/models/paged_service_resource_description_list_py3.py b/azure-servicefabric/azure/servicefabric/models/paged_service_resource_description_list_py3.py new file mode 100644 index 000000000000..03c2ef9a5404 --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/paged_service_resource_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 PagedServiceResourceDescriptionList(Model): + """The list of service resources 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 description. + :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/azure-servicefabric/azure/servicefabric/models/paged_service_resource_replica_description_list.py b/azure-servicefabric/azure/servicefabric/models/paged_service_resource_replica_description_list.py new file mode 100644 index 000000000000..59965287ec2a --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/paged_service_resource_replica_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 PagedServiceResourceReplicaDescriptionList(Model): + """The list of service resources 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 description. + :type items: + list[~azure.servicefabric.models.ServiceResourceReplicaDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceResourceReplicaDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedServiceResourceReplicaDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/azure-servicefabric/azure/servicefabric/models/paged_service_resource_replica_description_list_py3.py b/azure-servicefabric/azure/servicefabric/models/paged_service_resource_replica_description_list_py3.py new file mode 100644 index 000000000000..3336e5559b8e --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/paged_service_resource_replica_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 PagedServiceResourceReplicaDescriptionList(Model): + """The list of service resources 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 description. + :type items: + list[~azure.servicefabric.models.ServiceResourceReplicaDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceResourceReplicaDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedServiceResourceReplicaDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/azure-servicefabric/azure/servicefabric/models/paged_sub_name_info_list.py b/azure-servicefabric/azure/servicefabric/models/paged_sub_name_info_list.py index c94074d3b945..50d6d0d09343 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_sub_name_info_list.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_sub_name_info_list.py @@ -22,7 +22,7 @@ class PagedSubNameInfoList(Model): 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 + 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 diff --git a/azure-servicefabric/azure/servicefabric/models/paged_sub_name_info_list_py3.py b/azure-servicefabric/azure/servicefabric/models/paged_sub_name_info_list_py3.py index 0da81d80bc4e..04b1f66cb925 100644 --- a/azure-servicefabric/azure/servicefabric/models/paged_sub_name_info_list_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/paged_sub_name_info_list_py3.py @@ -22,7 +22,7 @@ class PagedSubNameInfoList(Model): 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 + 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 diff --git a/azure-servicefabric/azure/servicefabric/models/partition_health_state_filter.py b/azure-servicefabric/azure/servicefabric/models/partition_health_state_filter.py index e484a1f94be6..485a6b8bddbf 100644 --- a/azure-servicefabric/azure/servicefabric/models/partition_health_state_filter.py +++ b/azure-servicefabric/azure/servicefabric/models/partition_health_state_filter.py @@ -40,7 +40,7 @@ class PartitionHealthStateFilter(Model): 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 + 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). diff --git a/azure-servicefabric/azure/servicefabric/models/partition_health_state_filter_py3.py b/azure-servicefabric/azure/servicefabric/models/partition_health_state_filter_py3.py index 8843b8ba2bd5..f4e22e02cdd7 100644 --- a/azure-servicefabric/azure/servicefabric/models/partition_health_state_filter_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/partition_health_state_filter_py3.py @@ -40,7 +40,7 @@ class PartitionHealthStateFilter(Model): 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 + 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). diff --git a/azure-servicefabric/azure/servicefabric/models/property_description.py b/azure-servicefabric/azure/servicefabric/models/property_description.py index 145ee6a3b7bf..f94b470527f4 100644 --- a/azure-servicefabric/azure/servicefabric/models/property_description.py +++ b/azure-servicefabric/azure/servicefabric/models/property_description.py @@ -19,7 +19,7 @@ class PropertyDescription(Model): :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, + :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. diff --git a/azure-servicefabric/azure/servicefabric/models/property_description_py3.py b/azure-servicefabric/azure/servicefabric/models/property_description_py3.py index b069f87d211d..bfdb021e0356 100644 --- a/azure-servicefabric/azure/servicefabric/models/property_description_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/property_description_py3.py @@ -19,7 +19,7 @@ class PropertyDescription(Model): :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, + :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. diff --git a/azure-servicefabric/azure/servicefabric/models/property_metadata.py b/azure-servicefabric/azure/servicefabric/models/property_metadata.py index 0646afbcb7ca..8c772044bcf9 100644 --- a/azure-servicefabric/azure/servicefabric/models/property_metadata.py +++ b/azure-servicefabric/azure/servicefabric/models/property_metadata.py @@ -19,10 +19,10 @@ class PropertyMetadata(Model): 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. + :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 namespace/table under which 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. diff --git a/azure-servicefabric/azure/servicefabric/models/property_metadata_py3.py b/azure-servicefabric/azure/servicefabric/models/property_metadata_py3.py index a658d9e46418..8d3d2a9eb0f6 100644 --- a/azure-servicefabric/azure/servicefabric/models/property_metadata_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/property_metadata_py3.py @@ -19,10 +19,10 @@ class PropertyMetadata(Model): 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. + :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 namespace/table under which 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. diff --git a/azure-servicefabric/azure/servicefabric/models/put_property_batch_operation.py b/azure-servicefabric/azure/servicefabric/models/put_property_batch_operation.py index 594bbf426400..c1e4a263fc85 100644 --- a/azure-servicefabric/azure/servicefabric/models/put_property_batch_operation.py +++ b/azure-servicefabric/azure/servicefabric/models/put_property_batch_operation.py @@ -25,7 +25,7 @@ class PutPropertyBatchOperation(PropertyBatchOperation): :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, + :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 """ diff --git a/azure-servicefabric/azure/servicefabric/models/put_property_batch_operation_py3.py b/azure-servicefabric/azure/servicefabric/models/put_property_batch_operation_py3.py index 5dd13517ecbc..862605acd728 100644 --- a/azure-servicefabric/azure/servicefabric/models/put_property_batch_operation_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/put_property_batch_operation_py3.py @@ -25,7 +25,7 @@ class PutPropertyBatchOperation(PropertyBatchOperation): :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, + :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 """ diff --git a/azure-servicefabric/azure/servicefabric/models/replica_health_state_filter.py b/azure-servicefabric/azure/servicefabric/models/replica_health_state_filter.py index a5cb71b4b310..c736e8152368 100644 --- a/azure-servicefabric/azure/servicefabric/models/replica_health_state_filter.py +++ b/azure-servicefabric/azure/servicefabric/models/replica_health_state_filter.py @@ -42,7 +42,7 @@ class ReplicaHealthStateFilter(Model): 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 + 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). diff --git a/azure-servicefabric/azure/servicefabric/models/replica_health_state_filter_py3.py b/azure-servicefabric/azure/servicefabric/models/replica_health_state_filter_py3.py index 74827322c7ae..29a295066386 100644 --- a/azure-servicefabric/azure/servicefabric/models/replica_health_state_filter_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/replica_health_state_filter_py3.py @@ -42,7 +42,7 @@ class ReplicaHealthStateFilter(Model): 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 + 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). diff --git a/azure-servicefabric/azure/servicefabric/models/resource_limits.py b/azure-servicefabric/azure/servicefabric/models/resource_limits.py new file mode 100644 index 000000000000..9653965c0df6 --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/resource_limits_py3.py b/azure-servicefabric/azure/servicefabric/models/resource_limits_py3.py new file mode 100644 index 000000000000..2817c55a584a --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/resource_requests.py b/azure-servicefabric/azure/servicefabric/models/resource_requests.py new file mode 100644 index 000000000000..1a1b725acd71 --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/resource_requests_py3.py b/azure-servicefabric/azure/servicefabric/models/resource_requests_py3.py new file mode 100644 index 000000000000..ffa43735a264 --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/resource_requirements.py b/azure-servicefabric/azure/servicefabric/models/resource_requirements.py new file mode 100644 index 000000000000..e28015728be1 --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/resource_requirements_py3.py b/azure-servicefabric/azure/servicefabric/models/resource_requirements_py3.py new file mode 100644 index 000000000000..09945aa5c5a0 --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/restart_node_description.py b/azure-servicefabric/azure/servicefabric/models/restart_node_description.py index cbcd8643b3ec..f913764a3170 100644 --- a/azure-servicefabric/azure/servicefabric/models/restart_node_description.py +++ b/azure-servicefabric/azure/servicefabric/models/restart_node_description.py @@ -24,7 +24,7 @@ class RestartNodeDescription(Model): 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', + node process. This is case-sensitive. Possible values include: 'False', 'True'. Default value: "False" . :type create_fabric_dump: str or ~azure.servicefabric.models.CreateFabricDump diff --git a/azure-servicefabric/azure/servicefabric/models/restart_node_description_py3.py b/azure-servicefabric/azure/servicefabric/models/restart_node_description_py3.py index f70d52cba01d..025da5984f22 100644 --- a/azure-servicefabric/azure/servicefabric/models/restart_node_description_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/restart_node_description_py3.py @@ -24,7 +24,7 @@ class RestartNodeDescription(Model): 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', + node process. This is case-sensitive. Possible values include: 'False', 'True'. Default value: "False" . :type create_fabric_dump: str or ~azure.servicefabric.models.CreateFabricDump diff --git a/azure-servicefabric/azure/servicefabric/models/service_created_event.py b/azure-servicefabric/azure/servicefabric/models/service_created_event.py index 18ef6ff9c67c..41507f2da246 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_created_event.py +++ b/azure-servicefabric/azure/servicefabric/models/service_created_event.py @@ -27,7 +27,7 @@ class ServiceCreatedEvent(ServiceEvent): :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 is an + :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 "\\~" diff --git a/azure-servicefabric/azure/servicefabric/models/service_created_event_py3.py b/azure-servicefabric/azure/servicefabric/models/service_created_event_py3.py index 4a107d35aef9..85da62411112 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_created_event_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/service_created_event_py3.py @@ -27,7 +27,7 @@ class ServiceCreatedEvent(ServiceEvent): :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 is an + :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 "\\~" diff --git a/azure-servicefabric/azure/servicefabric/models/service_deleted_event.py b/azure-servicefabric/azure/servicefabric/models/service_deleted_event.py index b6107146a993..fa14df02ecee 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_deleted_event.py +++ b/azure-servicefabric/azure/servicefabric/models/service_deleted_event.py @@ -27,7 +27,7 @@ class ServiceDeletedEvent(ServiceEvent): :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 is an + :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 "\\~" diff --git a/azure-servicefabric/azure/servicefabric/models/service_deleted_event_py3.py b/azure-servicefabric/azure/servicefabric/models/service_deleted_event_py3.py index ae03f223b651..4bada4904170 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_deleted_event_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/service_deleted_event_py3.py @@ -27,7 +27,7 @@ class ServiceDeletedEvent(ServiceEvent): :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 is an + :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 "\\~" diff --git a/azure-servicefabric/azure/servicefabric/models/service_event.py b/azure-servicefabric/azure/servicefabric/models/service_event.py index 07587ca446fd..8c7937b204c5 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_event.py +++ b/azure-servicefabric/azure/servicefabric/models/service_event.py @@ -31,7 +31,7 @@ class ServiceEvent(FabricEvent): :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 is an + :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 "\\~" diff --git a/azure-servicefabric/azure/servicefabric/models/service_event_py3.py b/azure-servicefabric/azure/servicefabric/models/service_event_py3.py index f9b326e48fa9..1be7606566c1 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_event_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/service_event_py3.py @@ -31,7 +31,7 @@ class ServiceEvent(FabricEvent): :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 is an + :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 "\\~" diff --git a/azure-servicefabric/azure/servicefabric/models/service_fabric_client_ap_is_enums.py b/azure-servicefabric/azure/servicefabric/models/service_fabric_client_ap_is_enums.py index ebaeb12c0256..95f1696c8ce1 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_fabric_client_ap_is_enums.py +++ b/azure-servicefabric/azure/servicefabric/models/service_fabric_client_ap_is_enums.py @@ -113,7 +113,7 @@ class NodeUpgradePhase(str, Enum): class FailureReason(str, Enum): none = "None" #: Indicates the reason is invalid or unknown. All Service Fabric enumerations have the invalid type. The value is zero. - interrupted = "Interrupted" #: There was an external request to rollback the upgrade. The value is 1 + interrupted = "Interrupted" #: There was an external request to roll back the upgrade. The value is 1 health_check = "HealthCheck" #: The upgrade failed due to health policy violations. The value is 2 upgrade_domain_timeout = "UpgradeDomainTimeout" #: An upgrade domain took longer than the allowed upgrade domain timeout to process. The value is 3 overall_upgrade_timeout = "OverallUpgradeTimeout" #: The overall upgrade took longer than the allowed upgrade timeout to process. The value is 4 @@ -268,6 +268,11 @@ class FabricErrorCodes(str, Enum): fabric_e_backup_policy_already_existing = "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" fabric_e_invalid_service_scaling_policy = "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" e_invalidarg = "E_INVALIDARG" + fabric_e_single_instance_application_already_exists = "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" + fabric_e_single_instance_application_not_found = "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" + fabric_e_volume_already_exists = "FABRIC_E_VOLUME_ALREADY_EXISTS" + fabric_e_volume_not_found = "FABRIC_E_VOLUME_NOT_FOUND" + serialization_error = "SerializationError" class FabricEventKind(str, Enum): @@ -875,6 +880,38 @@ class ScalingMechanismKind(str, Enum): add_remove_incremental_named_partition = "AddRemoveIncrementalNamedPartition" #: Indicates a mechanism for scaling where new named partitions are added or removed from a service. The value is 2. +class ServiceResourceStatus(str, Enum): + + unknown = "Unknown" + active = "Active" + upgrading = "Upgrading" + deleting = "Deleting" + creating = "Creating" + failed = "Failed" + + +class ApplicationResourceStatus(str, Enum): + + invalid = "Invalid" + ready = "Ready" + upgrading = "Upgrading" + creating = "Creating" + deleting = "Deleting" + failed = "Failed" + + +class DiagnosticsSinkKind(str, Enum): + + invalid = "Invalid" #: Indicates an invalid sink kind. All Service Fabric enumerations have the invalid type. + azure_internal_monitoring_pipeline = "AzureInternalMonitoringPipeline" #: Diagnostics settings for Geneva. + + +class OperatingSystemTypes(str, Enum): + + linux = "Linux" + windows = "Windows" + + class NodeStatusFilter(str, Enum): default = "default" #: This filter value will match all of the nodes excepts the ones with with status as Unknown or Removed. diff --git a/azure-servicefabric/azure/servicefabric/models/service_health_report_created_event.py b/azure-servicefabric/azure/servicefabric/models/service_health_report_created_event.py index 2d4d47ca5db1..807e50a197cc 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_health_report_created_event.py +++ b/azure-servicefabric/azure/servicefabric/models/service_health_report_created_event.py @@ -27,7 +27,7 @@ class ServiceHealthReportCreatedEvent(ServiceEvent): :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 is an + :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 "\\~" diff --git a/azure-servicefabric/azure/servicefabric/models/service_health_report_created_event_py3.py b/azure-servicefabric/azure/servicefabric/models/service_health_report_created_event_py3.py index 90b0a5d17021..bceb16a455fc 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_health_report_created_event_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/service_health_report_created_event_py3.py @@ -27,7 +27,7 @@ class ServiceHealthReportCreatedEvent(ServiceEvent): :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 is an + :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 "\\~" diff --git a/azure-servicefabric/azure/servicefabric/models/service_health_report_expired_event.py b/azure-servicefabric/azure/servicefabric/models/service_health_report_expired_event.py index a8e6e63e41bb..b5a9c3ac9a60 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_health_report_expired_event.py +++ b/azure-servicefabric/azure/servicefabric/models/service_health_report_expired_event.py @@ -27,7 +27,7 @@ class ServiceHealthReportExpiredEvent(ServiceEvent): :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 is an + :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 "\\~" diff --git a/azure-servicefabric/azure/servicefabric/models/service_health_report_expired_event_py3.py b/azure-servicefabric/azure/servicefabric/models/service_health_report_expired_event_py3.py index 610abf6e6178..72911d581f3e 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_health_report_expired_event_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/service_health_report_expired_event_py3.py @@ -27,7 +27,7 @@ class ServiceHealthReportExpiredEvent(ServiceEvent): :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 is an + :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 "\\~" diff --git a/azure-servicefabric/azure/servicefabric/models/service_health_state_filter.py b/azure-servicefabric/azure/servicefabric/models/service_health_state_filter.py index 1fb07f42369a..27b5ce5f0a7b 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_health_state_filter.py +++ b/azure-servicefabric/azure/servicefabric/models/service_health_state_filter.py @@ -39,7 +39,7 @@ class ServiceHealthStateFilter(Model): 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 + 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). diff --git a/azure-servicefabric/azure/servicefabric/models/service_health_state_filter_py3.py b/azure-servicefabric/azure/servicefabric/models/service_health_state_filter_py3.py index d02e37499e11..ba9ff59aaa8a 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_health_state_filter_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/service_health_state_filter_py3.py @@ -39,7 +39,7 @@ class ServiceHealthStateFilter(Model): 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 + 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). diff --git a/azure-servicefabric/azure/servicefabric/models/service_info.py b/azure-servicefabric/azure/servicefabric/models/service_info.py index cab01e120a74..d6e72ba01938 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_info.py +++ b/azure-servicefabric/azure/servicefabric/models/service_info.py @@ -20,9 +20,9 @@ class ServiceInfo(Model): All required parameters must be populated in order to send to Azure. - :param id: The identity of the service. This is an encoded representation - of the service name. This is used in the REST APIs to identify the service - resource. + :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 diff --git a/azure-servicefabric/azure/servicefabric/models/service_info_py3.py b/azure-servicefabric/azure/servicefabric/models/service_info_py3.py index ea32af0f1c35..2cba52c53cba 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_info_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/service_info_py3.py @@ -20,9 +20,9 @@ class ServiceInfo(Model): All required parameters must be populated in order to send to Azure. - :param id: The identity of the service. This is an encoded representation - of the service name. This is used in the REST APIs to identify the service - resource. + :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 diff --git a/azure-servicefabric/azure/servicefabric/models/service_load_metric_description.py b/azure-servicefabric/azure/servicefabric/models/service_load_metric_description.py index 6e24680531e7..00bc3f3070ad 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_load_metric_description.py +++ b/azure-servicefabric/azure/servicefabric/models/service_load_metric_description.py @@ -19,8 +19,8 @@ class ServiceLoadMetricDescription(Model): :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. + 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: diff --git a/azure-servicefabric/azure/servicefabric/models/service_load_metric_description_py3.py b/azure-servicefabric/azure/servicefabric/models/service_load_metric_description_py3.py index f98d85eb533e..7b764fbec1ec 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_load_metric_description_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/service_load_metric_description_py3.py @@ -19,8 +19,8 @@ class ServiceLoadMetricDescription(Model): :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. + 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: diff --git a/azure-servicefabric/azure/servicefabric/models/service_name_info.py b/azure-servicefabric/azure/servicefabric/models/service_name_info.py index 38a691f1abff..75fd440e2206 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_name_info.py +++ b/azure-servicefabric/azure/servicefabric/models/service_name_info.py @@ -15,9 +15,9 @@ class ServiceNameInfo(Model): """Information about the service name. - :param id: The identity of the service. This is an encoded representation - of the service name. This is used in the REST APIs to identify the service - resource. + :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 diff --git a/azure-servicefabric/azure/servicefabric/models/service_name_info_py3.py b/azure-servicefabric/azure/servicefabric/models/service_name_info_py3.py index 62ffe9b8761b..474752f8d37f 100644 --- a/azure-servicefabric/azure/servicefabric/models/service_name_info_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/service_name_info_py3.py @@ -15,9 +15,9 @@ class ServiceNameInfo(Model): """Information about the service name. - :param id: The identity of the service. This is an encoded representation - of the service name. This is used in the REST APIs to identify the service - resource. + :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 diff --git a/azure-servicefabric/azure/servicefabric/models/service_replica_properties.py b/azure-servicefabric/azure/servicefabric/models/service_replica_properties.py new file mode 100644 index 000000000000..3c1c98849c95 --- /dev/null +++ b/azure-servicefabric/azure/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 Operating system type required by the code + in service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemTypes + :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/azure-servicefabric/azure/servicefabric/models/service_replica_properties_py3.py b/azure-servicefabric/azure/servicefabric/models/service_replica_properties_py3.py new file mode 100644 index 000000000000..4b9efd620beb --- /dev/null +++ b/azure-servicefabric/azure/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 Operating system type required by the code + in service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemTypes + :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/azure-servicefabric/azure/servicefabric/models/service_resource_description.py b/azure-servicefabric/azure/servicefabric/models/service_resource_description.py new file mode 100644 index 000000000000..c49731207d34 --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/service_resource_description.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 ServiceResourceDescription(Model): + """Describes a service fabric 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 os_type: Required. The Operating system type required by the code + in service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemTypes + :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 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 + :ivar status: Represents the status of the service. Possible values + include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + 'Failed' + :vartype status: str or ~azure.servicefabric.models.ServiceResourceStatus + :param name: Required. Service resource name. + :type name: str + """ + + _validation = { + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + 'status': {'readonly': True}, + 'name': {'required': True}, + } + + _attribute_map = { + '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'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceResourceDescription, 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) + self.description = kwargs.get('description', None) + self.replica_count = kwargs.get('replica_count', None) + self.health_state = kwargs.get('health_state', None) + self.status = None + self.name = kwargs.get('name', None) diff --git a/azure-servicefabric/azure/servicefabric/models/service_resource_description_py3.py b/azure-servicefabric/azure/servicefabric/models/service_resource_description_py3.py new file mode 100644 index 000000000000..9c2a47b04516 --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/service_resource_description_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 ServiceResourceDescription(Model): + """Describes a service fabric 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 os_type: Required. The Operating system type required by the code + in service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemTypes + :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 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 + :ivar status: Represents the status of the service. Possible values + include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + 'Failed' + :vartype status: str or ~azure.servicefabric.models.ServiceResourceStatus + :param name: Required. Service resource name. + :type name: str + """ + + _validation = { + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + 'status': {'readonly': True}, + 'name': {'required': True}, + } + + _attribute_map = { + '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'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, os_type, code_packages, name: str, network_refs=None, diagnostics=None, description: str=None, replica_count: int=None, health_state=None, **kwargs) -> None: + super(ServiceResourceDescription, self).__init__(**kwargs) + 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.health_state = health_state + self.status = None + self.name = name diff --git a/azure-servicefabric/azure/servicefabric/models/service_resource_replica_description.py b/azure-servicefabric/azure/servicefabric/models/service_resource_replica_description.py new file mode 100644 index 000000000000..68fd31343c39 --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/service_resource_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 ServiceResourceReplicaDescription(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 Operating system type required by the code + in service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemTypes + :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(ServiceResourceReplicaDescription, self).__init__(**kwargs) + self.replica_name = kwargs.get('replica_name', None) diff --git a/azure-servicefabric/azure/servicefabric/models/service_resource_replica_description_py3.py b/azure-servicefabric/azure/servicefabric/models/service_resource_replica_description_py3.py new file mode 100644 index 000000000000..4fba0c372e90 --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/service_resource_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 ServiceResourceReplicaDescription(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 Operating system type required by the code + in service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemTypes + :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(ServiceResourceReplicaDescription, 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/azure-servicefabric/azure/servicefabric/models/setting.py b/azure-servicefabric/azure/servicefabric/models/setting.py new file mode 100644 index 000000000000..23fc418e0bec --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/setting.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 Setting(Model): + """Describes a setting for the container. + + :param name: The name of the setting. + :type name: str + :param value: The value of the setting. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Setting, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-servicefabric/azure/servicefabric/models/setting_py3.py b/azure-servicefabric/azure/servicefabric/models/setting_py3.py new file mode 100644 index 000000000000..1a042b3d640e --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/setting_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 Setting(Model): + """Describes a setting for the container. + + :param name: The name of the setting. + :type name: str + :param value: The value of the setting. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(Setting, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-servicefabric/azure/servicefabric/models/stateful_service_info.py b/azure-servicefabric/azure/servicefabric/models/stateful_service_info.py index c9c37b96e98e..38bf04d846a0 100644 --- a/azure-servicefabric/azure/servicefabric/models/stateful_service_info.py +++ b/azure-servicefabric/azure/servicefabric/models/stateful_service_info.py @@ -17,9 +17,9 @@ class StatefulServiceInfo(ServiceInfo): All required parameters must be populated in order to send to Azure. - :param id: The identity of the service. This is an encoded representation - of the service name. This is used in the REST APIs to identify the service - resource. + :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 diff --git a/azure-servicefabric/azure/servicefabric/models/stateful_service_info_py3.py b/azure-servicefabric/azure/servicefabric/models/stateful_service_info_py3.py index d5ec2c7d43b0..4a0f30fb8a09 100644 --- a/azure-servicefabric/azure/servicefabric/models/stateful_service_info_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/stateful_service_info_py3.py @@ -17,9 +17,9 @@ class StatefulServiceInfo(ServiceInfo): All required parameters must be populated in order to send to Azure. - :param id: The identity of the service. This is an encoded representation - of the service name. This is used in the REST APIs to identify the service - resource. + :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 diff --git a/azure-servicefabric/azure/servicefabric/models/stateless_service_info.py b/azure-servicefabric/azure/servicefabric/models/stateless_service_info.py index be936ce20f77..234c4e1852a4 100644 --- a/azure-servicefabric/azure/servicefabric/models/stateless_service_info.py +++ b/azure-servicefabric/azure/servicefabric/models/stateless_service_info.py @@ -17,9 +17,9 @@ class StatelessServiceInfo(ServiceInfo): All required parameters must be populated in order to send to Azure. - :param id: The identity of the service. This is an encoded representation - of the service name. This is used in the REST APIs to identify the service - resource. + :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 diff --git a/azure-servicefabric/azure/servicefabric/models/stateless_service_info_py3.py b/azure-servicefabric/azure/servicefabric/models/stateless_service_info_py3.py index 8a337cf8cfbb..6c09bd4ee5c6 100644 --- a/azure-servicefabric/azure/servicefabric/models/stateless_service_info_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/stateless_service_info_py3.py @@ -17,9 +17,9 @@ class StatelessServiceInfo(ServiceInfo): All required parameters must be populated in order to send to Azure. - :param id: The identity of the service. This is an encoded representation - of the service name. This is used in the REST APIs to identify the service - resource. + :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 diff --git a/azure-servicefabric/azure/servicefabric/models/unprovision_application_type_description_info.py b/azure-servicefabric/azure/servicefabric/models/unprovision_application_type_description_info.py index 32db152ee5fa..d946b380f480 100644 --- a/azure-servicefabric/azure/servicefabric/models/unprovision_application_type_description_info.py +++ b/azure-servicefabric/azure/servicefabric/models/unprovision_application_type_description_info.py @@ -25,7 +25,7 @@ class UnprovisionApplicationTypeDescriptionInfo(Model): 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 to set it to true for large application packages + However, we recommend setting it to true for large application packages that were provisioned. :type async_property: bool """ diff --git a/azure-servicefabric/azure/servicefabric/models/unprovision_application_type_description_info_py3.py b/azure-servicefabric/azure/servicefabric/models/unprovision_application_type_description_info_py3.py index b214244065b2..abc8598aa51c 100644 --- a/azure-servicefabric/azure/servicefabric/models/unprovision_application_type_description_info_py3.py +++ b/azure-servicefabric/azure/servicefabric/models/unprovision_application_type_description_info_py3.py @@ -25,7 +25,7 @@ class UnprovisionApplicationTypeDescriptionInfo(Model): 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 to set it to true for large application packages + However, we recommend setting it to true for large application packages that were provisioned. :type async_property: bool """ diff --git a/azure-servicefabric/azure/servicefabric/models/volume_provider_parameters_azure_file.py b/azure-servicefabric/azure/servicefabric/models/volume_provider_parameters_azure_file.py new file mode 100644 index 000000000000..c10943e94cf4 --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/volume_provider_parameters_azure_file_py3.py b/azure-servicefabric/azure/servicefabric/models/volume_provider_parameters_azure_file_py3.py new file mode 100644 index 000000000000..c8fea05b1ef8 --- /dev/null +++ b/azure-servicefabric/azure/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/azure-servicefabric/azure/servicefabric/models/volume_resource_description.py b/azure-servicefabric/azure/servicefabric/models/volume_resource_description.py new file mode 100644 index 000000000000..1128c2c47240 --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/volume_resource_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 VolumeResourceDescription(Model): + """Describes a service fabric 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 description: User readable description of the volume. + :type description: 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 + :param name: Required. Volume resource name. + :type name: str + """ + + _validation = { + 'provider': {'required': True, 'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + provider = "SFAzureFile" + + def __init__(self, **kwargs): + super(VolumeResourceDescription, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.azure_file_parameters = kwargs.get('azure_file_parameters', None) + self.name = kwargs.get('name', None) diff --git a/azure-servicefabric/azure/servicefabric/models/volume_resource_description_py3.py b/azure-servicefabric/azure/servicefabric/models/volume_resource_description_py3.py new file mode 100644 index 000000000000..aa4ef2da3c24 --- /dev/null +++ b/azure-servicefabric/azure/servicefabric/models/volume_resource_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 VolumeResourceDescription(Model): + """Describes a service fabric 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 description: User readable description of the volume. + :type description: 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 + :param name: Required. Volume resource name. + :type name: str + """ + + _validation = { + 'provider': {'required': True, 'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + provider = "SFAzureFile" + + def __init__(self, *, name: str, description: str=None, azure_file_parameters=None, **kwargs) -> None: + super(VolumeResourceDescription, self).__init__(**kwargs) + self.description = description + self.azure_file_parameters = azure_file_parameters + self.name = name diff --git a/azure-servicefabric/azure/servicefabric/service_fabric_client_ap_is.py b/azure-servicefabric/azure/servicefabric/service_fabric_client_ap_is.py index ad92a3cdb520..224683435b48 100644 --- a/azure-servicefabric/azure/servicefabric/service_fabric_client_ap_is.py +++ b/azure-servicefabric/azure/servicefabric/service_fabric_client_ap_is.py @@ -13,6 +13,7 @@ from msrest import Configuration, Serializer, Deserializer from .version import VERSION from msrest.pipeline import ClientRawResponse +from msrest.exceptions import HttpOperationError from . import models @@ -61,7 +62,7 @@ def __init__( 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 = '6.2.0.9' + self.api_version = '6.3.0.9' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -73,12 +74,12 @@ def get_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. + 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 + 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). + 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. @@ -112,13 +113,13 @@ def get_cluster_manifest( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -139,7 +140,6 @@ 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. - 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 @@ -153,7 +153,7 @@ def get_cluster_health( 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 + 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. @@ -180,7 +180,7 @@ def get_cluster_health( 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 + 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 @@ -204,11 +204,11 @@ def get_cluster_health( 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 value - 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) are returned. + 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 @@ -278,13 +278,13 @@ def get_cluster_health( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -305,7 +305,6 @@ 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. - 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 @@ -321,7 +320,7 @@ def get_cluster_health_using_policy( 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 + 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. @@ -348,7 +347,7 @@ def get_cluster_health_using_policy( 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 + 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 @@ -372,11 +371,11 @@ def get_cluster_health_using_policy( 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 value - 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) are returned. + 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 @@ -465,6 +464,7 @@ def get_cluster_health_using_policy( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -476,9 +476,8 @@ def get_cluster_health_using_policy( body_content = None # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -535,13 +534,13 @@ def get_cluster_health_chunk( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -628,6 +627,7 @@ def get_cluster_health_chunk_using_policy_and_advanced_filters( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -639,9 +639,8 @@ def get_cluster_health_chunk_using_policy_and_advanced_filters( body_content = None # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -680,7 +679,7 @@ def report_cluster_health( health reports sent to the health manager. :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag which indicates whether the report should be + :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. @@ -738,9 +737,8 @@ def report_cluster_health( body_content = self._serialize.body(health_information, 'HealthInformation') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -792,13 +790,13 @@ def get_provisioned_fabric_code_version_info_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -857,13 +855,13 @@ def get_provisioned_fabric_config_version_info_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -885,7 +883,7 @@ def get_cluster_upgrade_progress( """Gets the progress of the current cluster upgrade. Gets the current progress of the ongoing cluster upgrade. If no upgrade - is currently in progress, gets the last state of the previous cluster + is currently in progress, get the last state of the previous cluster upgrade. :param timeout: The server timeout for performing the operation in @@ -917,13 +915,13 @@ def get_cluster_upgrade_progress( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -944,10 +942,9 @@ def get_cluster_configuration( self, configuration_api_version, timeout=60, custom_headers=None, raw=False, **operation_config): """Get the Service Fabric standalone cluster configuration. - 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. + 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. @@ -982,13 +979,13 @@ def get_cluster_configuration( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -1044,13 +1041,13 @@ def get_cluster_configuration_upgrade_status( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -1104,13 +1101,13 @@ def get_upgrade_orchestration_service_state( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -1171,6 +1168,7 @@ def set_upgrade_orchestration_service_state( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -1179,9 +1177,8 @@ def set_upgrade_orchestration_service_state( body_content = self._serialize.body(upgrade_orchestration_service_state, 'UpgradeOrchestrationServiceState') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -1248,9 +1245,8 @@ def provision_cluster( body_content = self._serialize.body(provision_fabric_description, 'ProvisionFabricDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -1265,9 +1261,7 @@ def unprovision_cluster( """Unprovision the code or configuration packages of a Service Fabric cluster. - Unprovision the code or configuration packages of a Service Fabric - cluster. It is supported to unprovision code and configuration - separately. + 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 @@ -1311,9 +1305,8 @@ def unprovision_cluster( body_content = self._serialize.body(unprovision_fabric_description, 'UnprovisionFabricDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -1357,13 +1350,12 @@ def rollback_cluster_upgrade( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -1421,9 +1413,8 @@ def resume_cluster_upgrade( body_content = self._serialize.body(resume_cluster_upgrade_description, 'ResumeClusterUpgradeDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -1482,9 +1473,8 @@ def start_cluster_upgrade( body_content = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -1542,9 +1532,8 @@ def start_cluster_configuration_upgrade( body_content = self._serialize.body(cluster_configuration_upgrade_description, 'ClusterConfigurationUpgradeDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -1601,9 +1590,8 @@ def update_cluster_upgrade( body_content = self._serialize.body(update_cluster_upgrade_description, 'UpdateClusterUpgradeDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -1653,13 +1641,13 @@ def get_aad_metadata( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -1677,19 +1665,18 @@ def get_aad_metadata( get_aad_metadata.metadata = {'url': '/$/GetAadMetadata'} def get_node_info_list( - self, continuation_token=None, node_status_filter="default", timeout=60, custom_headers=None, raw=False, **operation_config): + 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. - Gets the list of nodes in the Service Fabric cluster. The response - includes the name, status, id, health, uptime, and other details about - the node. + 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 + 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 + 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 @@ -1699,6 +1686,14 @@ def get_node_info_list( '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 @@ -1715,7 +1710,7 @@ def get_node_info_list( :raises: :class:`FabricErrorException` """ - api_version = "6.0" + api_version = "6.3" # Construct URL url = self.get_node_info_list.metadata['url'] @@ -1727,18 +1722,20 @@ def get_node_info_list( 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['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -1760,9 +1757,8 @@ def get_node_info( """Gets the information about a specific node in the Service Fabric cluster. - 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. + 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 @@ -1799,13 +1795,13 @@ def get_node_info( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.FabricErrorException(self._deserialize, response) @@ -1839,11 +1835,11 @@ def get_node_health( 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 value - 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) are returned. + 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 @@ -1892,13 +1888,13 @@ def get_node_health( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -1935,11 +1931,11 @@ def get_node_health_using_policy( 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 value - 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) are returned. + 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 @@ -1994,6 +1990,7 @@ def get_node_health_using_policy( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -2005,9 +2002,8 @@ def get_node_health_using_policy( body_content = None # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -2048,7 +2044,7 @@ def report_node_health( health reports sent to the health manager. :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag which indicates whether the report should be + :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. @@ -2110,9 +2106,8 @@ def report_node_health( body_content = self._serialize.body(health_information, 'HealthInformation') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -2164,13 +2159,13 @@ def get_node_load_info( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -2195,13 +2190,13 @@ def disable_node( 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 which is was deactivated with the Pause intent can be deactivated + 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 which goes down and comes back up while - deactivated will still need to be reactivated before services will be - placed on that node. + 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 @@ -2252,9 +2247,8 @@ def disable_node( body_content = self._serialize.body(deactivation_intent_description, 'DeactivationIntentDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -2266,9 +2260,9 @@ def disable_node( def enable_node( self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Activate a Service Fabric cluster node which is currently deactivated. + """Activate a Service Fabric cluster node that is currently deactivated. - Activates a Service Fabric cluster node which 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. @@ -2307,13 +2301,12 @@ def enable_node( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -2328,15 +2321,14 @@ def remove_node_state( """Notifies Service Fabric that the persisted state on a node has been permanently removed or lost. - 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 comes back up with its state intact. + 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. :param node_name: The name of the node. :type node_name: str @@ -2372,13 +2364,12 @@ def remove_node_state( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -2407,7 +2398,7 @@ def restart_node( 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: + node process. This is case-sensitive. Possible values include: 'False', 'True' :type create_fabric_dump: str or ~azure.servicefabric.models.CreateFabricDump @@ -2448,9 +2439,8 @@ def restart_node( body_content = self._serialize.body(restart_node_description, 'RestartNodeDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -2467,13 +2457,13 @@ def get_application_type_info_list( 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 + 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 + 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 3 application types, or if max - results is set to 3, then 3 is returned. To access the rest of the + 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. @@ -2495,11 +2485,11 @@ def get_application_type_info_list( 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 + 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 + 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 @@ -2507,7 +2497,7 @@ def get_application_type_info_list( 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 queries includes as + 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 @@ -2547,13 +2537,13 @@ def get_application_type_info_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -2581,13 +2571,13 @@ def get_application_type_info_list_by_name( 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 + 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 + 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 3 application types, or if max - results is set to 3, then 3 is returned. To access the rest of the + 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. @@ -2600,11 +2590,11 @@ def get_application_type_info_list_by_name( 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 + 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 + 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 @@ -2612,7 +2602,7 @@ def get_application_type_info_list_by_name( 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 queries includes as + 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 @@ -2656,13 +2646,13 @@ def get_application_type_info_list_by_name( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -2733,9 +2723,8 @@ def provision_application_type( 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) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: raise models.FabricErrorException(self._deserialize, response) @@ -2750,11 +2739,10 @@ def unprovision_application_type( """Removes or unregisters a Service Fabric application type from the cluster. - 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 has been deleted. Once the - application type is unregistered, no new application instances can be - created for this particular application type. + 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 @@ -2770,7 +2758,7 @@ def unprovision_application_type( 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 to set it to true for large + 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 @@ -2783,7 +2771,7 @@ def unprovision_application_type( :raises: :class:`FabricErrorException` """ - unprovision_application_type_description_info = models.UnprovisionApplicationTypeDescriptionInfo(application_type_version=application_type_version) + unprovision_application_type_description_info = models.UnprovisionApplicationTypeDescriptionInfo(application_type_version=application_type_version, async_property=async_parameter) api_version = "6.0" @@ -2810,9 +2798,8 @@ def unprovision_application_type( body_content = self._serialize.body(unprovision_application_type_description_info, 'UnprovisionApplicationTypeDescriptionInfo') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: raise models.FabricErrorException(self._deserialize, response) @@ -2871,13 +2858,13 @@ def get_service_type_info_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -2947,13 +2934,13 @@ def get_service_type_info_by_name( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.FabricErrorException(self._deserialize, response) @@ -3019,13 +3006,13 @@ def get_service_manifest( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -3105,13 +3092,13 @@ def get_deployed_service_type_info_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -3196,13 +3183,13 @@ def get_deployed_service_type_info_by_name( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.FabricErrorException(self._deserialize, response) @@ -3265,9 +3252,8 @@ def create_application( body_content = self._serialize.body(application_description, 'ApplicationDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [201]: raise models.FabricErrorException(self._deserialize, response) @@ -3281,15 +3267,14 @@ def delete_application( self, application_id, force_remove=None, timeout=60, custom_headers=None, raw=False, **operation_config): """Deletes an existing Service Fabric application. - 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 the its - services. + 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 @@ -3340,13 +3325,12 @@ def delete_application( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -3409,13 +3393,13 @@ def get_application_load_info( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.FabricErrorException(self._deserialize, response) @@ -3442,12 +3426,12 @@ def get_application_info_list( 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. + 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 + 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. @@ -3467,11 +3451,11 @@ def get_application_info_list( 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 + 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 + 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 @@ -3479,7 +3463,7 @@ def get_application_info_list( 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 queries includes as + 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 @@ -3521,13 +3505,13 @@ def get_application_info_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -3551,7 +3535,7 @@ def get_application_info( 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 + the name, type, status, parameters, and other details about the application. :param application_id: The identity of the application. This is @@ -3601,13 +3585,13 @@ def get_application_info( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.FabricErrorException(self._deserialize, response) @@ -3647,11 +3631,11 @@ def get_application_health( 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 value - 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) are returned. + 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 @@ -3673,8 +3657,8 @@ def get_application_health( 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 value obtained using bitwise 'OR' operator. + 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. @@ -3698,8 +3682,9 @@ def get_application_health( 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 value + 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. @@ -3763,13 +3748,13 @@ def get_application_health( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -3812,11 +3797,11 @@ def get_application_health_using_policy( 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 value - 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) are returned. + 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 @@ -3838,8 +3823,8 @@ def get_application_health_using_policy( 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 value obtained using bitwise 'OR' operator. + 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. @@ -3863,8 +3848,9 @@ def get_application_health_using_policy( 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 value + 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. @@ -3934,6 +3920,7 @@ def get_application_health_using_policy( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -3945,9 +3932,8 @@ def get_application_health_using_policy( body_content = None # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -3995,7 +3981,7 @@ def report_application_health( health reports sent to the health manager. :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag which indicates whether the report should be + :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. @@ -4057,9 +4043,8 @@ def report_application_health( body_content = self._serialize.body(health_information, 'HealthInformation') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -4129,9 +4114,8 @@ def start_application_upgrade( body_content = self._serialize.body(application_upgrade_description, 'ApplicationUpgradeDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -4191,13 +4175,13 @@ def get_application_upgrade( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -4276,9 +4260,8 @@ def update_application_upgrade( body_content = self._serialize.body(application_upgrade_update_description, 'ApplicationUpgradeUpdateDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -4352,9 +4335,8 @@ def resume_application_upgrade( body_content = self._serialize.body(resume_application_upgrade_description, 'ResumeApplicationUpgradeDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -4370,7 +4352,7 @@ def rollback_application_upgrade( the Service Fabric cluster. Starts rolling back the current application upgrade to the previous - version. This API can only be used to rollback the current in-progress + 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. @@ -4416,13 +4398,12 @@ def rollback_application_upgrade( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -4459,11 +4440,11 @@ def get_deployed_application_info_list( 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 + 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 + 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 @@ -4471,7 +4452,7 @@ def get_deployed_application_info_list( 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 queries includes as + 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 @@ -4509,13 +4490,13 @@ def get_deployed_application_info_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -4537,13 +4518,12 @@ def get_deployed_application_info( """Gets the information about an application deployed on a Service Fabric node. - 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. + 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 @@ -4599,13 +4579,13 @@ def get_deployed_application_info( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.FabricErrorException(self._deserialize, response) @@ -4651,11 +4631,11 @@ def get_deployed_application_health( 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 value - 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) are returned. + 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 @@ -4679,8 +4659,8 @@ def get_deployed_application_health( 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 value obtained using bitwise 'OR' operator. + 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. @@ -4743,13 +4723,13 @@ def get_deployed_application_health( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -4800,11 +4780,11 @@ def get_deployed_application_health_using_policy( 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 value - 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) are returned. + 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 @@ -4828,8 +4808,8 @@ def get_deployed_application_health_using_policy( 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 value obtained using bitwise 'OR' operator. + 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. @@ -4898,6 +4878,7 @@ def get_deployed_application_health_using_policy( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -4909,9 +4890,8 @@ def get_deployed_application_health_using_policy( body_content = None # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -4962,7 +4942,7 @@ def report_deployed_application_health( health reports sent to the health manager. :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag which indicates whether the report should be + :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. @@ -5025,9 +5005,8 @@ def report_deployed_application_health( body_content = self._serialize.body(health_information, 'HealthInformation') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -5041,8 +5020,7 @@ 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. - Gets the manifest describing an application type. The response contains - the application manifest XML as a string. + 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 @@ -5082,13 +5060,13 @@ def get_application_manifest( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -5108,10 +5086,10 @@ def get_application_manifest( 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. + specified by the application ID. Returns the information about all services belonging to the application - specified by the application id. + 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 @@ -5126,11 +5104,11 @@ def get_service_info_list( 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 + 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 + 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 @@ -5170,13 +5148,13 @@ def get_service_info_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -5210,8 +5188,8 @@ def get_service_info( 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 is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -5252,13 +5230,13 @@ def get_service_info( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.FabricErrorException(self._deserialize, response) @@ -5283,8 +5261,8 @@ def get_application_name_info( 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 is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -5324,13 +5302,13 @@ def get_application_name_info( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -5410,9 +5388,8 @@ def create_service( body_content = self._serialize.body(service_description, 'ServiceDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -5486,9 +5463,8 @@ def create_service_from_template( body_content = self._serialize.body(service_from_template_description, 'ServiceFromTemplateDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -5502,16 +5478,15 @@ def delete_service( self, service_id, force_remove=None, timeout=60, custom_headers=None, raw=False, **operation_config): """Deletes an existing Service Fabric service. - 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. + 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 is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -5558,13 +5533,12 @@ def delete_service( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -5583,15 +5557,15 @@ def update_service( 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. Please note that updating the properties of a running service is + 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 is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -5642,9 +5616,8 @@ def update_service( body_content = self._serialize.body(service_update_description, 'ServiceUpdateDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -5661,8 +5634,8 @@ def get_service_description( 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 is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -5702,13 +5675,13 @@ def get_service_description( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -5737,8 +5710,8 @@ def get_service_health( 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 is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -5751,11 +5724,11 @@ def get_service_health( 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 value - 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) are returned. + 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 @@ -5776,8 +5749,9 @@ def get_service_health( 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 + 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. @@ -5839,13 +5813,13 @@ def get_service_health( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -5880,8 +5854,8 @@ def get_service_health_using_policy( 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 is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -5894,11 +5868,11 @@ def get_service_health_using_policy( 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 value - 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) are returned. + 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 @@ -5919,8 +5893,9 @@ def get_service_health_using_policy( 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 + 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. @@ -5988,6 +5963,7 @@ def get_service_health_using_policy( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -5999,9 +5975,8 @@ def get_service_health_using_policy( body_content = None # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -6035,8 +6010,8 @@ def report_service_health( GetServiceHealth and check that the report appears in the HealthEvents section. - :param service_id: The identity of the service. This is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -6048,7 +6023,7 @@ def report_service_health( health reports sent to the health manager. :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag which indicates whether the report should be + :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. @@ -6110,9 +6085,8 @@ def report_service_health( body_content = self._serialize.body(health_information, 'HealthInformation') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -6129,8 +6103,8 @@ def resolve_service( Resolve a Service Fabric service partition to get the endpoints of the service replicas. - :param service_id: The identity of the service. This is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -6155,7 +6129,7 @@ def resolve_service( :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 got previously is stale. + 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 @@ -6196,13 +6170,13 @@ def resolve_service( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -6223,13 +6197,12 @@ 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. - 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. + 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 is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -6237,11 +6210,11 @@ def get_partition_info_list( "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 + 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 + 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 @@ -6280,13 +6253,13 @@ def get_partition_info_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -6347,13 +6320,13 @@ def get_partition_info( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.FabricErrorException(self._deserialize, response) @@ -6412,13 +6385,13 @@ def get_service_name_info( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -6439,7 +6412,6 @@ 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. - Gets the health information of the specified 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 @@ -6455,11 +6427,11 @@ def get_partition_health( 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 value - 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) are returned. + 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 @@ -6479,8 +6451,8 @@ def get_partition_health( 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 value obtained using bitwise 'OR' operator. For example, If the + 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. @@ -6542,13 +6514,13 @@ def get_partition_health( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -6593,11 +6565,11 @@ def get_partition_health_using_policy( 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 value - 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) are returned. + 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 @@ -6617,8 +6589,8 @@ def get_partition_health_using_policy( 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 value obtained using bitwise 'OR' operator. For example, If the + 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. @@ -6686,6 +6658,7 @@ def get_partition_health_using_policy( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -6697,9 +6670,8 @@ def get_partition_health_using_policy( body_content = None # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -6740,7 +6712,7 @@ def report_partition_health( health reports sent to the health manager. :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag which indicates whether the report should be + :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. @@ -6802,9 +6774,8 @@ def report_partition_health( body_content = self._serialize.body(health_information, 'HealthInformation') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -6859,13 +6830,13 @@ def get_partition_load_information( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -6923,13 +6894,12 @@ def reset_partition_load( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -6942,10 +6912,8 @@ def reset_partition_load( 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 which is currently stuck in quorum loss. + recover a specific partition that is currently stuck in quorum loss. - Indicates to the Service Fabric cluster that it should attempt to - recover a specific partition which 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. @@ -6984,13 +6952,12 @@ def recover_partition( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -7003,16 +6970,16 @@ def recover_partition( 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 which is currently stuck in quorum loss. + 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 which is currently stuck in quorum loss. + 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 is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -7051,13 +7018,12 @@ def recover_service_partitions( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -7070,10 +7036,10 @@ def recover_service_partitions( 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 which are currently stuck in quorum loss. + 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 which are currently stuck in quorum loss. + 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. @@ -7106,13 +7072,12 @@ def recover_system_partitions( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -7128,11 +7093,9 @@ def recover_all_partitions( recover any services (including system services) which are currently stuck in quorum loss. - 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. + 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 @@ -7162,13 +7125,12 @@ def recover_all_partitions( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -7222,6 +7184,7 @@ def create_repair_task( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -7230,9 +7193,8 @@ def create_repair_task( body_content = self._serialize.body(repair_task, 'RepairTask') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -7282,6 +7244,7 @@ def cancel_repair_task( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -7290,9 +7253,8 @@ def cancel_repair_task( body_content = self._serialize.body(repair_task_cancel_description, 'RepairTaskCancelDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -7354,9 +7316,8 @@ def delete_repair_task( body_content = self._serialize.body(repair_task_delete_description, 'RepairTaskDeleteDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -7416,13 +7377,13 @@ def get_repair_task_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -7477,6 +7438,7 @@ def force_approve_repair_task( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -7485,9 +7447,8 @@ def force_approve_repair_task( body_content = self._serialize.body(repair_task_approve_description, 'RepairTaskApproveDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -7537,6 +7498,7 @@ def update_repair_task_health_policy( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -7545,9 +7507,8 @@ def update_repair_task_health_policy( body_content = self._serialize.body(repair_task_update_health_policy_description, 'RepairTaskUpdateHealthPolicyDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -7596,6 +7557,7 @@ def update_repair_execution_state( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -7604,9 +7566,8 @@ def update_repair_execution_state( body_content = self._serialize.body(repair_task, 'RepairTask') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -7629,17 +7590,17 @@ def get_replica_info_list( partition. The GetReplicas endpoint returns information about the replicas of the - specified partition. The response includes the id, role, status, + 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 + 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 + 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 @@ -7677,13 +7638,13 @@ def get_replica_info_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -7704,7 +7665,7 @@ 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, + 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. @@ -7745,13 +7706,13 @@ def get_replica_info( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.FabricErrorException(self._deserialize, response) @@ -7787,11 +7748,11 @@ def get_replica_health( 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 value - 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) are returned. + 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 @@ -7841,13 +7802,13 @@ def get_replica_health( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -7888,11 +7849,11 @@ def get_replica_health_using_policy( 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 value - 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) are returned. + 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 @@ -7948,6 +7909,7 @@ def get_replica_health_using_policy( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -7959,9 +7921,8 @@ def get_replica_health_using_policy( body_content = None # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -8010,7 +7971,7 @@ def report_replica_health( health reports sent to the health manager. :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag which indicates whether the report should be + :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. @@ -8074,9 +8035,8 @@ def report_replica_health( body_content = self._serialize.body(health_information, 'HealthInformation') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -8151,13 +8111,13 @@ def get_deployed_service_replica_info_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.FabricErrorException(self._deserialize, response) @@ -8179,7 +8139,7 @@ def get_deployed_service_replica_detail_info( """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 include service kind, service name, current service + 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. @@ -8225,13 +8185,13 @@ def get_deployed_service_replica_detail_info( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -8253,7 +8213,7 @@ def get_deployed_service_replica_detail_info_by_partition_id( """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 include service kind, service name, current service + 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. @@ -8296,13 +8256,13 @@ def get_deployed_service_replica_detail_info_by_partition_id( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -8368,13 +8328,12 @@ def restart_replica( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -8395,7 +8354,7 @@ def remove_replica( 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 + 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. @@ -8446,13 +8405,12 @@ def remove_replica( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -8514,13 +8472,13 @@ def get_deployed_service_package_info_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -8595,20 +8553,20 @@ def get_deployed_service_package_info_list_by_name( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.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 == 204: + if response.status_code == 200: deserialized = self._deserialize('[DeployedServicePackageInfo]', response) if raw: @@ -8620,10 +8578,10 @@ def get_deployed_service_package_info_list_by_name( 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 an service package for a specific + """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 service package for a specific + 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 @@ -8648,11 +8606,11 @@ def get_deployed_service_package_health( 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 value - 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) are returned. + 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 @@ -8703,13 +8661,13 @@ def get_deployed_service_package_health( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -8732,7 +8690,7 @@ def get_deployed_service_package_health_using_policy( application deployed on a Service Fabric node using the specified policy. - Gets the information about health of an service package for a specific + 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 @@ -8761,11 +8719,11 @@ def get_deployed_service_package_health_using_policy( 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 value - 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) are returned. + 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 @@ -8822,6 +8780,7 @@ def get_deployed_service_package_health_using_policy( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -8833,9 +8792,8 @@ def get_deployed_service_package_health_using_policy( body_content = None # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -8887,7 +8845,7 @@ def report_deployed_service_package_health( health reports sent to the health manager. :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag which indicates whether the report should be + :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. @@ -8951,9 +8909,8 @@ def report_deployed_service_package_health( body_content = self._serialize.body(health_information, 'HealthInformation') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -9021,9 +8978,8 @@ def deploy_service_package_to_node( body_content = self._serialize.body(deploy_service_package_to_node_description, 'DeployServicePackageToNodeDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -9096,13 +9052,13 @@ def get_deployed_code_package_info_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -9183,9 +9139,8 @@ def restart_deployed_code_package( body_content = self._serialize.body(restart_deployed_code_package_description, 'RestartDeployedCodePackageDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -9267,13 +9222,13 @@ def get_container_logs_deployed_on_node( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -9359,6 +9314,7 @@ def invoke_container_api( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -9367,9 +9323,8 @@ def invoke_container_api( body_content = self._serialize.body(container_api_request_body, 'ContainerApiRequestBody') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -9393,7 +9348,7 @@ def create_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 it's status can be tracked via `GetComposeDeploymentStatus` + created, its status can be tracked via the `GetComposeDeploymentStatus` API. :param create_compose_deployment_description: Describes the compose @@ -9436,9 +9391,8 @@ def create_compose_deployment( body_content = self._serialize.body(create_compose_deployment_description, 'CreateComposeDeploymentDescription') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -9455,7 +9409,7 @@ def get_compose_deployment_status( 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. + name, status, and other details about the deployment. :param deployment_name: The identity of the deployment. :type deployment_name: str @@ -9492,13 +9446,13 @@ def get_compose_deployment_status( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -9522,17 +9476,17 @@ def get_compose_deployment_status_list( 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 + 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 + 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 + 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 + 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 @@ -9540,7 +9494,7 @@ def get_compose_deployment_status_list( 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 queries includes as + 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 @@ -9578,13 +9532,13 @@ def get_compose_deployment_status_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -9646,13 +9600,13 @@ def get_compose_deployment_upgrade_progress( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -9709,13 +9663,12 @@ def remove_compose_deployment( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -9778,9 +9731,8 @@ def start_compose_deployment_upgrade( body_content = self._serialize.body(compose_deployment_upgrade_description, 'ComposeDeploymentUpgradeDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -9827,13 +9779,13 @@ def get_chaos( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -9858,8 +9810,8 @@ def start_chaos( 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. - Please refer to the article [Induce controlled Chaos in Service Fabric - clusters](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-controlled-chaos) + 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 @@ -9901,9 +9853,8 @@ def start_chaos( body_content = self._serialize.body(chaos_parameters, 'ChaosParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -9921,9 +9872,9 @@ def stop_chaos( 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. + 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 @@ -9953,13 +9904,12 @@ def stop_chaos( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -9985,23 +9935,23 @@ def get_chaos_events( 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 + 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 + 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. - Please consult [DateTime.ToFileTimeUtc - Method](https://msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + 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. Please - consult [DateTime.ToFileTimeUtc - Method](https://msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + 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 @@ -10009,7 +9959,7 @@ def get_chaos_events( 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 queries includes as + 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 @@ -10049,13 +9999,13 @@ def get_chaos_events( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -10073,12 +10023,17 @@ def get_chaos_events( get_chaos_events.metadata = {'url': '/Tools/Chaos/Events'} def get_chaos_schedule( - self, custom_headers=None, raw=False, **operation_config): + 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 @@ -10098,16 +10053,18 @@ def get_chaos_schedule( # 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' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -10125,21 +10082,23 @@ def get_chaos_schedule( get_chaos_schedule.metadata = {'url': '/Tools/Chaos/Schedule'} def post_chaos_schedule( - self, version=None, schedule=None, custom_headers=None, raw=False, **operation_config): + self, timeout=60, version=None, schedule=None, custom_headers=None, raw=False, **operation_config): """Set the schedule used by Chaos. - Set the Chaos Schedule currently in use by Chaos. Chaos will - automatically schedule runs based on the Chaos Schedule. - The version in the provided input schedule must match the version of - the Chaos Schedule on the server. - If the version provided does not match the version on the server, the - Chaos Schedule is not updated. - If the version provided matches the version on the server, then the - Chaos Schedule is updated and the version of the Chaos Schedule on the - server is incremented up by one and wraps back to 0 after - 2,147,483,647. + 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. @@ -10164,6 +10123,8 @@ def post_chaos_schedule( # 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 = {} @@ -10175,9 +10136,8 @@ def post_chaos_schedule( body_content = self._serialize.body(chaos_schedule, 'ChaosScheduleDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -10238,13 +10198,12 @@ def upload_file( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -10259,7 +10218,8 @@ def get_image_store_content( """Gets the image store content information. Returns the information about the image store content at the specified - contentPath relative to the root of the image store. + 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. @@ -10297,13 +10257,13 @@ def get_image_store_content( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -10363,13 +10323,12 @@ def delete_image_store_content( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -10415,13 +10374,13 @@ def get_image_store_root_content( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -10485,9 +10444,8 @@ def copy_image_store_content( body_content = self._serialize.body(image_store_copy_description, 'ImageStoreCopyDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -10537,13 +10495,12 @@ def delete_image_store_upload_session( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -10595,13 +10552,12 @@ def commit_image_store_upload_session( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -10652,13 +10608,13 @@ def get_image_store_upload_session_by_id( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -10719,13 +10675,13 @@ def get_image_store_upload_session_by_path( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -10805,14 +10761,13 @@ def upload_file_chunk( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) header_parameters['Content-Range'] = self._serialize.header("content_range", content_range, 'str') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -10843,7 +10798,7 @@ def invoke_infrastructure_command( :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 have more + 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 @@ -10877,13 +10832,13 @@ def invoke_infrastructure_command( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -10920,7 +10875,7 @@ def invoke_infrastructure_query( :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 have more + 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 @@ -10954,13 +10909,13 @@ def invoke_infrastructure_query( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -10984,11 +10939,11 @@ def start_data_loss( 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 + 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. @@ -11000,8 +10955,8 @@ def start_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 is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -11052,13 +11007,12 @@ def start_data_loss( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -11076,8 +11030,8 @@ def get_data_loss_progress( Gets the progress of a data loss operation started with StartDataLoss, using the OperationId. - :param service_id: The identity of the service. This is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -11124,13 +11078,13 @@ def get_data_loss_progress( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -11151,16 +11105,16 @@ 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. - Induces quorum loss for a given stateful service partition. This API - is useful for a temporary quorum loss situation on your service. + 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 is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -11217,13 +11171,12 @@ def start_quorum_loss( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -11241,8 +11194,8 @@ def get_quorum_loss_progress( Gets the progress of a quorum loss operation started with StartQuorumLoss, using the provided OperationId. - :param service_id: The identity of the service. This is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -11289,13 +11242,13 @@ def get_quorum_loss_progress( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -11323,8 +11276,8 @@ def start_partition_restart( Call the GetPartitionRestartProgress API using the same OperationId to get the progress. - :param service_id: The identity of the service. This is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -11376,13 +11329,12 @@ def start_partition_restart( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -11400,8 +11352,8 @@ def get_partition_restart_progress( Gets the progress of a PartitionRestart started with StartPartitionRestart using the provided OperationId. - :param service_id: The identity of the service. This is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -11448,13 +11400,13 @@ def get_partition_restart_progress( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -11538,13 +11490,12 @@ def start_node_transition( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -11600,13 +11551,13 @@ def get_node_transition_progress( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -11633,21 +11584,21 @@ def get_fault_operation_list( :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. + - 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 + - 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 @@ -11680,13 +11631,13 @@ def get_fault_operation_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -11707,12 +11658,9 @@ 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 is a list of APIs that start fault operations that may be - cancelled using CancelOperation - - - StartDataLoss - - StartQuorumLoss - - StartPartitionRestart - - StartNodeTransition + 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 @@ -11722,9 +11670,9 @@ def cancel_operation( 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/is - be cleaning up internal system state caused by executing the command. - It will not restore data if the + 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. @@ -11770,13 +11718,12 @@ def cancel_operation( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -11832,9 +11779,8 @@ def create_backup_policy( body_content = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [201]: raise models.FabricErrorException(self._deserialize, response) @@ -11887,13 +11833,12 @@ def delete_backup_policy( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -11910,11 +11855,11 @@ def get_backup_policy_list( 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 + 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 + 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 @@ -11922,7 +11867,7 @@ def get_backup_policy_list( 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 queries includes as + 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 @@ -11959,13 +11904,13 @@ def get_backup_policy_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -12023,13 +11968,13 @@ def get_backup_policy_by_name( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -12056,11 +12001,11 @@ def get_all_entities_backed_up_by_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 + 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 + 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 @@ -12068,7 +12013,7 @@ def get_all_entities_backed_up_by_policy( 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 queries includes as + 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 @@ -12108,13 +12053,13 @@ def get_all_entities_backed_up_by_policy( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -12182,9 +12127,8 @@ def update_backup_policy( body_content = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -12259,9 +12203,8 @@ def enable_application_backup( body_content = self._serialize.body(enable_backup_description, 'EnableBackupDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -12319,13 +12262,12 @@ def disable_application_backup( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -12352,11 +12294,11 @@ def get_application_backup_configuration_info( 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 + 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 + 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 @@ -12364,7 +12306,7 @@ def get_application_backup_configuration_info( 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 queries includes as + 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 @@ -12405,13 +12347,13 @@ def get_application_backup_configuration_info( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -12467,11 +12409,11 @@ def get_application_backup_list( 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 + 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 + 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 @@ -12479,7 +12421,7 @@ def get_application_backup_list( 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 queries includes as + 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 @@ -12520,13 +12462,13 @@ def get_application_backup_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -12594,13 +12536,12 @@ def suspend_application_backup( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -12660,13 +12601,12 @@ def resume_application_backup( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -12691,8 +12631,8 @@ def enable_service_backup( 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 is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -12744,9 +12684,8 @@ def enable_service_backup( body_content = self._serialize.body(enable_backup_description, 'EnableBackupDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -12767,8 +12706,8 @@ def disable_service_backup( 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 is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -12807,13 +12746,12 @@ def disable_service_backup( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -12830,8 +12768,8 @@ def get_service_backup_configuration_info( 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 is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -12839,11 +12777,11 @@ def get_service_backup_configuration_info( "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 + 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 + 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 @@ -12851,7 +12789,7 @@ def get_service_backup_configuration_info( 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 queries includes as + 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 @@ -12892,13 +12830,13 @@ def get_service_backup_configuration_info( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -12925,8 +12863,8 @@ def get_service_backup_list( 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 is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -12952,11 +12890,11 @@ def get_service_backup_list( 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 + 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 + 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 @@ -12964,7 +12902,7 @@ def get_service_backup_list( 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 queries includes as + 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 @@ -13005,13 +12943,13 @@ def get_service_backup_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -13037,8 +12975,8 @@ def suspend_service_backup( 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 is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -13077,13 +13015,12 @@ def suspend_service_backup( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -13101,8 +13038,8 @@ def resume_service_backup( 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 is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -13141,13 +13078,12 @@ def resume_service_backup( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -13216,9 +13152,8 @@ def enable_partition_backup( body_content = self._serialize.body(enable_backup_description, 'EnableBackupDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -13274,13 +13209,12 @@ def disable_partition_backup( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -13333,13 +13267,13 @@ def get_partition_backup_configuration_info( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -13420,13 +13354,13 @@ def get_partition_backup_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -13484,13 +13418,12 @@ def suspend_partition_backup( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -13541,13 +13474,12 @@ def resume_partition_backup( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -13633,9 +13565,8 @@ def backup_partition( body_content = None # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -13687,13 +13618,13 @@ def get_partition_backup_progress( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -13781,9 +13712,8 @@ def restore_partition( body_content = self._serialize.body(restore_partition_description, 'RestorePartitionDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202]: raise models.FabricErrorException(self._deserialize, response) @@ -13836,13 +13766,13 @@ def get_partition_restore_progress( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -13878,11 +13808,11 @@ def get_backups_from_backup_location( 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 + 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 + 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 @@ -13890,7 +13820,7 @@ def get_backups_from_backup_location( 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 queries includes as + 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 @@ -13921,6 +13851,7 @@ def get_backups_from_backup_location( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -13929,9 +13860,8 @@ def get_backups_from_backup_location( body_content = self._serialize.body(get_backup_by_storage_query_description, 'GetBackupByStorageQueryDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -13995,9 +13925,8 @@ def create_name( body_content = self._serialize.body(name_description, 'NameDescription') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [201]: raise models.FabricErrorException(self._deserialize, response) @@ -14048,13 +13977,12 @@ def get_name_exists_info( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -14107,13 +14035,12 @@ def delete_name( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -14129,7 +14056,7 @@ def get_sub_name_info_list( 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. + 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 @@ -14139,11 +14066,11 @@ def get_sub_name_info_list( 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 + 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 + 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 @@ -14183,13 +14110,13 @@ def get_sub_name_info_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -14210,9 +14137,9 @@ 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 stores + 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 include name, value and + 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 @@ -14223,11 +14150,11 @@ def get_property_info_list( 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 + 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 + 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 @@ -14267,13 +14194,13 @@ def get_property_info_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -14344,9 +14271,8 @@ def put_property( body_content = self._serialize.body(property_description, 'PropertyDescription') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -14402,13 +14328,13 @@ def get_property_info( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -14470,13 +14396,12 @@ def delete_property( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -14535,6 +14460,7 @@ def submit_property_batch( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -14543,9 +14469,8 @@ def submit_property_batch( body_content = self._serialize.body(property_batch_description_list, 'PropertyBatchDescriptionList') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 409]: raise models.FabricErrorException(self._deserialize, response) @@ -14625,13 +14550,13 @@ def get_cluster_event_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -14709,13 +14634,13 @@ def get_containers_event_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -14799,13 +14724,13 @@ def get_node_event_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -14883,13 +14808,13 @@ def get_nodes_event_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -14980,13 +14905,13 @@ def get_application_event_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -15064,13 +14989,13 @@ def get_applications_event_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -15093,8 +15018,8 @@ def get_service_event_list( The response is list of ServiceEvent objects. - :param service_id: The identity of the service. This is typically the - full name of the service without the 'fabric:' URI scheme. + :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 @@ -15160,13 +15085,13 @@ def get_service_event_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -15244,13 +15169,13 @@ def get_services_event_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -15334,13 +15259,13 @@ def get_partition_event_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -15418,13 +15343,13 @@ def get_partitions_event_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -15511,13 +15436,13 @@ def get_partition_replica_event_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -15601,13 +15526,13 @@ def get_partition_replicas_event_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -15665,13 +15590,13 @@ def get_correlated_event_list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.FabricErrorException(self._deserialize, response) @@ -15687,3 +15612,591 @@ def get_correlated_event_list( return deserialized get_correlated_event_list.metadata = {'url': '/EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events'} + + def create_application_resource( + self, application_resource_name, application_resource_description, custom_headers=None, raw=False, **operation_config): + """Creates or updates an application resource. + + Creates an application with the specified name and description. If an + application with the same name already exists, then its description are + updated to the one indicated in this request. + + :param application_resource_name: Service Fabric application resource + name. + :type application_resource_name: str + :param application_resource_description: Description for creating an + 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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.3-preview" + + # Construct URL + url = self.create_application_resource.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['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # 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 = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + create_application_resource.metadata = {'url': '/Resources/Applications/{applicationResourceName}'} + + def get_application_resource( + self, application_resource_name, custom_headers=None, raw=False, **operation_config): + """Gets the application with the given name. + + Gets the application with the given name. This includes the information + about the application's services and other runtime information. + + :param application_resource_name: Service Fabric application resource + name. + :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.3-preview" + + # Construct URL + url = self.get_application_resource.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 custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.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_application_resource.metadata = {'url': '/Resources/Applications/{applicationResourceName}'} + + def delete_application_resource( + self, application_resource_name, custom_headers=None, raw=False, **operation_config): + """Deletes the specified application. + + Deletes the application identified by the name. + + :param application_resource_name: Service Fabric application resource + name. + :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.3-preview" + + # Construct URL + url = self.delete_application_resource.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 custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.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_application_resource.metadata = {'url': '/Resources/Applications/{applicationResourceName}'} + + def get_services( + self, application_resource_name, custom_headers=None, raw=False, **operation_config): + """Gets all the services in the application resource. + + The operation returns the service descriptions of all the services in + the application resource. . + + :param application_resource_name: Service Fabric application resource + name. + :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:`HttpOperationError` + """ + api_version = "6.3-preview" + + # Construct URL + url = self.get_services.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 custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise HttpOperationError(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 + get_services.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services'} + + def get_service( + self, application_resource_name, service_resource_name, custom_headers=None, raw=False, **operation_config): + """Gets the description of the specified service in an application + resource. + + Gets the description of the service resource. + + :param application_resource_name: Service Fabric application resource + name. + :type application_resource_name: str + :param service_resource_name: Service Fabric service resource name. + :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:`HttpOperationError` + """ + api_version = "6.3-preview" + + # Construct URL + url = self.get_service.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("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise HttpOperationError(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_service.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}'} + + def get_replicas( + self, application_resource_name, service_resource_name, custom_headers=None, raw=False, **operation_config): + """Gets replicas of a given service in an applciation resource. + + Gets the information about all replicas of a given service of an + application. The information includes the runtime properties of the + replica instance. + + :param application_resource_name: Service Fabric application resource + name. + :type application_resource_name: str + :param service_resource_name: Service Fabric service resource name. + :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: PagedServiceResourceReplicaDescriptionList or + ClientRawResponse if raw=true + :rtype: + ~azure.servicefabric.models.PagedServiceResourceReplicaDescriptionList + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`HttpOperationError` + """ + api_version = "6.3-preview" + + # Construct URL + url = self.get_replicas.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("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise HttpOperationError(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PagedServiceResourceReplicaDescriptionList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_replicas.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/replicas'} + + def get_replica( + self, application_resource_name, service_resource_name, replica_name, custom_headers=None, raw=False, **operation_config): + """Gets a specific replica of a given service in an application resource. + + Gets the information about the specified replica of a given service of + an application. The information includes the runtime properties of the + replica instance. + + :param application_resource_name: Service Fabric application resource + name. + :type application_resource_name: str + :param service_resource_name: Service Fabric service resource name. + :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: ServiceResourceReplicaDescription or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.ServiceResourceReplicaDescription + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`HttpOperationError` + """ + api_version = "6.3-preview" + + # Construct URL + url = self.get_replica.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("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise HttpOperationError(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServiceResourceReplicaDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_replica.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}'} + + def create_volume_resource( + 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 and description. If a + volume with the same name already exists, then its description is + updated to the one indicated in this request. + + :param volume_resource_name: Service Fabric volume resource name. + :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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.3-preview" + + # Construct URL + url = self.create_volume_resource.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("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # 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 = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + create_volume_resource.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'} + + def get_volume_resource( + self, volume_resource_name, custom_headers=None, raw=False, **operation_config): + """Gets the volume resource. + + Gets the information about the volume resource with a given name. This + information includes the volume description and other runtime + information. + + :param volume_resource_name: Service Fabric volume resource name. + :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` + """ + api_version = "6.3-preview" + + # Construct URL + url = self.get_volume_resource.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("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.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_volume_resource.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'} + + def delete_volume_resource( + self, volume_resource_name, custom_headers=None, raw=False, **operation_config): + """Deletes the volume resource. + + Deletes the volume identified by the name. + + :param volume_resource_name: Service Fabric volume resource name. + :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` + """ + api_version = "6.3-preview" + + # Construct URL + url = self.delete_volume_resource.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("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.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_volume_resource.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'} diff --git a/azure-servicefabric/azure/servicefabric/version.py b/azure-servicefabric/azure/servicefabric/version.py index c19e20336924..04fad6f3ebf3 100644 --- a/azure-servicefabric/azure/servicefabric/version.py +++ b/azure-servicefabric/azure/servicefabric/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "6.2.0.0" +VERSION = "6.3.0.0" diff --git a/azure-servicefabric/setup.py b/azure-servicefabric/setup.py index 768b3b8f36bd..97cd51c0089d 100644 --- a/azure-servicefabric/setup.py +++ b/azure-servicefabric/setup.py @@ -72,6 +72,7 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'License :: OSI Approved :: MIT License', ], zip_safe=False,